Fix invalid scan behaviour (#7763)

This commit is contained in:
Nicolo Maio 2023-08-21 14:48:30 +02:00
parent 3b4450b9df
commit f9069466fa

View file

@ -529,9 +529,10 @@ function vs_utils.scan_host(scan_type, host, ports, scan_id)
if debug_print then
traceError(TRACE_NORMAL,TRACE_CONSOLE,"End scan Host ".. host .. ", result: " .. result .. "\n")
end
vs_utils.save_host_to_scan(scan_type, host, result, now, duration, scan_result,
if (isAlreadyPresent({host= host, scan_type= scan_type})) then
vs_utils.save_host_to_scan(scan_type, host, result, now, duration, scan_result,
ports, nil, num_open_ports, num_vulnerabilities_found, cve, scan_id, false)
end
return true
end