fix: 空渠道检测改用JSONObject.has + 移除gitignore误排除manifest

This commit is contained in:
LukeMackin
2026-07-19 23:10:03 +08:00
parent ffd05e3e17
commit a96560966c
33 changed files with 891 additions and 6 deletions

35
search_text.py Normal file
View File

@@ -0,0 +1,35 @@
"""
Search for readable ASCII strings in the decoded text from screen.png.
"""
import sys
import re
path = r"D:\Yuzu-GCA\screen.png"
with open(path, 'rb') as f:
raw = f.read()
# Decode as UTF-16 LE
text = raw.decode('utf-16-le')
# Find all printable ASCII sequences of length >= 4
matches = re.findall(r'[ -~]{4,}', text)
print(f"Found {len(matches)} ASCII strings of length >= 4")
print("\n=== First 60 matches ===")
for i, m in enumerate(matches[:60]):
print(f" [{i}] '{m}'")
# Also search for specific patterns
patterns = ['OTA', 'update', 'download', 'install', 'version', 'error', 'fail',
'success', 'manifest', 'SHA256', 'verify', 'check', '完成', '下载',
'安装', '校验', '版本', '测试', '日志']
print("\n=== Pattern search ===")
for p in patterns:
count = text.count(p)
if count > 0:
# Find context around first occurrence
idx = text.find(p)
start = max(0, idx - 30)
end = min(len(text), idx + len(p) + 50)
ctx = text[start:end].encode('ascii', errors='replace').decode('ascii')
print(f" '{p}' found {count} times. First context: ...{ctx}...")