[VA] Add host name column.

This commit is contained in:
Nicolo Maio 2023-08-17 22:02:31 +02:00
parent 75ccb84b31
commit 8d433bbb76
5 changed files with 30 additions and 2 deletions

View file

@ -293,8 +293,19 @@ function vs_utils.save_host_to_scan(scan_type, host, scan_result, last_scan_time
else
epoch_id = id
end
local ifstats = interface.getStats()
interface.select(tostring(ifstats.id))
local info = interface.getHostInfo(host)
local host_name = ""
if info and info.name then
host_name = info.name
end
local new_item = {
host = host,
host_name = host_name,
scan_type = scan_type,
ports = ports,
num_open_ports = num_open_ports,