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
read_png.py Normal file
View File

@@ -0,0 +1,35 @@
"""
Read screen.png as UTF-16 LE text and save decoded text to file.
"""
import sys
path = r"D:\Yuzu-GCA\screen.png"
out_path = r"D:\Yuzu-GCA\screen_decoded.txt"
# Read raw bytes
with open(path, 'rb') as f:
raw = f.read()
print(f"File size: {len(raw)} bytes")
# Decode as UTF-16 LE (skip BOM)
text = raw.decode('utf-16-le')
print(f"Decoded text length: {len(text)} characters")
# Write full decoded text to file
with open(out_path, 'w', encoding='utf-8') as f:
f.write(text)
print(f"Full decoded text written to: {out_path}")
# Print first 3000 chars (replace non-printable)
safe_text = text[:3000].encode('ascii', errors='replace').decode('ascii')
print("\n=== First 3000 characters (non-ASCII replaced) ===")
print(safe_text)
# Search for specific keywords
keywords = ['manifest', 'download', 'SHA256', 'verify', 'install', 'OTA', 'version', 'error', 'fail', 'success', 'pass', 'update', '下载', '校验', '安装', '版本']
print("\n=== Keyword search ===")
for kw in keywords:
count = text.count(kw)
if count > 0:
print(f"'{kw}' found {count} times")