Fixed vulnerability scan issues (#9594)

This commit is contained in:
GabrieleDeri 2025-09-02 11:12:30 +02:00 committed by GitHub
parent 11e734348e
commit 04afeefb5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 11 deletions

View file

@ -1144,6 +1144,7 @@ function vs_utils.save_host_to_scan(scan_type, host, scan_result, last_scan_time
local host_hash_key = vs_utils.get_host_hash_key(host, scan_type)
local old_data_string = ntop.getHashCache(host_to_scan_key, host_hash_key)
local old_data = json.decode(old_data_string)
-- Getting the hostname, the only way is to scan all the interfaces and retrieve it
local host_name = ntop.resolveName(host)
if host_name == host then
@ -2350,7 +2351,6 @@ end
-- Function to schedule ondemand single host scan
function vs_utils.schedule_ondemand_single_host_scan(scan_type, host, ports, scan_id, is_periodicity, is_all, is_single_scan, cidr)
local scan = { scan_type = scan_type, host = host, ports = ports, id= scan_id, cidr = cidr}
vs_utils.set_status_scan(scan_type, host, ports, scan_id, is_periodicity, is_all, is_single_scan, vs_utils.scan_status.scheduled)
ntop.rpushCache(host_scan_queue_key, json.encode(scan))