Add load ports feedback and fix bugs.(#7625)

This commit is contained in:
Nicolo Maio 2023-08-02 09:46:35 +00:00
parent e427cdafbc
commit 9828ec3606
7 changed files with 15 additions and 18 deletions

View file

@ -284,7 +284,7 @@ function vs_utils.set_status_scan(scan_type, host, ports)
end
end
if index_to_remove ~= 0 then
if index_to_update ~= 0 then
table.remove(saved_hosts, index_to_update)
table.insert(saved_hosts, index_to_update, value_to_update)
end
@ -333,7 +333,6 @@ function vs_utils.process_oldest_scheduled_scan()
if((elem ~= nil) and (elem ~= "")) then
local elem = json.decode(elem)
tprint(elem)
vs_utils.scan_host(elem.scan_type, elem.host, elem.ports)
return true