mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Fixed warning for newtargets in llmnr-resolve.nse.
This commit is contained in:
parent
d1662fe7b4
commit
fa1d29e617
1 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue