Obfusticator

Started by
2 comments, last by Sagar_Indurkhya 18 years, 10 months ago
Hi, I'm looking for a program (preferably java, or a script: perl, PHP, bash) which will take a &#106avascript program with regular expressions and strip it of whitespace as well as minimising funciton and variable names, e.g. translate this

var firstvariable;
var secondvariable;
function something(arg1 arg2){
   var localvariable;
   ....
}
var anothervariable;
into something like this

var a;var b;function c(d,e){var f;...}var d;
Know of any? Thanks
spraff.net: don't laugh, I'm still just starting...
Advertisement
Googling with the right word (obfuscator and not obfusticator) gives plenty of results.

shmoove
Thanks, but the google results are largely commercial efforts, targeted at Windows, or are things which seem to fail with little things like unexpected (but legal) line breaks. I'm asking if you've used a good one yourself.
spraff.net: don't laugh, I'm still just starting...
I might be wrong, but depending on how complicated the code is(doesn't look to complicated) it shouldn't be too hard to write one. Plus, it would be a great coding exercise.

Cheers - Sagar

This topic is closed to new replies.

Advertisement