Files
exposedgays/deploy/check-avbeat-dns.py

19 lines
649 B
Python

#!/usr/bin/env python3
import paramiko
PASS = "Bbt9115xty9176!"
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect("10.10.0.10", username="localadministrator", password=PASS, timeout=30)
cmds = [
"dig @1.1.1.1 avbeat.com NS +short",
"dig @1.1.1.1 avbeat.com A +short",
"dig @1.1.1.1 avbeat.com CNAME +short",
"dig @1.1.1.1 www.avbeat.com CNAME +short",
"curl -sSI --max-time 10 https://avbeat.com/ | head -6",
]
for cmd in cmds:
print(f"\n=== {cmd} ===")
_, o, e = c.exec_command(cmd, timeout=20)
o.channel.recv_exit_status()
print((o.read() + e.read()).decode())
c.close()