Link to home
Start Free TrialLog in
Avatar of heatseeker
heatseeker

asked on

JavaScript Obfuscator/Scrambler

Hi Experts,

I'm trying to find a solution that will obfuscate/scramble some piece of JavaScript code. The code I'd like to obfuscate is in a standalone js file. I know this isn't secure at all, as anyone with minimal knowledge can reverse it.

Nevertheless, I'd like - with your help - to cook something that'll waste a bit of their time when attempting to do so.

So far I'm familiar with the "escape" way of doing things, but would like something more ellaborate. Preferably something that uses a few rounds of obfuscation, let's say 6 rounds.

Each round would use the code from previous round, with a twist, so hopefully no automatic program can be written to do it and they'll have to do each round by hand.

Now, before you start jumping at me and say this isn't secure and better get something else doing, I know it isn't. I ain't looking for security here. Just to waste any wannabe hacker as much of his time as possible when he attempts to snoop over this piece of code.

Great creative minds of experts here have come up more than once with brilliant solutions for my previous problems. Hope you can help once more :)

Thank you.

Sincerely,
Catalin Ionescu
ASKER CERTIFIED SOLUTION
Avatar of Curtis Shull
Curtis Shull
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Microsoft makes a (lame) script encoder which might be sufficient for you.  

Here it is: http://www.microsoft.com/downloads/details.aspx?FamilyID=e7877f67-c447-4873-b1b0-21f0626a6329&DisplayLang=en

Actually, you could take the obfuscated code from Onyx and run it through Windows Script Encoder to make it even more obfuscated.

Of course, nothing can hide your javascript from someone who really wants to see it.

Avatar of heatseeker
heatseeker

ASKER

basicinstinct,

Thank you for your feedback and ideas. The resulting script should work both in IE and FF.

Please correct me if I am wrong, but from what I am able to tell, Microsoft's solution only works in IE and is only for JScript and VBScript, not JavaScript.


Onyx23,

Yes, that's a good start. Stunnix produces good results, but costs almost $300 :( Any idea of a freeware or low cost shareware that does about the same job?


For everybody else, please keep the ideas flowing.

Sincerely,
Catalin Ionescu
Try:   http://www.indiankey.com/Shareware/code/listing/ProgramDescription.asp?ProgId=5920

Description: Stop theft of your JavaScripts! Scramble, obfuscate, and pack JavaScript code!
Javascript Obfuscator converts the JavaScript source
code into scrambled and completely unreadable form,
preventing it from analysing and theft.
Onyx23,

Thank you for the link.

It is pointing to the same program as the sharewareconnection.com link you've sent earlier.

The resulting code isn't too "obfuscated". Just look at the sample.

Sincerely,
Catalin Ionescu
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Experts, thank you for your time spent to solve my problem.

My appologies for taking so long to close the question.

Sincerely,
Catalin Ionescu