mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Add automatic scan frequency (#7625)
This commit is contained in:
parent
9828ec3606
commit
5195007829
8 changed files with 78 additions and 18 deletions
|
|
@ -92,7 +92,7 @@ end
|
|||
-- **********************************************************
|
||||
|
||||
-- Function to save host configuration
|
||||
function vs_utils.save_host_to_scan(scan_type, host, scan_result, last_scan_time, last_duration, is_ok_last_scan, ports)
|
||||
function vs_utils.save_host_to_scan(scan_type, host, scan_result, last_scan_time, last_duration, is_ok_last_scan, ports, scan_frequency)
|
||||
local saved_hosts_string = ntop.getCache(host_to_scan_key)
|
||||
local saved_hosts = {}
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ function vs_utils.save_host_to_scan(scan_type, host, scan_result, last_scan_time
|
|||
local new_item = {
|
||||
host=host,
|
||||
scan_type=scan_type,
|
||||
ports=ports
|
||||
ports=ports,
|
||||
}
|
||||
|
||||
if last_scan_time or last_duration then
|
||||
|
|
@ -134,6 +134,10 @@ function vs_utils.save_host_to_scan(scan_type, host, scan_result, last_scan_time
|
|||
end
|
||||
end
|
||||
|
||||
if not isEmptyString(scan_frequency) then
|
||||
new_item.scan_frequency = scan_frequency
|
||||
end
|
||||
|
||||
if(scan_result ~= nil) then
|
||||
local handle = io.open(get_report_path(scan_type, host), "w")
|
||||
local result = handle:write(scan_result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue