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>
32 lines
1.4 KiB
Python
32 lines
1.4 KiB
Python
# -*- coding: utf-8 -*-
|
|
import paramiko
|
|
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect("107.173.30.245", 22, "root", "Xiao4669805", timeout=30, allow_agent=False, look_for_keys=False)
|
|
|
|
def run(cmd, timeout=180):
|
|
_, o, e = c.exec_command(cmd, timeout=timeout)
|
|
return (o.read().decode("utf-8", "replace") + e.read().decode("utf-8", "replace")).strip()
|
|
|
|
cmds = [
|
|
"systemctl cat douyinweb-pb.service 2>/dev/null",
|
|
"grep -rni 'auth\\|login\\|admin' /opt/tiktokWEB/backend/app/config.py /opt/tiktokWEB/backend/app/main.py 2>/dev/null | head -20",
|
|
"head -40 /opt/tiktokWEB/backend/app/config.py 2>/dev/null",
|
|
"cat /opt/ntfy/server.yml 2>/dev/null",
|
|
"sqlite3 /opt/umami/ 2>/dev/null; docker exec umami-db-1 psql -U umami -d umami -c \"select username from \"user\" limit 5;\" 2>/dev/null",
|
|
"/opt/wauto/pocketbase/pocketbase superuser list 2>/dev/null || echo 'no list cmd'",
|
|
"/opt/pocketbase/pocketbase superuser upsert --help 2>&1 | head -15",
|
|
"/opt/tiktokWEB/pocketbase/pocketbase superuser upsert --help 2>&1 | head -10",
|
|
"ls /opt/tiktokWEB/pocketbase/ 2>/dev/null",
|
|
"systemctl cat tiktok-promo-pocketbase.service 2>/dev/null",
|
|
"systemctl cat xauto-pocketbase.service 2>/dev/null",
|
|
"grep -rni 'site.*login\\|admin_user\\|session_auth' /opt/tiktokWEB/backend 2>/dev/null | head -15",
|
|
]
|
|
|
|
for cmd in cmds:
|
|
print("\n===", cmd[:95], "===")
|
|
print(run(cmd)[:3500])
|
|
|
|
c.close()
|