Files
workphone-sdk/sdk/tests/run_wx_hook_regression.sh

32 lines
1.3 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# 微信 Hook 离线回归套件WP-WX-01 / WP-WX-HOOK
#
# 真机铁律口径:本套件**仅离线回归**,验证 hook JS 分支逻辑 + 矩阵诚实性 +
# ACTION→RPC 静态对齐;**不替代**真机 Frida attach E2E。全绿仅表示"代码逻辑/口径未回退"。
#
# 用法bash sdk/tests/run_wx_hook_regression.sh
set -euo pipefail
cd "$(dirname "$0")/../.." # 工作手机 仓根
fail=0
echo "════════ 微信 Hook 离线回归 ════════"
echo "▸ [1/4] 转发逻辑forward / forwardMultiple / revoke 资格预检)"
node sdk/tests/test_forward_message_logic.mjs || fail=1
echo "▸ [2/4] 矩阵 companion 判定诚实性"
python3 sdk/tests/test_matrix_classifier_honesty.py || fail=1
echo "▸ [3/4] 防封限流逻辑AB-02/03/06"
python3 sdk/tests/test_rate_limiter_antiban.py || fail=1
echo "▸ [4/4] ACTION→RPC 静态对齐审计"
python3 sdk/scripts/wechat_interface_audit.py || fail=1
echo "════════════════════════════════════"
if [ "$fail" -ne 0 ]; then
echo "❌ 微信 Hook 回归未通过(见上方)"
exit 1
fi
echo "✅ 微信 Hook 离线回归全绿(仍须真机 Frida E2E 方可标功能 ✅)"