Capture Neko/WG/network hubs, Studio viewer charts, physical deploy docs, and one-shot scripts so VPS vs physical can be toggled later without losing WIP. Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
669 B
Python
15 lines
669 B
Python
# -*- coding: utf-8 -*-
|
|
import paramiko
|
|
import sys
|
|
|
|
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect("107.173.30.245", 4014, "eric", "4669805", timeout=45, allow_agent=False, look_for_keys=False)
|
|
remote = r"""
|
|
echo '4669805' | sudo -S -p '' bash -c 'ufw allow 52300:52363/tcp; ufw allow 52300:52363/udp; ufw allow 52000:52098/udp; ufw allow 52101:52199/udp; ufw allow 52201:52299/udp; ufw allow 52400:53999/udp; ufw status | grep -E "523|524|525|520|521|522" | head -20'
|
|
"""
|
|
_, o, e = c.exec_command(remote, timeout=60)
|
|
print((o.read() + e.read()).decode())
|
|
c.close()
|