mirror of
https://github.com/nmap/nmap.git
synced 2025-12-13 11:19:02 +00:00
Fixed warning for newtargets in llmnr-resolve.nse.
This commit is contained in:
@@ -31,7 +31,8 @@ For more information, see:
|
|||||||
--@output
|
--@output
|
||||||
-- Pre-scan script results:
|
-- Pre-scan script results:
|
||||||
-- | llmnr-query:
|
-- | 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()
|
prerule = function()
|
||||||
@@ -200,11 +201,12 @@ action = function()
|
|||||||
-- Check responses
|
-- Check responses
|
||||||
if #result > 0 then
|
if #result > 0 then
|
||||||
for _, response in pairs(result) do
|
for _, response in pairs(result) do
|
||||||
if target.ALLOW_NEW_TARGETS then target.add(response.address) end
|
|
||||||
table.insert(output, response.hostname.. " : " .. response.address)
|
table.insert(output, response.hostname.. " : " .. response.address)
|
||||||
end
|
end
|
||||||
if not target.ALLOW_NEW_TARGETS then
|
if target.ALLOW_NEW_TARGETS then
|
||||||
table.insert(result,"Use the newtargets script-arg to add the results as targets")
|
target.add(response.address)
|
||||||
|
else
|
||||||
|
table.insert(output,"Use the newtargets script-arg to add the results as targets")
|
||||||
end
|
end
|
||||||
return stdnse.format_output(true, output)
|
return stdnse.format_output(true, output)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user