16 lines
357 B
Python
Executable File
16 lines
357 B
Python
Executable File
#!/usr/bin/python3
|
|
import dns.resolver
|
|
import dns.query
|
|
|
|
res = dns.resolver.Resolver()
|
|
res.timeout = 10
|
|
res.lifetime = 25
|
|
res.nameservers = ['192.168.86.50']
|
|
|
|
#results = res.query('blog.headdesk.me', 'A', tcp=True)
|
|
results = res.resolve('blog.headdesk.me', 'A', tcp=True)
|
|
print('Result:')
|
|
for line in results:
|
|
print(line.to_text())
|
|
|