mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
[VS] Disable alert triggers for port changes when conducting a CVE scan
This commit is contained in:
parent
d6d3e0a829
commit
672539ac9f
3 changed files with 9 additions and 3 deletions
|
|
@ -61,8 +61,10 @@ end
|
|||
-- @return A human-readable string
|
||||
function alert_vulnerability_scan.format(ifid, alert, alert_type_params, local_explorer)
|
||||
local msg = ""
|
||||
|
||||
if (alert_type_params.scan_type == "tcp_portscan" or alert_type_params.scan_type == "tcp_openports") then
|
||||
if (alert_type_params.scan_type == "tcp_portscan" or alert_type_params.scan_type == "tcp_openports")
|
||||
-- case standard with scan_type == "TCP_PORTSCAN"
|
||||
or (alert_type_params.scan_type == "cve" and (alert_type_params.num_ports.new_num_ports ~= 0 or alert_type_params.num_ports.old_num_ports ~= 0)) then
|
||||
-- old case when TCP ports where detected also with cve scans
|
||||
if (not isEmptyString(alert_type_params.tcp_ports_case)) then
|
||||
msg = msg .. i18n('vulnerability_scan.ports_changed_cases.'..alert_type_params.tcp_ports_case, {
|
||||
open_ports_num = normalize_values(alert_type_params.tcp_open_ports,"num"),
|
||||
|
|
@ -72,6 +74,8 @@ function alert_vulnerability_scan.format(ifid, alert, alert_type_params, local_e
|
|||
protocol = i18n("tcp")
|
||||
})
|
||||
msg = msg:gsub("%,", ", ")
|
||||
else
|
||||
msg = msg .. i18n('vulnerability_scan.ports_changed_cases.cve_scan_case')
|
||||
end
|
||||
|
||||
elseif (alert_type_params.scan_type == "udp_portscan") then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue