mirror of
https://github.com/nmap/nmap.git
synced 2026-11-20 08:40:36 +08:00
Do not attempt recursion for version.bind/id.server lookups
This commit is contained in:
+1
-1
@@ -292,7 +292,7 @@ end
|
||||
-- * <code>retAll</code>: Return all answers, not just the first.
|
||||
-- * <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>noauth</code>: If true, do not try to find authoritative server
|
||||
-- * <code>noauth</code>: If true, do not try to find authoritative server (i.e. do not perform a recursive lookup)
|
||||
-- * <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>id</code>: numeric value to use for the DNS transaction id
|
||||
|
||||
+10
-2
@@ -78,7 +78,11 @@ end
|
||||
action = function(host, port)
|
||||
local result = stdnse.output_table()
|
||||
local flag = false
|
||||
local status, resp = dns.query("id.server", {host = host.ip, port=port.number, proto=port.protocol, dtype='TXT', class=dns.CLASS.CH, retAll=true, retPkt=true, nsid=true, dnssec=true})
|
||||
local status, resp = dns.query("id.server", {
|
||||
host = host.ip, port=port.number, proto=port.protocol,
|
||||
dtype='TXT', class=dns.CLASS.CH,
|
||||
retAll=true, retPkt=true, nsid=true, norecurse=true, noauth=true, dnssec=true
|
||||
})
|
||||
if ( status ) then
|
||||
local status, nsid = rr_filter(resp.add,'OPT')
|
||||
if ( status ) then
|
||||
@@ -98,7 +102,11 @@ action = function(host, port)
|
||||
result["id.server"] = id_server
|
||||
end
|
||||
end
|
||||
local status, bind_version = dns.query("version.bind", {host = host.ip, port=port.number, proto=port.protocol, dtype='TXT', class=dns.CLASS.CH})
|
||||
local status, bind_version = dns.query("version.bind", {
|
||||
host = host.ip, port=port.number, proto=port.protocol,
|
||||
dtype='TXT', class=dns.CLASS.CH,
|
||||
retAll=true, norecurse=true, noauth=true
|
||||
})
|
||||
if ( status ) then
|
||||
flag = true
|
||||
result["bind.version"] = bind_version
|
||||
|
||||
Reference in New Issue
Block a user