Reverse Engineering: the compressors code

A neglected issue in the context of Web2.0 is the protection of the source code. With a view Open Source, Web 2.0 is where its greatest expression in the beta, share and participate in the community surely leaves in the background issues related to the protection of the source code. Let us recall that the scripts are downloaded JavaScript into the browser from the Web Server, such as text files so that they are visible to the end user.
While the code server is protected by definition (it is impossible to access the code of a PHP page using the HTTP browser, except in rare cases malfuzionamento Web Server), client code may be subject to a Reverse Engineering.

However, there is a simple protection designed, from its beginnings to the size dimuire JavaScript scripts; now become real framework in some cases.
There are in fact applications and Web sites that allow you to compress (crunch) the Javascript code, but not only. This feature, in different ways, can also be applied to HTML and CSS. The JavaScript code, in particular, in addition to being compressed may be hidden, thus obtaining a security code (on demand) that makes the procedure more complex reverse engineering.

Differences between HTML, CSS and Javascript are important and substantial. While the compression of HTML pages and style sheets can only act on the Elimination of unnecessary or superfluous characters, such as 'head', 'double spaces', etc. ..., Javascript is a programming language that can then run a special code unzip himself.

JavascriptCompressor.com is a free service, available online, allowing you to compress JavaScript source code. The options make it extremely versatile, while ensuring the darkening of the code.

Example code of departure:

1
2
3
function MyFunction () {
"Hello World" ) ; alert ("Hello World");
}

Compression code:

1
alert ( "Hello World" ) } function MyFunction () {alert ("Hello World")}

Encoding normal

1
5 , 5 , 'World|Hello|alert|MyFunction|function' . split ( '|' ) ) ) 3 () {2 ("1 0")} ', 5, 5,' World | Hello | alerts | MyFunction | function. 'Split (' | ')))

Obviously this is an example, with small compressed code does not really make much sense, you risk making things worse and that's it (unless you're only interested in code obscuring the view).

Compressor MemTronic Cruncher is also an online service (like the previous work in offline mode), partially free in the sense that some functions are only available in paid version (as the function Obfuscade). Compared to the preceding service should offer better performance and security of the encryption code. I use them indiscriminately, as appropriate.

Peterbe.com does not allow Javascript to compress (unless that eliminates spaces and 'head'), but proposes a compressor for HTML, CSS and XHTML. I, for example, I use it to compress the style sheets.

Unless you use special algorithms crunching, however, that weigh down the processing of data, you can always perform a reverse engineering the code, including the compressed. Or soon or late, in fact, the original code must be sent to the interpreter of the browser, which recognizes him (for now) only in the clear. In the future, with new versions of browsers, this obstacle could be overcome. It would be beneficial if it were implemented, within the browser, some technology capable of accepting pre-compiled JavaScript code, so to speak in binary (if anything encrypted ). This will cut the time needed to download the script, allowing a natural protection from reverse engineering and, last but not least, better performance in terms of script execution.

2 comments to "Reverse Engineering: the compressors code"

  1. March 21, 2007 undolog »Blog Archive» How to lose Javascript :

    Where [...] JavaScript looses Tags: ActionScript, ActionScript 3.0, Adobe, ECMA, JavaScript, JavaScript 1.7, Mozilla, SviluppoOramai is only a matter of time, Mozilla has opened the way with JavaScript 1.7. However, it is clear that the current JavaScript has limitations. For example, you can not protect against a Reverse Engineering (see Reverse Engineering: the compressors of code), we can make life difficult for those who want to scrutinize our code, but prevent it is very unlikely. [...]

  2. December 9, 2007 upnews.it :

    undolog  »Blog Archive » Reverse Engineering: the compressors Code ...

    A neglected issue in the context of Web2.0 is the protection of the source code. With a view Open Source, Web 2.0 is where its greatest expression in the beta, share and participate in the community surely leaves in the background ...

Leave a comment

XHTML TAG PERMIT: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> INSERTION CODE:
 <pre></pre> // blocco generico <code></code> // blocco generico [cc_actionscript][/cc_actionscript] // Actionscript [cc_actionscript3][/cc_actionscript3] // Actionscript 3 [cc_css][/cc_css] // CSS Style Sheet [cc_html][/cc_html] // HTML [cc_js][/cc_js] // Javascript [cc_objc][/cc_objc] // Objective-C [cc_php][/cc_objc] // PHP [cc_sql][/cc_sql] // SQL 


Stop SOPA