j4k0xb / webcrack

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

Now I know this is getting annoying, but when I deobfuscate it completely breaks this code. #17

Closed BotSolver closed 1 year ago

BotSolver commented 1 year ago

Describe the bug

Now I know this is getting annoying, but when I deobfuscate it completely breaks this code, that is suppose to support an html file but it only shows a white page now.

Expected Behaviour

deobfuscate without breaking it? I don't know exactly what's being removed, it's some value again

Code

https://cdn.discordapp.com/attachments/1139534194402414592/1142441118085152829/HoszeQA.js

Logs

here's the only log of an error.

Uncaught SyntaxError: Invalid or unexpected token options.bundle.js:23754
BotSolver commented 1 year ago

I understand getting spammed with issue is annoying personally lol

BotSolver commented 1 year ago

it's the same for this file too https://cdn.discordapp.com/attachments/1139534194402414592/1142455327443386518/8hP5VVc.js

BotSolver commented 1 year ago

once this is done this should be my last issue for today

j4k0xb commented 1 year ago

No problem lol, it's good if issues get fixed

I think it errors because of how unicode strings are printed

https://github.com/j4k0xb/webcrack/blob/fc63de1ee86c124a2660c50a821a07448a21ef7b/src/transforms/rawLiterals.ts#L7-L9

JSON is commonly thought to be a subset of JavaScript, but it isn't quite. Due to an unfortunate oversight, the raw characters U+2028 and U+2029 are permitted in JSON string literals, but not in JavaScript string literals. In JavaScript, they are interpreted as newlines and so having one in a string literal is a syntax error.

Maybe try if replacing both of them fixes it? image

BotSolver commented 1 year ago

oh it's all good now?

j4k0xb commented 1 year ago

not released yet does the script run fine with the workaround or is there any other error?

BotSolver commented 1 year ago

ohh wait, let me see

BotSolver commented 1 year ago

yeah it's all good