ben-sb / javascript-deobfuscator

General purpose JavaScript deobfuscator
https://deobfuscate.io
Apache License 2.0
786 stars 112 forks source link

Can I have renamed identifiers annotated with the original? #20

Closed issuefiler closed 2 years ago

issuefiler commented 2 years ago

Deobfuscate.io, this is so useful! Keep it up!

But finding the renamed (deobfuscated) function with the original (obfuscated) function name is tricky. I’m doing dynamic analysis (“working on the obfuscated code”) on a live webpage, so ease of matching the obfuscated with the deobfuscated is a kind of necessity.

Can I get results like this?

function mikalia/*_0x2f18fb*/(kuulei, ajacia) {…}
ben-sb commented 2 years ago

I've added access to the variable name mapping in 11e2e30 (the getNameMapping function of the VariableRenamer modification will return an object mapping the new variable names back to their original names).

Unfortunately the parser and AST used for this project are a bit outdated and don't play nicely with comments so adding them inline like that doesn't work well.

ben-sb commented 2 years ago

Closing due to inactivity