Skip to content

Commit

Permalink
Merge pull request #318 from McFacePunch/disable_check_nxdomain
Browse files Browse the repository at this point in the history
  • Loading branch information
L1ghtn1ng authored Oct 18, 2024
2 parents 2ed988e + 1eeb68f commit 36b610b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dnsrecon/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1631,6 +1631,9 @@ def main():
help='Continue brute forcing a domain even if a wildcard record is discovered.',
action='store_true',
)
parser.add_argument(
'--disable_check_nxdomain', help='Disables check for NXDOMAIN hijacking on name servers.', action='store_true'
)
parser.add_argument(
'--disable_check_recursion',
help='Disables check for recursion on name servers',
Expand Down Expand Up @@ -1790,8 +1793,9 @@ def main():
# Exit if we cannot resolve it
print_error(f"Could not resolve NS server provided and server doesn't appear to be an IP: {entry}")

if check_nxdomain_hijack(socket.gethostbyname(entry)):
continue
if not arguments.disable_check_nxdomain:
if check_nxdomain_hijack(socket.gethostbyname(entry)):
continue

if netaddr.valid_glob(entry):
ns_server.append(entry)
Expand Down

0 comments on commit 36b610b

Please sign in to comment.