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

34 lines
1.1 KiB
Python

# -*- coding: utf-8 -*-
import base64
import re
import sys
import urllib.request
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
url = "https://dylive.nomadro.com/"
html = urllib.request.urlopen(
urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"}), timeout=25
).read().decode("utf-8", "replace")
print("html_len", len(html))
ms = re.findall(r"data:text/javascript;base64,([A-Za-z0-9+/=]+)", html)
print("base64_scripts", len(ms))
for i, b in enumerate(ms):
dec = base64.b64decode(b).decode("utf-8", "replace")
print(f"===== SCRIPT {i} len={len(dec)} =====")
print(dec[:5000])
print("----- TAIL -----")
print(dec[-2000:])
# suspicious keywords
for kw in ["recaptcha", "powershell", "clipboard", "not a robot", "Verification", "eval(", "atob"]:
if kw.lower() in html.lower() or any(kw.lower() in base64.b64decode(b).decode("utf-8", "replace").lower() for b in ms):
print("HIT", kw)
scripts = re.findall(r'src=["\']([^"\']+)["\']', html)
print("SRC tags:")
for s in scripts:
if "script" in s or s.endswith(".js") or s.startswith("data:") or "http" in s:
print(" ", s[:200])