mirror of
https://github.com/nmap/nmap.git
synced 2026-01-03 05:09:14 +00:00
Avoid a crash when host has no domain configured
This commit is contained in:
@@ -151,7 +151,10 @@ local function dnsDiscover()
|
||||
-- first get all unique domain names
|
||||
if ( not(name:match("in%-addr.arpa$")) ) then
|
||||
local domain = name:match("^[^%.]-%.(.*)$")
|
||||
domains[domain] = true
|
||||
-- Check that the name has a domain component
|
||||
if domain then
|
||||
domains[domain] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user