mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Avoid a crash when host has no domain configured
This commit is contained in:
parent
adfe806099
commit
5be0ac591b
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue