mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Implemented Utils::execCmd for avoiding lua popen
Refreshed VS modules
This commit is contained in:
parent
4f3546cf81
commit
72aee7ffab
8 changed files with 127 additions and 58 deletions
|
|
@ -912,12 +912,9 @@ function vs_utils.get_active_hosts(host, cidr)
|
|||
local s = string.split(host, '%.')
|
||||
local net = s[1].."."..s[2].."."..s[3].."."
|
||||
local command = 'nmap -sP -n ' .. net .. '1-254 | grep "Nmap scan report for" | cut -d " " -f 5'
|
||||
local handle = io.popen(command)
|
||||
local out = handle:read("*a")
|
||||
local out = ntop.execCmd(command)
|
||||
local l = lines(out)
|
||||
|
||||
handle:close()
|
||||
|
||||
for _,h in pairs(l) do
|
||||
result[#result+1] = h
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue