[VS] Add check on the host before TCP/UDP portscan. (#8050)

This commit is contained in:
Nicolo Maio 2023-11-23 14:58:37 +01:00
parent 3d1fbfe112
commit fb0ff0850c
7 changed files with 128 additions and 22 deletions

View file

@ -108,6 +108,10 @@ function alert_vulnerability_scan.format(ifid, alert, alert_type_params, local_e
msg = msg .. i18n('vulnerability_scan.solved_issues', { num_issues = alert_type_params.num_cve_solved, cve_solved = cve_solved }) .. " "
end
if (alert_type_params.is_up_check_case) then
msg = msg .. i18n("vulnerability_scan.host_down_case", { host = alert_type_params.host })
end
local host = alert_type_params.host_name
if isEmptyString(host) then
host = alert_type_params.host
@ -131,7 +135,9 @@ function alert_vulnerability_scan.format(ifid, alert, alert_type_params, local_e
end
local alert_descr = i18n('vulnerability_scan.host_alert', { host = host, msg = msg, url = url, scan_type = scan_type_label })
if(alert_type_params.is_up_check_case) then
alert_descr = msg
end
return alert_descr
end