PDA

View Full Version : what's happened with this javaScript code



padidar
01-04-2009, 10:22 AM
Hi,
I just downloaded 2 Mootools.js files. both of them are version 1.1 and they do the same. but I wonder why first one is 72 KB and second one is 34 KB.

I want to know what's happen with the second file with less size, Is is compressed, Gziped, encrypted or something else and how can i do the reverse. I mean how can i convert a code like the one with 34 KB to the source file.

I attached both files and I really appreciate if some one can help me.

itsallkizza
01-04-2009, 10:32 AM
They're both compressed to some degree although the second one has been both fully compressed and obfuscated while the first one seems to be extra-space and randomly new-line compressed.

This site here is a favorite of mine and does a good job on your first js file: http://elfz.laacz.lv/beautify/

However, once a script file is obfuscated (variable and object names reduced), it's near-impossible to make sense of it unless you know specifically what's going on (or you have hours of spare time) and so your second JS file is a bit more difficult to decipher.