因此,我正在解密javascript代码,并且在互联网上寻找了很长时间之后,我不知道如何快速解密这种方法。
代码从一个大数组开始,其中包含整个脚本的所有字符串。
var _$_21e2 = ["jQuery", "userAgent", "test", "onmouseup", "onmousemove", "pink", "greenyellow", "gold"]
[数组中有更多字符串,但这仅是示例。
然后在其余的代码中,它只是通过ID调用数组中的字符串。
_$_21e2[29]
我知道我可以手动完成此操作,但是大约有120个字符串,因此这样做会花费太多时间。有办法快速解密吗?预先感谢。
replace
将var _$_21e2 = ["jQuery", "userAgent", "test", "onmouseup", "onmousemove", "pink", "greenyellow", "gold"];
return code.replace(/\[_\$_21e2\[(\d+)\]\]/g, function(_, i) {
return "."+_$_21e2[i];
}).replace(/_\$_21e2\[(\d+)\]/g, function(_, i) {
return JSON.stringify(_$_21e2[i]);
});
作为字符串,这将产生带有人类可读属性名称和文字的代码字符串。