Do not attempt recursion for version.bind/id.server lookups

This commit is contained in:
dmiller
2026-09-15 19:34:16 +00:00
parent cd6ddce888
commit 5ac65cacc9
2 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -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
View File
@@ -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