15 lines
556 B
Python
15 lines
556 B
Python
import requests
|
|
import paramiko
|
|
|
|
# Let's inspect the technitium zone via SSH or API
|
|
client = paramiko.SSHClient()
|
|
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
client.connect("140.44.4.11", username="root", key_filename=r"C:\Users\Snarf\.ssh\id_ed25519_snarfnet", timeout=10)
|
|
|
|
cmd = 'k3s kubectl exec -n dns deploy/technitium-dns -c technitium-dns -- find /etc/dns/zones -type f -exec grep -H "shipyardcontrol" {} + || true'
|
|
stdin, stdout, stderr = client.exec_command(cmd)
|
|
print("Zone file check:", stdout.read().decode())
|
|
|
|
client.close()
|
|
|