Reverse Uglified Javascript Code
Solution 1:
There is this awesome online tool, JSNice, that makes a great job of finding names to obfuscated variables.
We make even obfuscated JavaScript code readable. We will rename variables and parameters to names that we learn from thousands of open source projects. Furthermore, often we are also able to guess or infer type annotations.
Solution 2:
Chrome dev tools ability to Pretty Print
All you need to do is to click the "{ }" icon on the bottom toolbar to activate this feature. Of course the names will still be obfuscated ( depending on what program minfied the JavaScript in the first place ), but you will at least be able to set break points and debug the code.
source: point #2 in https://web.archive.org/web/20150418125316/http://www.elijahmanor.com/7-chrome-tips-developers-designers-may-not-know
Solution 3:
Depends on what options you used when you uglify your code. If you just remove the line breaks, then Chrome dev tools will be able to do a great work as sirinivas explained. But if you mangle the code, then ther is no way you can get the exact previous code. (in uglifying var logngvariable = a + b; becomes var c=a+b;. there is no way a tool can figure out the previous name logngvariable )
On the otherhand if you want an un-uglified code you may not uglify it at the first place... :)
Post a Comment for "Reverse Uglified Javascript Code"