22 lines
506 B
Python
22 lines
506 B
Python
import subprocess
|
|
|
|
dns_servers = [
|
|
'14.4.4.1',
|
|
'140.44.4.65',
|
|
'14.4.4.44',
|
|
'140.44.4.1',
|
|
'140.44.4.70',
|
|
'140.44.4.71',
|
|
'1.1.1.1',
|
|
'8.8.8.8'
|
|
]
|
|
|
|
for server in dns_servers:
|
|
try:
|
|
cmd = f"nslookup argo.snarfnet.net {server}"
|
|
res = subprocess.run(cmd, capture_output=True, text=True, shell=True, timeout=5)
|
|
print(f"=== DNS Server {server} ===")
|
|
print(res.stdout.strip())
|
|
except Exception as e:
|
|
print(f"Server {server} failed: {e}")
|