dnsgraph
dnsgraph copied to clipboard
Does this work on Python 3?
It's not clear from the README which Python versions this supports.
@Flimm currently dnsgraph only works with Python 2, but I've just ported the command-line portions of it to work with Python 3 (see PR #4).
It still failed some times.
Traceback (most recent call last):
...
return zone.resolve(name, rdtype)
File "./tracegraph.py", line 105, in resolve
return self.resolvers.values()[0].resolve(name, rdtype=rdtype, register=False)
TypeError: 'dict_values' object does not support indexing
I had to change this on line 105:
return self.resolvers.values()[0].resolve(name, rdtype=rdtype, register=False)
for:
return list(self.resolvers.values())[0].resolve(name, rdtype=rdtype, register=False)
@LatinSuD thanks, I've updated my fork to include that and given you credit on the relevant commit. I accidentally deleted my branch, so the PR got closed, but I submitted a new PR.
@seveas would appreciate if you could merge this PR.
-- bye, pabs
https://bonedaddy.net/pabs3/
There is still one catch that just happened to me.
...
File "tracegraph.py", line 283, in resolve
self.ip = list(self.root.resolve(self.name, dns.rdatatype.A))
TypeError: 'NoneType' object is not iterable
What happened is that "resolve()" returned None.
A fix could be adding an IF like this:
resolvelist = self.root.resolve(self.name, dns.rdatatype.A)
if resolvelist:
self.ip = list(resolvelist)
@LatinSuD thanks, fixed in my branch.
-- bye, pabs
https://bonedaddy.net/pabs3/