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>
33 lines
1.6 KiB
Python
33 lines
1.6 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-api.service 2>/dev/null",
|
|
"systemctl cat hackrobot-pb.service 2>/dev/null",
|
|
"systemctl cat pocketbase.service 2>/dev/null",
|
|
"systemctl cat tiktok-promo-backend.service 2>/dev/null | head -40",
|
|
"systemctl cat xauto-web.service 2>/dev/null | head -40",
|
|
"grep -rni 'ADMIN\\|hackrobot\\|password' /opt/wauto/deploy /opt/wauto/pocketbase 2>/dev/null | grep -iE 'env|admin|pass|email' | head -25",
|
|
"cat /opt/tiktokWEB/backend/.env 2>/dev/null | grep -iE 'admin|user|pass|auth' | grep -vi oauth | head -20",
|
|
"ls /opt/tiktokWEB/",
|
|
"grep -rni 'ADMIN_USERNAME\\|admin_password\\|hackrobot' /opt/tiktokWEB 2>/dev/null | head -20",
|
|
"grep -rni 'ADMIN_USERNAME\\|admin_password\\|hackrobot' /opt/xauto 2>/dev/null | head -20",
|
|
"cat /opt/umami/docker-compose.yml 2>/dev/null",
|
|
"cat /opt/ntfy/docker-compose.yml 2>/dev/null || ls /opt/ntfy/",
|
|
"cd /opt/douyinWEB/backend && .venv/bin/python -c \"from app import db; m=db.get_settings_map(); print('user', m.get('admin_username')); print('hash', (m.get('admin_password_hash') or '')[:16])\"",
|
|
]
|
|
|
|
for cmd in cmds:
|
|
print("\n===", cmd[:90], "===")
|
|
print(run(cmd)[:4000])
|
|
|
|
c.close()
|