mirror of
https://github.com/pysunday/rs-reverse.git
synced 2025-04-22 04:35:26 +08:00
28 lines
856 B
JavaScript
28 lines
856 B
JavaScript
const paths = require('@utils/paths');
|
|
const fs = require('fs');
|
|
const {
|
|
init,
|
|
ascii2string,
|
|
} = require('../src/handler/parser/');
|
|
const tsFullPath = paths.exampleResolve('codes', '1-$_ts-full.json');
|
|
init(JSON.parse(fs.readFileSync(tsFullPath, 'utf8')));
|
|
const gv = require('@src/handler/globalVarible');
|
|
|
|
const valueMap = {
|
|
'1698026159': ascii2string(gv.keys[gv.cp2[101]]),
|
|
'2098631147': ascii2string(gv.keys[gv.cp2[15]]),
|
|
'4': ascii2string(gv.keys[gv.cp2[4]]),
|
|
'47': ascii2string(gv.keys[gv.cp2[35]]),
|
|
'52': ascii2string(gv.keys[gv.cp2[81]]),
|
|
'_$dV': ascii2string(gv.keys[gv.cp2[146]]),
|
|
'_$_i': ascii2string(gv.keys[gv.cp2[70]]),
|
|
'_$hv': ascii2string(gv.keys[gv.cp2[1]]),
|
|
'_$go': ascii2string(gv.keys[gv.cp2[48]]),
|
|
}
|
|
|
|
test('test r2mka', () => {
|
|
Object.entries(valueMap).forEach(([tb, ex]) => {
|
|
expect(tb).toBe(ex);
|
|
})
|
|
});
|