问题
I am looking for way (preferably and online site) to a reverse Uglify of some javascript. The Website: http://jsbeautifier.org/ is great for minifed code, but it is does not do a great job for ugly stuff.
回答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.
回答2:
chrome dev tools also can do this.
point no 2 in http://www.elijahmanor.com/2011/08/7-chrome-tips-developers-designers-may.html
回答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... :)
回答4:
Despite isn't an online site, IMO the best choice is to install UglifyJS2 as command line tool.
It's as easy as
npm install uglify-js -g
and after this you can enter in your command line client
uglifyjs [input files] [options]
npm
Hope this helps.
Download
来源:https://stackoverflow.com/questions/18408535/reverse-uglified-javascript-code