[VS] Remove automatic load ports in form. (#7866)

This commit is contained in:
Nicolo Maio 2023-10-02 11:26:07 +02:00
parent 68ab1bd7c0
commit 4fa0f46c8b
3 changed files with 13 additions and 6 deletions

View file

@ -754,6 +754,7 @@ function vs_utils.scan_host(scan_type, host, ports, scan_id)
traceError(TRACE_NORMAL,TRACE_CONSOLE,"Scanning Host ".. host .. " on Ports: " .. ports .. "\n")
end
local ports_scan_param = ports
if (isEmptyString(ports)) then
ports = vs_utils.discover_open_ports(host)
end
@ -777,7 +778,7 @@ function vs_utils.scan_host(scan_type, host, ports, scan_id)
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, udp_ports, tcp_ports)
ports_scan_param, nil, num_open_ports, num_vulnerabilities_found, cve, scan_id, false, udp_ports, tcp_ports)
end
return true
end