Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what javascript obfuscation does angry birds use?

angry birds launched on the chrome web store (http://chrome.angrybirds.com)

their javascript code is obfuscated and it seems better than any js obfuscation i've seen so far.

i was wondering if anyone knew what they used or know of something comparable.

like image 448
joelnet Avatar asked May 12 '11 07:05

joelnet


3 Answers

It appears to be originally written in GWT -- makes sense, as there is a version running on Android which probably was written in Java...

Then optimized with the Closure Compiler in Advanced Mode (GWT supports that).

EDIT: OOOPS!

Not Advanced Mode. The output is NOT optimized by Closure Compiler's Advanced Mode. For example, symbols such as "null" are not aliased as in a Closure-obfuscated program. Also, things like "var J; var K;" will be shortened to "var J,K" by Closure. If-statements are still there which will mostly be eliminated by the compiler (replaced by && and || operators for shorter code). There also doesn't seem to be any flattening of properties or virtualizations done that are the hallmarks of the Closure Compiler.

It is difficult to check renaming of properties, as the code does not seem to be using a JavaScript library -- it looks vanilla JavaScript with DOM access.

WHAT IT LOOKS LIKE: GWT WITH CLOSURE COMPILER IN SIMPLE MODE

It looks like it has been minified by a normal JavaScript minifier. Looks like Closure Compiler in Simple Mode because:

  1. Variables are renamed to "a", "b" etc. -- a practice adopted by the Closure Compiler
  2. GWT is also a Google framework
  3. Line breaks in obfuscated code is not common but can be found in the Closure Compiler
like image 99
Stephen Chung Avatar answered Nov 10 '22 20:11

Stephen Chung


It really seems to be minification from Google CC. I would say it's at the same level as free version obfuscation at jscrambler.

like image 30
filipe Avatar answered Nov 10 '22 19:11

filipe


If I remember correctly from Google IO, and by taking a look at the source code, I am almost certain it was coded using Google Web Toolkit.

The whole project was coded in Java, then compiled and obfuscated to javascript.

like image 2
Nican Avatar answered Nov 10 '22 19:11

Nican