breaking-change(go-exploitdb): support new go-exploitdb (#1288)

This commit is contained in:
Kota Kanbe
2021-08-20 08:00:57 +09:00
committed by GitHub
parent 24f790f474
commit 9b18e1f9f0
3 changed files with 18 additions and 24 deletions

View File

@@ -32,7 +32,7 @@ func FillWithExploit(r *models.ScanResult, cnf config.ExploitConf) (nExploitCve
return 0, err
}
for _, res := range responses {
exps := []*exploitmodels.Exploit{}
exps := []exploitmodels.Exploit{}
if err := json.Unmarshal([]byte(res.json), &exps); err != nil {
return 0, err
}
@@ -76,7 +76,7 @@ func FillWithExploit(r *models.ScanResult, cnf config.ExploitConf) (nExploitCve
}
// ConvertToModels converts gost model to vuls model
func ConvertToModels(es []*exploitmodels.Exploit) (exploits []models.Exploit) {
func ConvertToModels(es []exploitmodels.Exploit) (exploits []models.Exploit) {
for _, e := range es {
var documentURL, shellURL *string
if e.OffensiveSecurity != nil {