1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 12:41:29 +00:00

Fixed a bug that would prevent the script from displaying any output unless

being run in debug mode. [Patrik]
This commit is contained in:
patrik
2011-07-26 06:46:12 +00:00
parent c2c163b856
commit 6714caede8

View File

@@ -95,9 +95,12 @@ local output = function(parsed, lists)
for _, l in ipairs(lists) do for _, l in ipairs(lists) do
local v = parsed[l] local v = parsed[l]
local a = v:len() > 0 and stdnse.strsplit(",", v) or {} local a = v:len() > 0 and stdnse.strsplit(",", v) or {}
local e = { ["name"] = l .. " (" .. #a .. ")" } local e
if nmap.verbosity() > 0 then if nmap.verbosity() > 0 then
e = { ["name"] = l .. " (" .. #a .. ")" }
table.insert(e, a) table.insert(e, a)
else
e = l .. " (" .. #a .. ")"
end end
table.insert(out, e) table.insert(out, e)
end end