JavaScript Obfuscator
The JavaScript Obfuscator is a method to make javascript source code more difficult to understand or reverse engineering. This provide a protection for source code intellectual property when shipped to customer or end user.
Here are two of the basic algorithm that implemented in JavaScript Obfuscator algorithm.
1) Change JavaScript function’s name
For example,
From
funtion Store(id) { alert(id); }
to
funtion d(c) { alert(c); }
Usually JavaScript Obfuscator change function name to more short, non-understand and meanless name. It just like above example.
2) Change ASCII to other format
Here i show how to convert ASCII to Octal number
For example,
From
alert("Hello World");
to
alert("\110\145\154\154\157 \127\157\162\154\144");
Above are two basic javaScript Obfuscator algorithm that can easily implement or even reverse engineering. However it provide a basic understand of what JavaScript Obfuscator is.
Personal Perspective
Well, i personally do not agree to put any business logic in JavaScript, we should put all business logic in server side level, not client site level. Business logic in javascript will make system or program very hard to maintain and it’s just leak too many source code information to end user. Source code leaking is a serious security issue, we should look into it seriously and avoid put important logic in JavaScript.
Reference
Here is a open source JavaScript Obfuscator written in Java, please take a look on it.
http://daven.se/usefulstuff/javascript-obfuscator.html
Free JavaScript Obfuscator
Html Guardian is a great tool to encrypt HTML source, ASP, PHP, scripts, style sheets. Image protection for your website.
Even Html Guardian said the function they provided in javascript is encryption, however i still think this is an Obfuscator method.
Commercial JavaScript Obfuscator
It really provide some unique algorithm to make source code very hard to understand or reverse engineering
1) Thicketâ„¢ Obfuscator for JavaScript
2) Jasob 2
3) JCE Pro
4) Javascript Obfuscator
- Java Core Technology - Java RegEx, Java XML, Java I/O, Java Misc
- J2EE Frameworks - Hibernate, Spring 2.5, Spring MVC, Struts 1.x, Struts 2.x
- Build Tools - Maven, Archiva
- Unit Test - jUnit, TestNG
- Client Scripts - jQuery