mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Added chedk on VS drivers
Improved nmap output
This commit is contained in:
parent
dacb37cdc8
commit
3f35ce9863
3 changed files with 23 additions and 2 deletions
|
|
@ -57,8 +57,11 @@ local function get_report_path(scan_type, ip)
|
|||
return(ret)
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
local function lines(str)
|
||||
local result = {}
|
||||
|
||||
for line in str:gmatch '[^\n]+' do
|
||||
table.insert(result, line)
|
||||
end
|
||||
|
|
@ -68,7 +71,9 @@ end
|
|||
-- ##############################################
|
||||
|
||||
-- remove the first/last few lines that contain nmap information that change at each scan
|
||||
function vs_utils.cleanup_nmap_result(scan_result)
|
||||
function vs_utils.cleanup_nmap_result(scan_result)
|
||||
scan_result = scan_result:gsub("|", "")
|
||||
|
||||
scan_result = lines(scan_result)
|
||||
|
||||
for i=1,4 do
|
||||
|
|
@ -227,7 +232,11 @@ function vs_utils.list_scan_modules()
|
|||
for name in pairs(ntop.readdir(basedir)) do
|
||||
if(ends(name, ".lua")) then
|
||||
name = string.sub(name, 1, string.len(name)-4) -- remove .lua trailer
|
||||
table.insert(modules, name)
|
||||
local m = vs_utils.load_module(name)
|
||||
|
||||
if(m:is_enabled()) then
|
||||
table.insert(modules, name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue