[VS] Fix alert description.

This commit is contained in:
Nicolo Maio 2023-11-13 11:01:43 +01:00
parent 19b62fe48f
commit 6187ee30b8
3 changed files with 16 additions and 8 deletions

View file

@ -429,6 +429,12 @@ local function check_differences(host, host_name, scan_type, old_data, new_data)
rsp["host"] = host
rsp["host_name"] = host_name
rsp["scan_type"] = scan_type
if (new_data.last_scan_time) then
local date_string = format_utils.formatPastEpochShort(new_data.last_scan_time)
date_string = string.gsub(date_string," ","_")
rsp["date"] = date_string
end
end
return rsp
@ -871,7 +877,9 @@ function vs_utils.save_host_to_scan(scan_type, host, scan_result, last_scan_time
ports = num_open_ports,
cve = cve,
tcp_ports = tcp_ports,
udp_ports = udp_ports
udp_ports = udp_ports,
last_scan_time = last_scan_time
})
if host_info_to_cache then
ntop.rpushCache(scanned_hosts_changes_key, json.encode(host_info_to_cache))