Improved nmap tool search

This commit is contained in:
Luca Deri 2023-08-03 11:21:41 +02:00
parent 72ac5f88fc
commit 6333ff1819
3 changed files with 18 additions and 2 deletions

View file

@ -49,6 +49,22 @@ local vs_utils = {}
-- **********************************************************
function vs_utils.is_nmap_installed()
local path = {
"/usr/bin/nmap",
"/usr/local/bin/nmap",
"/opt/homebrew/bin/nmap"
}
for _,p in pairs(path) do
if(ntop.exists(p)) then return true end
end
return false
end
-- **********************************************************
local function get_report_path(scan_type, ip)
local base_dir = dirs.workingdir .. "/-1/vulnerability_scan"
ntop.mkdir(base_dir)