mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Added check
This commit is contained in:
parent
ba75c279d0
commit
6c29839492
1 changed files with 14 additions and 14 deletions
|
|
@ -816,16 +816,16 @@ local function update_scan_info_for_report(type_of_scan_execution, new_item, hos
|
|||
if(info_json.hosts_down_list == nil) then
|
||||
info_json.hosts_down_list = {}
|
||||
end
|
||||
|
||||
|
||||
info_json.hosts_down_list[host_down] = true
|
||||
info_json.not_scanned_hosts = table.len(info_json.hosts_down_list)
|
||||
end
|
||||
|
||||
goto continue
|
||||
end
|
||||
|
||||
|
||||
-- **********************************************************
|
||||
|
||||
|
||||
if (new_item.num_vulnerabilities_found ~= nil) then
|
||||
|
||||
if (info_json ~= {} and info_json.cves ~= nil) then
|
||||
|
|
@ -1396,7 +1396,7 @@ local function retrieve_email_info(exec_type)
|
|||
if(debug_me) then
|
||||
tprint(info_json)
|
||||
end
|
||||
|
||||
|
||||
local email_info = {
|
||||
cve_num = tonumber(info_json.cves) or 0,
|
||||
udp_ports = tonumber(info_json.udp_ports) or 0,
|
||||
|
|
@ -1442,7 +1442,7 @@ local function retrieve_report_info(date)
|
|||
scanned_hosts = 0,
|
||||
not_scanned_hosts = 0
|
||||
}
|
||||
|
||||
|
||||
for _, item in ipairs(host_scanned_info) do
|
||||
if (not isEmptyString(item.num_vulnerabilities_found)) then
|
||||
info.cves = info.cves + tonumber(item.num_vulnerabilities_found)
|
||||
|
|
@ -1581,28 +1581,28 @@ function vs_utils.notify_scan_results(exec_type, periodicity)
|
|||
for k, v in pairsByKeys(email_info.hosts_down, asc) do
|
||||
ret = ret .. k .. "\n"
|
||||
end
|
||||
|
||||
|
||||
skipped_hosts_list = i18n("hosts_stats.page_scan_hosts.email.host_down_list", { host_down_items = ret })
|
||||
else
|
||||
no_hosts_down_br = "</br><br>"
|
||||
end
|
||||
|
||||
notification_message = i18n(email_body_i18n_key, {
|
||||
cves = format_num_for_email(email_info.cve_num,0),
|
||||
udp_ports = format_num_for_email(email_info.udp_ports,1),
|
||||
tcp_ports = format_num_for_email(email_info.tcp_ports,2),
|
||||
cves = format_num_for_email(email_info.cve_num, 0),
|
||||
udp_ports = format_num_for_email(email_info.udp_ports, 1),
|
||||
tcp_ports = format_num_for_email(email_info.tcp_ports, 2),
|
||||
scanned_hosts = format_num_for_email(email_info.scanned_hosts, 3),
|
||||
not_scanned_hosts = format_num_for_email(email_info.not_scanned_hosts, 4),
|
||||
not_scanned_hosts = format_num_for_email(email_info.not_scanned_hosts or 0, 4),
|
||||
no_hosts_down_br = no_hosts_down_br,
|
||||
skipped_hosts_list = skipped_hosts_list,
|
||||
duration = duration_label,
|
||||
start_date = start_date_formatted,
|
||||
end_date = end_date_formatted,
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
local possible_discrepancies_info = ""
|
||||
local add_br = ""
|
||||
|
||||
|
||||
if (email_info.has_discrepancy) then
|
||||
possible_discrepancies_info = i18n("hosts_stats.page_scan_hosts.email.discrepancy", {
|
||||
new_ports_open = ternary(email_info.new_open_ports ~= 0, format_high_num_value_for_tables({num = email_info.new_open_ports}, "num"),"0"),
|
||||
|
|
@ -1627,8 +1627,8 @@ function vs_utils.notify_scan_results(exec_type, periodicity)
|
|||
if verbose then
|
||||
traceError(TRACE_NORMAL,TRACE_CONSOLE, "Vulnerability Scan completed. Sending " .. title .."\n")
|
||||
end
|
||||
recipients.sendMessageByNotificationType({periodicity = periodicity, success = true, message = notification_message, title = title}, "vulnerability_scans")
|
||||
|
||||
recipients.sendMessageByNotificationType({periodicity = periodicity, success = true, message = notification_message, title = title}, "vulnerability_scans")
|
||||
end
|
||||
|
||||
-- **********************************************************
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue