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>
23 lines
932 B
Python
23 lines
932 B
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()
|
|
|
|
for cmd in [
|
|
"systemctl is-active douyinweb-pb pocketbase hackrobot-pb tiktok-promo-pocketbase xauto-pocketbase robook-pb 2>/dev/null",
|
|
"ls -la /opt/douyinWEB/pb/pocketbase /opt/pocketbase/pocketbase 2>/dev/null",
|
|
"readlink -f /proc/$(systemctl show -p MainPID --value douyinweb-pb 2>/dev/null)/exe 2>/dev/null || echo no-pb",
|
|
"python3 -c \"import bcrypt; print(bcrypt.hashpw(b'Xiao4669805@', bcrypt.gensalt(rounds=10)).decode())\" 2>&1",
|
|
]:
|
|
print("===", cmd[:90])
|
|
print(run(cmd))
|
|
print()
|
|
|
|
c.close()
|