j4k0xb / webcrack

Deobfuscate obfuscator.io, unminify and unpack bundled javascript
https://webcrack.netlify.app
MIT License
647 stars 73 forks source link

Use quickjs-emscripten for vm across every platform #52

Closed mochaaP closed 5 months ago

mochaaP commented 5 months ago

As the title suggests. I've been using this approach for a while (https://git.sr.ht/~self/delance-builder/tree/9cf2a258e0e1e07d981075cf225b238c0e2a2111/item/transform/webcrack/index.ts#L24-28), and it works well on Node.js, browser and Bun.

j4k0xb commented 5 months ago

I initially used it for the same reasons, but unfortunately it is way slower so I switched: https://github.com/j4k0xb/webcrack/commit/07d8546a13d340ff258c27d9f89075e65279afbf for large scripts with RC4 String Array Encoding the difference was 1-2 minutes vs a few seconds iirc https://bellard.org/quickjs/bench.html image

The majority of ppl are probably using Node.js, so unless there's a better alternative I'd like to keep it the same for now with the option of passing a custom sandbox for use-cases like yours