1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

Fixed warning for newtargets in llmnr-resolve.nse.

This commit is contained in:
kroosec
2012-08-15 01:09:04 +00:00
parent d1662fe7b4
commit fa1d29e617

View File

@@ -31,7 +31,8 @@ For more information, see:
--@output
-- Pre-scan script results:
-- | llmnr-query:
-- |_ acer-PC : 192.168.1.4
-- | acer-PC : 192.168.1.4
-- |_ Use the newtargets script-arg to add the results as targets
--
prerule = function()
@@ -200,11 +201,12 @@ action = function()
-- Check responses
if #result > 0 then
for _, response in pairs(result) do
if target.ALLOW_NEW_TARGETS then target.add(response.address) end
table.insert(output, response.hostname.. " : " .. response.address)
end
if not target.ALLOW_NEW_TARGETS then
table.insert(result,"Use the newtargets script-arg to add the results as targets")
if target.ALLOW_NEW_TARGETS then
target.add(response.address)
else
table.insert(output,"Use the newtargets script-arg to add the results as targets")
end
return stdnse.format_output(true, output)
end