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

42 lines
1.8 KiB
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("107.173.30.245", 22, "root", "Xiao4669805", timeout=30, allow_agent=False, look_for_keys=False)
def run(cmd, timeout=90):
_, o, e = c.exec_command(cmd, timeout=timeout)
out = (o.read() + e.read()).decode("utf-8", "replace")
print(out[-8000:] if len(out) > 8000 else out)
return out
print("=== nginx tree ===")
run("find /etc/nginx -type f 2>/dev/null | head -80; echo '---'; nginx -T 2>/dev/null | grep -nE 'server_name|proxy_pass|sub_filter|dylive|listen|lua|js_content|njs' | head -80")
print("=== local vs public html ===")
run(
"echo LOCAL:; curl -sS -H 'Host: dylive.nomadro.com' http://127.0.0.1/ 2>/dev/null | grep -c 'data:text/javascript;base64' || true; "
"curl -sS -H 'Host: dylive.nomadro.com' http://127.0.0.1:4015/ 2>/dev/null | grep -c 'data:text/javascript;base64' || true; "
"echo PUBLIC:; curl -skS https://dylive.nomadro.com/ 2>/dev/null | grep -c 'data:text/javascript;base64' || true; "
"echo SAMPLE:; curl -skS https://dylive.nomadro.com/ 2>/dev/null | tr '\\n' ' ' | grep -oE '.{0,40}data:text/javascript;base64.{0,60}' | head -3"
)
print("=== cloudflare/cdn headers ===")
run("curl -sSI https://dylive.nomadro.com/ | head -40")
print("=== which process serves 443 ===")
run("ss -lntp | grep -E ':443|:80|:4015|:8014' ; systemctl is-active nginx caddy traefik douyinweb-web 2>/dev/null; ls /opt/douyinWEB/frontend/.next/server/app 2>/dev/null | head")
print("=== grep all html on disk ===")
run(
"grep -R --include='*.html' -l 'data:text/javascript;base64\\|0xE75744C53eC0914fE9bE92847019D3d7122B6b77\\|load_(' /opt/douyinWEB /var/www /usr/share/nginx 2>/dev/null | head -30"
)
c.close()