|
|
@ -1275,8 +1275,9 @@ if True: |
|
|
i += 1 |
|
|
i += 1 |
|
|
return None |
|
|
return None |
|
|
|
|
|
|
|
|
hash_re = re.compile(r'createHash\\([\"\\']sha256[\"\\']\\)') |
|
|
|
|
|
sig_re = re.compile(r'^async function (\\w+)\\((\\w+)\\)') |
|
|
|
|
|
|
|
|
# 🔧 修复:避免 raw string + 单引号 + ['"] 字符组导致的语法错误;同时修正正则转义,提升 b6 特征匹配命中率 |
|
|
|
|
|
hash_re = re.compile(r"""createHash\(["']sha256["']\)""") |
|
|
|
|
|
sig_re = re.compile(r'^async function (\w+)\((\w+)\)') |
|
|
|
|
|
|
|
|
hash_matches = list(hash_re.finditer(window)) |
|
|
hash_matches = list(hash_re.finditer(window)) |
|
|
diag(f"marker_index={marker_index} window_len={len(window)} sha256_createHash={len(hash_matches)}") |
|
|
diag(f"marker_index={marker_index} window_len={len(window)} sha256_createHash={len(hash_matches)}") |
|
|
@ -1315,8 +1316,8 @@ if True: |
|
|
name, param = sm.group(1), sm.group(2) |
|
|
name, param = sm.group(1), sm.group(2) |
|
|
|
|
|
|
|
|
# 特征校验:sha256 + hex digest + return param ? raw : hash |
|
|
# 特征校验:sha256 + hex digest + return param ? raw : hash |
|
|
has_digest = re.search(r'\\.digest\\([\"\\']hex[\"\\']\\)', func_text) is not None |
|
|
|
|
|
has_return = re.search(r'return\\s+' + re.escape(param) + r'\\?\\w+:\\w+\\}', func_text) is not None |
|
|
|
|
|
|
|
|
has_digest = re.search(r"""\.digest\(["']hex["']\)""", func_text) is not None |
|
|
|
|
|
has_return = re.search(r'return\s+' + re.escape(param) + r'\?\w+:\w+\}', func_text) is not None |
|
|
if idx <= 3: |
|
|
if idx <= 3: |
|
|
diag(f"候选#{idx}: {name}({param}) len={len(func_text)} digest={has_digest} return={has_return}") |
|
|
diag(f"候选#{idx}: {name}({param}) len={len(func_text)} digest={has_digest} return={has_return}") |
|
|
if not has_digest: |
|
|
if not has_digest: |
|
|
|