#!/usr/bin/env python3 import paramiko def q(host, pw, cmd): c = paramiko.SSHClient(); c.set_missing_host_key_policy(paramiko.AutoAddPolicy()) c.connect(host, username='eric', password=pw, timeout=15) _, o, e = c.exec_command(cmd, timeout=60, get_pty=True) r = (o.read()+e.read()).decode('utf-8','replace'); c.close(); return r pw = '4669805' for host in ['10.88.0.4', '10.88.0.5']: print('\n===', host, '===') for cmd in [ 'find /home/eric /opt/live -maxdepth 4 -name d2ypp2-src -type d 2>/dev/null', 'find /home/eric /opt/live -maxdepth 5 -name hardware.env 2>/dev/null', 'find /home/eric /opt/live -maxdepth 5 -name system-stack.env 2>/dev/null', 'ps auxww | grep "ffmpeg.*rtmps" | grep -v grep | head -1 | grep -oE "scale=[^ ]+|libx264|copy|video_mode" || ps auxww | grep ffmpeg | grep rtmps | grep -v grep | head -c 300', "curl -sS -m 5 'http://127.0.0.1:9999/proxies' 2>/dev/null | python3 -c \"import sys,json;d=json.load(sys.stdin);p=d.get('proxies',{});g=p.get('\\U0001f680 \\u8282\u70b9\u9009\u62e9') or p.get('GLOBAL') or {};print('selected=',g.get('now'));print('all=',list(p.keys())[:8])\" 2>/dev/null || echo no_clash_api", 'grep -r SHELLCRASH_NEKO_PROXY_NODE /home/eric /opt/live/config 2>/dev/null | head -5', ]: print('>', cmd[:75]) print(q(host, pw, cmd)[:1200].encode('ascii','backslashreplace').decode())