mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Add missing epoch and add formatting on REST. (#7857)
This commit is contained in:
parent
d79d6136b5
commit
254ed7fac9
9 changed files with 14 additions and 10 deletions
|
|
@ -404,8 +404,7 @@ function vs_utils.save_host_to_scan(scan_type, host, scan_result, last_scan_time
|
|||
end
|
||||
|
||||
if last_scan_time or last_duration then
|
||||
local time_formatted = format_utils.formatEpoch(last_scan_time)
|
||||
|
||||
--local time_formatted = format_utils.formatEpoch(last_scan_time)
|
||||
if last_duration <= 0 then
|
||||
last_duration = 1
|
||||
end
|
||||
|
|
@ -413,7 +412,7 @@ function vs_utils.save_host_to_scan(scan_type, host, scan_result, last_scan_time
|
|||
last_duration = secondsToTime(last_duration)
|
||||
new_item.last_scan = {
|
||||
epoch = last_scan_time,
|
||||
time = time_formatted,
|
||||
--time = time_formatted,
|
||||
duration = last_duration
|
||||
}
|
||||
|
||||
|
|
@ -767,7 +766,7 @@ function vs_utils.scan_host(scan_type, host, ports, scan_id)
|
|||
|
||||
|
||||
local scan_module = vs_utils.load_module(scan_type)
|
||||
local result,duration,scan_result,num_open_ports,num_vulnerabilities_found, cve, udp_ports, tcp_ports = scan_module:scan_host(host, ports)
|
||||
local now,result,duration,scan_result,num_open_ports,num_vulnerabilities_found, cve, udp_ports, tcp_ports = scan_module:scan_host(host, ports)
|
||||
|
||||
-- FIX HERE UDP ports
|
||||
tcp_ports = {ports = format_port_list_to_string(tcp_ports), num_ports = #tcp_ports}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue