From 2224d404c73b4761951874eb0d07f6e85bcb6d24 Mon Sep 17 00:00:00 2001 From: Mike Eriksson Date: Mon, 7 Dec 2020 08:54:29 +0000 Subject: [PATCH] Fixed deprecation warning --- gasmask.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gasmask.py b/gasmask.py index 52888aa..02f6c91 100644 --- a/gasmask.py +++ b/gasmask.py @@ -577,7 +577,7 @@ def _query(value, dnsserver, record): myresolver.nameservers = [dnsserver] try: - answers = myresolver.query(value, record) + answers = myresolver.resolve(value, record) for answer in answers: # TODO check: this for loop is returning on first loop if record == 'NS': @@ -624,7 +624,7 @@ def ReverseIPQuery(value, dnsserver): revname = reversename.from_address(value) myresolver = dns.resolver.Resolver() myresolver.nameservers = [dnsserver] - return str(myresolver.query(revname, 'PTR')[0]).rstrip('.') + return str(myresolver.resolve(revname, 'PTR')[0]).rstrip('.') except Exception as e: print(e) return ''