Hacker News new | ask | show | jobs
by tshadwell 4084 days ago
Almost all Javascipt obfuscation schemes that I've come across in the wild can be defeated by Closure Compiler with advanced optimizations and pretty print turned on & if necessary a little extra manual intervention. It just optimizes out all the cruft. I'd like to see what it does to this code but the author hasn't provided a raw file.

Online closure compiler: http://closure-compiler.appspot.com

2 comments

I just tried running some jjencode'd js through your closure compiler and it didn't clean it up much at all.

http://utf-8.jp/public/jjencode.html

I did too - you need to poke around with the compiler settings.

For jjEncode's sample `alert("Hello, JavaScript" )`[0], the first step of the post's analysis is done for you[1], if you set closure compiler on "advanced mode".

That being said, double-jjEncoding the sample `alert("Hello, JavaScript" )` stumps the closure compiler.

[0] http://utf-8.jp/public/jjencode.html?src=alert(%22Hello%2C%2... [1] https://closure-compiler.appspot.com/code/jsc40b41f282d17ff7...

Line 1-5 is provided in copy 'n pasteable text. However it won't de obfuscate it enough imho.