mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Add support for returning non authoritative answers as packets
This commit is contained in:
@@ -204,7 +204,7 @@ local function processResponse( response, dname, dtype, options )
|
|||||||
else
|
else
|
||||||
return findNiceAnswer(dtype, rPkt, options.retAll)
|
return findNiceAnswer(dtype, rPkt, options.retAll)
|
||||||
end
|
end
|
||||||
else -- if not, ask the next server in authority
|
elseif ( not(options.noauth) ) then -- if not, ask the next server in authority
|
||||||
|
|
||||||
local next_server = getAuthDns(rPkt)
|
local next_server = getAuthDns(rPkt)
|
||||||
|
|
||||||
@@ -222,6 +222,8 @@ local function processResponse( response, dname, dtype, options )
|
|||||||
options.tries = options.tries - 1
|
options.tries = options.tries - 1
|
||||||
return query(dname, options)
|
return query(dname, options)
|
||||||
end
|
end
|
||||||
|
elseif ( options.retPkt ) then
|
||||||
|
return true, rPkt
|
||||||
end
|
end
|
||||||
|
|
||||||
-- nothing worked
|
-- nothing worked
|
||||||
@@ -241,6 +243,7 @@ end
|
|||||||
-- * <code>retAll</code>: Return all answers, not just the first.
|
-- * <code>retAll</code>: Return all answers, not just the first.
|
||||||
-- * <code>retPkt</code>: Return the packet instead of using the answer-fetching mechanism.
|
-- * <code>retPkt</code>: Return the packet instead of using the answer-fetching mechanism.
|
||||||
-- * <code>norecurse</code>: If true, do not set the recursion (RD) flag.
|
-- * <code>norecurse</code>: If true, do not set the recursion (RD) flag.
|
||||||
|
-- * <code>noauth</code>: If true, do not try to find authoritative server
|
||||||
-- * <code>multiple</code>: If true, expects multiple hosts to respond to multicast request
|
-- * <code>multiple</code>: If true, expects multiple hosts to respond to multicast request
|
||||||
-- * <code>flags</code>: numeric value to set flags in the DNS query to a specific value
|
-- * <code>flags</code>: numeric value to set flags in the DNS query to a specific value
|
||||||
-- * <code>id</code>: numeric value to use for the DNS transaction id
|
-- * <code>id</code>: numeric value to use for the DNS transaction id
|
||||||
|
|||||||
Reference in New Issue
Block a user