File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -1275,9 +1275,8 @@ if True:
12751275 i += 1
12761276 return None
12771277
1278- # 修复:避免 raw 单引号字符串中的 \\' 引发语法错误;并纠正正则转义以匹配实际 main.js 代码结构(与 Win 脚本逻辑对齐)
1279- hash_re = re.compile(r"createHash\(\s*['\"]sha256['\"]\s*\)")
1280- sig_re = re.compile(r'^async function (\w+)\((\w+)\)')
1278+ hash_re = re.compile(r'createHash\\([\"\\']sha256[\"\\']\\)')
1279+ sig_re = re.compile(r'^async function (\\w+)\\((\\w+)\\)')
12811280
12821281 hash_matches = list(hash_re.finditer(window))
12831282 diag(f"marker_index={marker_index} window_len={len(window)} sha256_createHash={len(hash_matches)}")
@@ -1316,8 +1315,8 @@ if True:
13161315 name, param = sm.group(1), sm.group(2)
13171316
13181317 # 特征校验:sha256 + hex digest + return param ? raw : hash
1319- has_digest = re.search(r"\ .digest\(\s*['\" ]hex['\"]\s*\)" , func_text) is not None
1320- has_return = re.search(r'return\s+' + re.escape(param) + r'\?\ w+:\w+ \}', func_text) is not None
1318+ has_digest = re.search(r'\\ .digest\\([\"\\' ]hex[\"\\']\\)' , func_text) is not None
1319+ has_return = re.search(r'return\\ s+' + re.escape(param) + r'\\?\\ w+:\\w+\ \}', func_text) is not None
13211320 if idx <= 3:
13221321 diag(f"候选#{idx}: {name}({param}) len={len(func_text)} digest={has_digest} return={has_return}")
13231322 if not has_digest:
Original file line number Diff line number Diff line change @@ -2002,9 +2002,8 @@ if True:
20022002 i += 1
20032003 return None
20042004
2005- # 修复:避免 raw 单引号字符串中的 \\' 引发语法错误;并纠正正则转义以匹配实际 main.js 代码结构(与 Win 脚本逻辑对齐)
2006- hash_re = re.compile(r"createHash\(\s*['\"]sha256['\"]\s*\)")
2007- sig_re = re.compile(r'^async function (\w+)\((\w+)\)')
2005+ hash_re = re.compile(r'createHash\\([\"\\']sha256[\"\\']\\)')
2006+ sig_re = re.compile(r'^async function (\\w+)\\((\\w+)\\)')
20082007
20092008 hash_matches = list(hash_re.finditer(window))
20102009 diag(f"marker_index={marker_index} window_len={len(window)} sha256_createHash={len(hash_matches)}")
@@ -2043,8 +2042,8 @@ if True:
20432042 name, param = sm.group(1), sm.group(2)
20442043
20452044 # 特征校验:sha256 + hex digest + return param ? raw : hash
2046- has_digest = re.search(r"\ .digest\(\s*['\" ]hex['\"]\s*\)" , func_text) is not None
2047- has_return = re.search(r'return\s+' + re.escape(param) + r'\?\ w+:\w+ \}', func_text) is not None
2045+ has_digest = re.search(r'\\ .digest\\([\"\\' ]hex[\"\\']\\)' , func_text) is not None
2046+ has_return = re.search(r'return\\ s+' + re.escape(param) + r'\\?\\ w+:\\w+\ \}', func_text) is not None
20482047 if idx <= 3:
20492048 diag(f"候选#{idx}: {name}({param}) len={len(func_text)} digest={has_digest} return={has_return}")
20502049 if not has_digest:
You can’t perform that action at this time.
0 commit comments