全项目扫描修复: Docker数据卷修复+安全requireAdmin+12页SEO+API白名单+脚本超时+常量提取+假数据删除

This commit is contained in:
ZhuiGuangAI Dev
2026-06-12 17:27:47 +08:00
parent 464924aea0
commit 4c325c8699
454 changed files with 33647 additions and 980 deletions
+30
View File
@@ -0,0 +1,30 @@
import re
import urllib.request
req = urllib.request.Request('https://www.zhuig.com/community', headers={'User-Agent': 'Mozilla/5.0', 'Cache-Control': 'no-cache'})
html = urllib.request.urlopen(req, timeout=15).read().decode('utf-8')
# 找所有 script 标签里的self.__next_f.push
scripts = re.findall(r'<script[^>]*>(self\.__next_f\.push.*?)</script>', html, re.DOTALL)
print(f'RSC push script 块数: {len(scripts)}')
for i, s in enumerate(scripts):
# 第一个字符切片, 找$12声明
if '"$12"' in s or '"$L12"' in s or '$12' in s:
# 找"$12":开头的声明
m = re.search(r'"\$?L?12":\s*"([^"]{0,500})', s)
if m:
print(f'\n=== Script {i} 含 $12 引用 (前500字符) ===')
print(m.group(1)[:500])
# 也找"children":"$12"
m2 = re.search(r'__html":\s*"(\$12|\$L12)"', s)
if m2:
print(f' Script {i} 在 __html 用 $12')
# 找所有包含"平台电商"的script
for i, s in enumerate(scripts):
if '平台电商' in s or '电商零售' in s:
idx = s.find('平台电商')
if idx == -1: idx = s.find('电商零售')
print(f'\n=== Script {i} 含"电商零售/平台电商" 位置{idx} ===')
print(s[max(0,idx-30):idx+300])