webcrack icon indicating copy to clipboard operation
webcrack copied to clipboard

ReferenceError: <variable> is not defined

Open DevLARLEY opened this issue 6 months ago • 2 comments

Describe the bug

webcrack crashes when deobfuscating this file (I haven't found a single js deobfuscator that is able to resolve all obfuscated function calls)

Expected Behaviour

Not crash

Code

index.js.txt

Logs

log.txt

DevLARLEY avatar Jun 06 '25 19:06 DevLARLEY

Simpler example. Only works if we move the empty function and defineProperty variable into the inner deobfuscate function. Will throw the same error if this is not done, so it's likely the same reason the larger codebase is also failing to deobfuscate. The simpler script works fine in node.

resolve.js.txt

DevLARLEY avatar Jun 07 '25 14:06 DevLARLEY

Replacing __p_0675685366 with (() => {}) and __p_8649819683 with Object.defineProperty will prevent the errors but the resolving of obfuscation functions still doesn't really work.

webcrack_out.js.txt

DevLARLEY avatar Jun 07 '25 15:06 DevLARLEY