somehow fix the no resolver issue

master
parent 2988e70c7f
commit 6f8ddd4cb8
  1. 6
      DNSLG/Resolver.py

@ -143,16 +143,18 @@ class Resolver(object):
dns.inet.af_for_address(ns)
except ValueError:
try:
res = list(dns.resolver.resolve(ns, 'aaaa'))
self.nameservers.extend(
res.to_text() for res in dns.resolver.query(ns, 'aaaa')
target.to_text() for target in res
)
except:
# TODO: Add error handling here
pass
try:
res = list(dns.resolver.resolve(ns, 'a'))
self.nameservers.extend(
res.to_text() for res in dns.resolver.query(ns, 'a')
target.to_text() for target in res
)
except:
pass

Loading…
Cancel
Save