mirror of
https://github.com/pysunday/rs-reverse.git
synced 2025-04-12 11:56:55 +08:00
fix: 适配更新
This commit is contained in:
parent
e5b1ad655c
commit
d0488986a1
@ -1,6 +1,6 @@
|
||||
module.exports = {
|
||||
cp0: 'gl}y|sMnyn}',
|
||||
cp2: 'g+*`-+`+0`.1`',
|
||||
cp0: 'qk`z}qodw}|`c~zw',
|
||||
cp2: 'wPPR`QO`OQONUP',
|
||||
globalText1: "'r2mKa'.length",
|
||||
globalText2: '&Ţfunction',
|
||||
}
|
||||
|
6
src/adapt/common/index.js
Normal file
6
src/adapt/common/index.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
cp0: 'qk`z}qodw}|`c~zw',
|
||||
cp2: 'wPPR`QO`OQONUP',
|
||||
globalText1: "'r2mKa'.length",
|
||||
globalText2: '&Ţfunction',
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
const fs = require('fs');
|
||||
const logger = require('@utils/logger');
|
||||
const unescape = require('@utils/unescape');
|
||||
|
||||
const adapts = fs.readdirSync(__dirname, { withFileTypes: true })
|
||||
@ -26,10 +27,10 @@ function findFullString(text, start, end) {
|
||||
}
|
||||
|
||||
module.exports = function(code, name) {
|
||||
const config = adapts[name] ? adapts[name] : adapts.cnipa;
|
||||
const idx = code.indexOf(config.cp2);
|
||||
const config = adapts[name] ? adapts[name] : adapts.common;
|
||||
return Object.entries(config).reduce((ans, [key, val]) => {
|
||||
const idx = code.indexOf(val);
|
||||
if (idx === -1) throw new Error(`${key}值数据未找到,请查看文档:src/adapt/readme.md`);
|
||||
if (code.indexOf(val, idx + val.length) > -1) throw new Error(`${key}对应的值${val}在代码中非唯一,请检查!`);
|
||||
const fullString = findFullString(code, idx, idx + val.length);
|
||||
return { ...ans, [key]: fullString };
|
||||
|
@ -18,7 +18,7 @@ module.exports = {
|
||||
cp0: 'gl}y|sMnyn}',
|
||||
cp2: 'g+*`-+`+0`.1`',
|
||||
globalText1: "'r2mKa'.length",
|
||||
globalText2: '&Ţfunction',
|
||||
globalText2: 'function ā(ā){',
|
||||
}
|
||||
```
|
||||
|
||||
|
6
src/adapt/riversecurity/index.js
Normal file
6
src/adapt/riversecurity/index.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
cp0: 'gl}y|sMnyn}',
|
||||
cp2: 'g+*`-+`+0`.1`',
|
||||
globalText1: "'r2mKa'.length",
|
||||
globalText2: 'function ā(ā){',
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user