diff --git a/monitor.py b/monitor.py index 003e659..2e6010c 100644 --- a/monitor.py +++ b/monitor.py @@ -4937,6 +4937,16 @@ class MessageMonitor: if _match_count >= 2: logger.debug(f"[ocr] 过滤器2结果: 检测到多个协议特征词({_match_count}个),返回True: {text[:60]!r}") return True + # ⭐ 混合文字乱码检测:OCR将不同行/区域的文字混在一起 + # 如"HHWH尸端自哪内柙登录槟J!" — Latin大写字母散落在CJK字符中间 + # 正常聊天中Latin缩写是连续块(如"登录PHP服务器"、"GTA5玩家") + # 乱码特征:Latin大写被CJK分割成多个不连续块(≥2组) + if re.search(r'[A-Z]', text) and re.search(r'[\u4e00-\u9fff]', text): + _upper_groups = len(re.findall(r'[A-Z]+', text)) + if _upper_groups >= 2: + logger.debug(f"[ocr] 过滤器2结果: 检测到混合文字乱码({_upper_groups}组大写字母分散)," + f"返回True: {text[:60]!r}") + return True # ⭐ Task #1457: 360安全弹窗内容过滤(防误触发查库+回复) # 360安全卫士/杀毒弹窗常被OCR识别为用户消息,如"这是敲诈病毒,会勒索您的钱财" # 以下关键词覆盖360常见报毒/安全警告弹窗 diff --git a/unicode_radicals.md b/unicode_radicals.md index 32e8edc..21769de 100644 --- a/unicode_radicals.md +++ b/unicode_radicals.md @@ -218,8 +218,8 @@ | 丿 | U+4E3F | 撇 | 儿→丿 | 儿 | | 丨 | U+4E28 | 竖 | 中→丨 | 中 | | 虱 | U+8671 | 虱 | 虱→搁 | 虱 | -| 凵 | U+51F5 | 凵 | 凵→儿| 凵 -| 乍 | U+4E4D | 作 | 乍→作 | 乍 +| 凵 | U+51F5 | 凵 | 凵→儿 | 凵 | +| 乍 | U+4E4D | 作 | 乍→作 | 乍 | ## 使用说明