Fix CVE doc URL.

This commit is contained in:
Nicolo Maio 2023-10-17 11:03:40 +02:00
parent 41b138f5f7
commit bb6bdf2f7b
6 changed files with 34 additions and 6 deletions

View file

@ -461,11 +461,12 @@ function vs_utils.cleanup_nmap_result(scan_result, scan_type)
if(string.sub(l, 1, 2) == " [") then
local c = string.split(string.sub(l,3), "]")
local url = cve_utils.getDocURL(c[1], scan_type)
if(scan_type == "cve") then
l = '[<A HREF="https://nvd.nist.gov/vuln/detail/'..c[1]..'">'..c[1]..'</A>]'..c[2]
l = '[<A HREF="'..url..'">'..c[1]..'</A>]'..c[2]
elseif(scan_type == "openvas") then
l = '[<A HREF="https://vulners.com/openvas/OPENVAS:'..c[1]..'">'..c[1]..'</A>]'..c[2]
l = '[<A HREF="'..url..'">'..c[1]..'</A>]'..c[2]
end
table.insert(cve, c[1])