Performance problem (maybe endless loop?) with large script
dfyx opened this issue · comments
Out of curiosity, I've tried deobfuscating https://dokicloud.one/js/player/prod/e4-player.min.js?v=1680944325
It outputs the following relatively quickly, then works for a few minutes without any output before it reaches the memory limit and crashes.
$ restringer e4-player.min.js -o e4-player.restring.js
[+] Obfuscation type is augmented_proxied_array_function_replacements
[+] ==> Cycle 1 completed in 37.081 seconds with no changes (292937 nodes)
I've increased the memory limit with NODE_OPTIONS="--max-old-space-size=8192"
, which didn't help much. It reached the 8GB after about 30 minutes on an i7-1260P, then crashed.
I gave 20gb ram , to 350 kb script :) used 18 o_O
If you still want to deobfuscate this script, give these a try which can handle more advanced obfuscator.io options:
- https://github.com/j4k0xb/webcrack (20s, including extracting the webpack modules)
- https://github.com/relative/synchrony (50s)
I re-ran it using REstringer v1.10.1 and it is no longer hangs.
It took me ~70 minutes with default Node settings (node v20.6.1) and the result was... hmm.. not good, but that's a different issue 😅