Files
aios/services/aios-v1r1-wechat-outbound-worker/discovery.py
T

29 lines
779 B
Python

#!/usr/bin/env python3
"""V1R1 Personal WeChat Endpoint Discovery
Helps locate active V1R1 personal WeChat runtime endpoints on the host.
"""
import subprocess
import re
CANDIDATES = [8788, 8789, 8790, 8088, 8000]
print("[AIOS] Scanning for V1R1 WeChat endpoints...")
for port in CANDIDATES:
try:
result = subprocess.run(
["bash", "-lc", f"ss -ltnp | grep {port}"],
capture_output=True,
text=True
)
if result.stdout:
print(f"[FOUND] Port {port}: {result.stdout.strip()}")
else:
print(f"[MISS] Port {port}")
except Exception as e:
print(f"[ERROR] Port {port}: {e}")
print("[AIOS] Discovery complete. Please map discovered endpoint to AIOS_V1R1_WECHAT_OUTBOUND_URL")