Display exploit codes information for each detected CVE-IDs (#729)

* add exploit

* bug fix while loading config in TUI, display in format-full-text

* fix readme
This commit is contained in:
sadayuki-matsuno
2018-11-03 16:36:59 +09:00
committed by Kota Kanbe
parent 678e72a8b6
commit 9865eab2c0
16 changed files with 568 additions and 24 deletions

View File

@@ -743,6 +743,16 @@ func setChangelogLayout(g *gocui.Gui) error {
lines = append(lines, adv.Format())
}
if len(vinfo.Exploits) != 0 {
lines = append(lines, "\n",
"Exploit Codes",
"=============",
)
for _, exploit := range vinfo.Exploits {
lines = append(lines, fmt.Sprintf("* [%s](%s)", exploit.Description, exploit.URL))
}
}
if currentScanResult.IsDeepScanMode() {
lines = append(lines, "\n",
"ChangeLogs",
@@ -770,6 +780,7 @@ func setChangelogLayout(g *gocui.Gui) error {
type dataForTmpl struct {
CveID string
Cvsses string
Exploits []models.Exploit
Summary string
Mitigation string
Confidences models.Confidences
@@ -877,6 +888,7 @@ const mdTemplate = `
CVSS Scores
-----------
{{.Cvsses }}
Summary
-----------
{{.Summary }}