PerimeterX / restringer

A Javascript Deobfuscator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

commented

If you still want to deobfuscate this script, give these a try which can handle more advanced obfuscator.io options:

Mine always hangs at that part, any solution?
I already tried --timeout=10000 --max-old-space-size=16384
image

Update:
I changed the options to a longer time but now it has the following error
image

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 😅