fix DeprecationWarning in nslookup module
This commit is contained in:
parent
5cbcb2e6f2
commit
3c49d4ecd1
|
@ -6,7 +6,7 @@ def nslookup(domain, typ="A"):
|
||||||
result = ""
|
result = ""
|
||||||
rcount = 0
|
rcount = 0
|
||||||
try:
|
try:
|
||||||
answer = dns.resolver.query(domain, typ)
|
answer = dns.resolver.resolve(domain, typ)
|
||||||
for rdata in answer:
|
for rdata in answer:
|
||||||
if rcount > 0:
|
if rcount > 0:
|
||||||
result += "\n"
|
result += "\n"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user