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>
33 lines
1.7 KiB
Python
33 lines
1.7 KiB
Python
# -*- coding: utf-8 -*-
|
|
import sys
|
|
import time
|
|
|
|
import paramiko
|
|
|
|
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect("108.174.50.68", 22, "root", "Xiao4669805", timeout=45, allow_agent=False, look_for_keys=False)
|
|
time.sleep(20)
|
|
cmd = r"""
|
|
echo '=== sizes ==='
|
|
du -sh /opt/douyinWEB/backend/data/neko/profiles/1/Default/Extensions/dhdgffkkebhmkfjojejmpbldmpobfkfo
|
|
du -sh /opt/douyinWEB/backend/data/neko/profiles/1/Default/Local\ Extension\ Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo
|
|
du -sh /opt/douyinWEB/backend/data/neko/profiles/1/Default/Managed\ Extension\ Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo
|
|
ls -la /opt/douyinWEB/backend/data/neko/profiles/1/Default/Local\ Extension\ Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo | head
|
|
ls -la /opt/douyinWEB/backend/data/neko/profiles/1/Default/Managed\ Extension\ Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo | head
|
|
echo '=== script search ==='
|
|
grep -aR -l 'YouTube Studio Auto Dismiss' /opt/douyinWEB/backend/data/neko/profiles/1/Default 2>/dev/null | head || echo none
|
|
echo '=== chrome log TM/provision ==='
|
|
docker exec douyinweb-neko-1 sh -c 'grep -iE "tamper|provision|jsonImport|userscript|557378" /var/log/neko/google-chrome.log 2>/dev/null | tail -30'
|
|
echo '=== hash check ==='
|
|
cd /opt/douyinWEB/backend/neko && python3 render_tampermonkey_provisioning.py 2>/dev/null | tail -3
|
|
grep hash policies/policies.json
|
|
curl -fsS http://127.0.0.1:9200/ >/dev/null && echo neko_http_ok
|
|
"""
|
|
_i, o, e = c.exec_command(cmd, timeout=90)
|
|
o.channel.settimeout(90)
|
|
print(o.read().decode("utf-8", "replace"))
|
|
print(e.read().decode("utf-8", "replace")[:800])
|
|
c.close()
|