douyinWEB/scripts/_probe_new_vps4.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

21 lines
1016 B
Python

# -*- coding: utf-8 -*-
import sys
import paramiko
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect("192.227.152.110", 22, "root", "Leaf448772566", timeout=30, allow_agent=False, look_for_keys=False)
cmds = [
"ls -la /root/.acme.sh/'*.smallzhiyuns.com_ecc'/; echo ---; grep -n ssl_certificate /etc/nginx -r --include='*.conf' | head -40",
"ls /etc/nginx/stream.d 2>/dev/null; echo ---; grep -RIn server_name /etc/nginx --include='*.conf' | head -80",
"ss -lntp | awk '{print $4}' | sed 's/.*://' | sort -n | uniq | tr '\\n' ' '; echo",
"ss -lntp | grep -E ':80 |:443 |:8080|:8888|:8090|:8092|:8014|:4015|:8020|:8333|:9333' || true",
"ls /opt; echo ---; docker ps --format '{{.Names}} {{.Ports}}' | head -40",
]
for cmd in cmds:
print("\n===== ", cmd[:90], " =====")
_, o, e = c.exec_command(cmd, timeout=25)
print((o.read() + e.read()).decode("utf-8", "replace")[-7000:])
c.close()