mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-24 12:11:52 +08:00
fix: 结果文件中 POC 漏洞只显示 vulnerable 不显示漏洞名称 (Closes #591)
POC 扫描结果存入 details["vulnerability_name"], 但 TXT/CSV/NDJSON 三种输出格式只读 details["vulnerability"], key 不匹配导致漏洞名丢失,退化为显示 status 字段 "vulnerable"。 三种 writer 统一兼容两种 key。
This commit is contained in:
@@ -98,6 +98,9 @@ func (w *StdoutNDJSONWriter) flatten(r *ScanResult) *ndjsonRecord {
|
||||
rec.Title = strVal(d, "title")
|
||||
rec.URL = strVal(d, "url")
|
||||
rec.Vulnerability = strVal(d, "vulnerability")
|
||||
if rec.Vulnerability == "" {
|
||||
rec.Vulnerability = strVal(d, "vulnerability_name")
|
||||
}
|
||||
rec.Username = strVal(d, "username")
|
||||
rec.Password = strVal(d, "password")
|
||||
rec.Plugin = strVal(d, "plugin")
|
||||
|
||||
Reference in New Issue
Block a user