mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Fixed ports count
This commit is contained in:
parent
d8cb4bcfed
commit
2f009dd77c
2 changed files with 4 additions and 5 deletions
|
|
@ -89,8 +89,7 @@ end
|
|||
-- remove the first/last few lines that contain nmap information that change at each scan
|
||||
function vs_utils.cleanup_nmap_result(scan_result, scan_type)
|
||||
scan_result = scan_result:gsub("|", "")
|
||||
scan_result = scan_result:gsub("^_", "")
|
||||
scan_result = scan_result:gsub("_$", "")
|
||||
scan_result = scan_result:gsub("_", "")
|
||||
|
||||
scan_result = lines(scan_result)
|
||||
|
||||
|
|
@ -108,8 +107,8 @@ function vs_utils.cleanup_nmap_result(scan_result, scan_type)
|
|||
local scan_out = {}
|
||||
|
||||
for _,l in pairs(scan_result) do
|
||||
local t = string.find(l, "/tcp open") or 0
|
||||
local u = string.find(l, "/udp open") or 0
|
||||
local t = string.find(l, "/tcp ") or 0
|
||||
local u = string.find(l, "/udp ") or 0
|
||||
|
||||
if((t > 0) or (u > 0)) then
|
||||
num_open_ports = num_open_ports + 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue