mirror of
https://github.com/nmap/nmap.git
synced 2026-02-08 22:46:34 +00:00
Fix a crash on dns.query failure in dns-client-subnet-scan. Fixes #93
This commit is contained in:
@@ -324,7 +324,7 @@ local get_addresses = function(address, mask, domain, nameserver, port)
|
||||
local subnet = { family = nmap.address_family(), address = address, mask = mask }
|
||||
local status, resp = dns.query(domain, {host = nameserver, port=port.number, protocol=port.protocol, retAll=true, subnet=subnet})
|
||||
if ( not(status) ) then
|
||||
return
|
||||
return {}
|
||||
end
|
||||
if ( "table" ~= type(resp) ) then resp = { resp } end
|
||||
return resp
|
||||
|
||||
Reference in New Issue
Block a user