rbsec/dnscan

Resolver module issue

mmiss-dionach opened this issue · 3 comments

Hi,

I'm no longer able to run dnscan due to the following error:

:~/dnscan$ python3 dnscan.py -d test.com
Traceback (most recent call last):
  File "dnscan.py", line 349, in <module>
    resolver.resolve('.', 'NS')
AttributeError: 'Resolver' object has no attribute 'resolve'

I tried to update dnspython and install dsnpython3, but I still have the same error, with python2 and python3.

I googled a lot to find a potential fix, without success.

rbsec commented

Hi,

The resolver.query() method that dnscan was previously using was deprecated in version 2.0 of dnspython, so I updated dnscan to use the newer resolver.resolve() method instead.

If you had the module installed through your package manager it would probably have worked, but if you were installing it through pip then the requirements.txt still had the old version, so that's probably what was causing it to fail.

If you pull the latest version and reinstall the requirements (pip install -r requirements.txt or install the python3-dnspython) package then it should work. If not, can you let me know what version of dnspython you have installed?

Hi, I installed the latest version of dnspython and it's working like a charm.

Thanks a lot for the quick fix! :)

switch import dns.resolver to from dns import resolver