fix DeprecationWarning in nslookup module

This commit is contained in:
jkhsjdhjs 2023-07-17 01:10:17 +00:00
parent 5cbcb2e6f2
commit 3c49d4ecd1

View File

@ -6,7 +6,7 @@ def nslookup(domain, typ="A"):
result = ""
rcount = 0
try:
answer = dns.resolver.query(domain, typ)
answer = dns.resolver.resolve(domain, typ)
for rdata in answer:
if rcount > 0:
result += "\n"