feat(dns): point snarfhome.snarfnet.net to 14.4.4.20 and remove Nabu Casa redirection
This commit is contained in:
22
scripts/get_technitium_snarfhome.py
Normal file
22
scripts/get_technitium_snarfhome.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import paramiko
|
||||
import json
|
||||
|
||||
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 = """python3 -c '
|
||||
import urllib.request, json
|
||||
login_data = json.loads(urllib.request.urlopen("http://10.43.117.221:5380/api/user/login?user=admin&pass=snarfnetadmin").read().decode())
|
||||
token = login_data["token"]
|
||||
rec_url = f"http://10.43.117.221:5380/api/zones/records/get?token={token}&domain=snarfnet.net&zone=snarfnet.net&listZone=true"
|
||||
records = json.loads(urllib.request.urlopen(rec_url).read().decode())
|
||||
for r in records.get("response", {}).get("records", []):
|
||||
if "home" in r.get("name", "") or "snarf" in r.get("name", ""):
|
||||
print(r)
|
||||
'"""
|
||||
|
||||
stdin, stdout, stderr = client.exec_command(cmd)
|
||||
print(stdout.read().decode())
|
||||
print(stderr.read().decode())
|
||||
client.close()
|
||||
Reference in New Issue
Block a user