Sign in to follow this  
walkingcarcass

Obfusticator

Recommended Posts

walkingcarcass    116
Hi, I'm looking for a program (preferably java, or a script: perl, PHP, bash) which will take a javascript 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

Share this post


Link to post
Share on other sites
walkingcarcass    116
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this