mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
added Daniel's patch
This commit is contained in:
parent
00f48c547f
commit
2564f0bf03
1 changed files with 12 additions and 9 deletions
|
|
@ -216,16 +216,19 @@ local function query_for_hashes(host,subdomain,domain)
|
|||
local result
|
||||
local ranges = {}
|
||||
status, result = dns.query(subdomain, {host = host.ip, dtype='NSEC3', retAll=true, retPkt=true, dnssec=true})
|
||||
for _, nsec3 in ipairs(auth_filter(result, "NSEC3")) do
|
||||
h1 = string.lower(remove_suffix(nsec3.dname,domain))
|
||||
h2 = string.lower(nsec3.hash.base32)
|
||||
if not table_contains(all_results,"nexthash " .. h1 .. " " .. h2) then
|
||||
table.insert(all_results, "nexthash " .. h1 .. " " .. h2)
|
||||
stdnse.print_debug("nexthash " .. h1 .. " " .. h2)
|
||||
if status then
|
||||
for _, nsec3 in ipairs(auth_filter(result, "NSEC3")) do
|
||||
h1 = string.lower(remove_suffix(nsec3.dname,domain))
|
||||
h2 = string.lower(nsec3.hash.base32)
|
||||
if not table_contains(all_results,"nexthash " .. h1 .. " " .. h2) then
|
||||
table.insert(all_results, "nexthash " .. h1 .. " " .. h2)
|
||||
stdnse.print_debug("nexthash " .. h1 .. " " .. h2)
|
||||
end
|
||||
ranges[h1] = h2
|
||||
end
|
||||
ranges[h1] = h2
|
||||
end
|
||||
|
||||
else
|
||||
stdnse.print_debug(1, "DNS error: %s", result)
|
||||
end
|
||||
return ranges
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue