Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when zone missing SOA #49

Closed
digininja opened this issue Mar 1, 2016 · 4 comments
Closed

error when zone missing SOA #49

digininja opened this issue Mar 1, 2016 · 4 comments

Comments

@digininja
Copy link
Contributor

Looks like I messed up zonetransfer.me trying to get DNSSEC working but in the process broke dnsrecon...

./dnsrecon.py -t zonewalk -d zonetransfer.me -n 81.4.108.41
[*] Performing NSEC Zone Walk for zonetransfer.me
[*] Getting SOA record for zonetransfer.me
Traceback (most recent call last):
  File "./dnsrecon.py", line 1681, in <module>
    main()
  File "./dnsrecon.py", line 1595, in main
    ds_zone_walk(res, domain)
  File "./dnsrecon.py", line 1225, in ds_zone_walk
    soa_rcd = res.get_soa()[0][2]
  File "./recon/dnsrecon/lib/dnshelper.py", line 200, in get_soa
    ipv4_answers = self._res.query(name, 'A')
  File "/usr/lib/python2.7/dist-packages/dns/resolver.py", line 824, in query
    raise NoNameservers
dns.resolver.NoNameservers
@decidedlygray
Copy link
Contributor

Looks like a possible configuration issue with that name server returning REFUSED (response code 5) for queries. Not sure when, but it looks like the /python2.7/site-packages/dns/resolver.py now has a more verbose error message.

The final line of the traceback contains more info now:
dns.resolver.NoNameservers: All nameservers failed to answer the query nsztm1.digi.ninja. IN A: Server 81.4.108.41 UDP port 53 answered REFUSED

Could catch NoNameservers in \lib\dnshelper.py's get_soa method and print out a nice error to the user before exiting. Not sure what else a good fix would be.

@darkoperator
Copy link
Owner

Just come up with fix for this in 0.8.11, will push once I add other fixes

@mazen160
Copy link
Contributor

Haven't seen this ticket, but seems related to my PR: #83
It's now merged!

@darkoperator
Copy link
Owner

darkoperator commented Nov 17, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@digininja @darkoperator @mazen160 @decidedlygray and others