╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝
preg_replace 替换绕过 · file_get_contents / include 文件包含 · PHP 弱类型 专项训练
strpos 明文拦截 + 两次 preg_replace 过滤不同关键字 + === 全等比较strpos($code, 'ctf') !== false → 拦截明文 'ctf'(区分大小写)strpos($code, 'hack') !== false → 拦截明文 'hack'(区分大小写)$t1 = preg_replace('/ctf/i', '', $code); → 第一层:移除所有 ctf 变体$t2 = preg_replace('/hack/i', '', $t1); → 第二层:移除所有 hack 变体$t2 === 'pass_it'strpos 都是区分大小写的,但 preg_replace 用 /i 忽略大小写。用大写变体绕过 strpos,作为外壳包裹目标字符串。