douyinWEB/scripts/_audit_server_admins2.py
eric d409e416da Ship physical dual-edge stack, Studio CDP live metrics, and ops tooling.
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>
2026-09-04 22:42:40 -05:00

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=120):
_, o, e = c.exec_command(cmd, timeout=timeout)
return (o.read().decode("utf-8", "replace") + e.read().decode("utf-8", "replace")).strip()
cmds = [
"grep -iE 'ADMIN|USER|PASS|AUTH|hackrobot' /opt/douyinWEB/backend/.env 2>/dev/null | grep -vi oauth",
"grep -iE 'ADMIN|USER|PASS|AUTH|hackrobot' /opt/wauto/.env 2>/dev/null | head -20",
"find /opt/wauto /opt/xauto /opt/tiktokWEB /opt/douyinWEB /opt/robook -maxdepth 3 -name '.env' -o -name '*.env' 2>/dev/null",
"cat /opt/tiktokWEB/.env 2>/dev/null | grep -iE 'admin|user|pass|auth' | grep -vi oauth",
"cat /opt/xauto/.env 2>/dev/null | grep -iE 'admin|user|pass|auth' | grep -vi oauth",
"systemctl cat hackrobot-web.service 2>/dev/null | head -30",
"systemctl cat nomadro.service 2>/dev/null | head -30",
"ls /opt/wauto 2>/dev/null | head -20",
"grep -rni 'hackrobot\\|ADMIN_PASS\\|admin_password' /opt/wauto 2>/dev/null | head -20",
"cat /opt/umami/.env 2>/dev/null; ls /opt/umami/",
"docker inspect umami-umami-1 --format '{{range .Config.Env}}{{println .}}{{end}}' 2>/dev/null | grep -iE 'admin|user|pass|hash'",
"cat /opt/pocketbase 2>/dev/null; ls /opt/pocketbase/",
"grep -rni 'admin' /opt/douyinWEB/backend/.env /opt/pocketbase 2>/dev/null | head -15",
]
for cmd in cmds:
print("\n===", cmd[:100], "===")
print(run(cmd))
c.close()