Fixes vulnerabilities taking too long to load (#7846)

This commit is contained in:
Matteo Biscosi 2023-09-29 10:10:59 +00:00
parent 263ce16a49
commit 7c5d0e37d5
6 changed files with 57 additions and 56 deletions

View file

@ -538,9 +538,21 @@ end
-- **********************************************************
-- Function to retrieve a specific host scan info
function vs_utils.retrieve_host(host)
local hosts_scanned = ntop.getHashKeysCache(host_to_scan_key) or {}
for key, _ in pairs(hosts_scanned) do
if key:find(host) then
return json.decode(ntop.getHashCache(host_to_scan_key, key) or "")
end
end
return nil
end
-- **********************************************************
-- Function to retrieve hosts list to scan
function vs_utils.retrieve_hosts_to_scan()
local hash_keys = ntop.getHashKeysCache(host_to_scan_key)
local rsp = {}
if hash_keys then