1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-01 20:39:02 +00:00

Strip blank lines from the output of targets-asn.nse.

Patch by John Bond.
This commit is contained in:
david
2012-03-31 03:00:25 +00:00
parent be2e413914
commit 0c52330285

View File

@@ -84,10 +84,12 @@ action = function(host, port)
break
else
for i, prefix in ipairs(stdnse.strsplit("\n",data)) do
table.insert(prefixes,prefix)
if target.ALLOW_NEW_TARGETS then
stdnse.print_debug("Added targets: "..prefix)
local status,err = target.add(prefix)
if ( #prefix > 1 ) then
table.insert(prefixes,prefix)
if target.ALLOW_NEW_TARGETS then
stdnse.print_debug("Added targets: "..prefix)
local status,err = target.add(prefix)
end
end
end
end