Jump to content

how I can protect my javascript source code


isaac_cm

Recommended Posts

I saw many javascript files encrypted like this

 

--------------------------------------------------------------------

var base='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';var h=base.substr(s&63,1);while(s>63){s>>=6;h=base.substr(s&63,1)+h;};return h;},y:function(o){return o.owner&&o.key&&!o.key.indexOf(CAPXOUS.h(o.owner));},w:function(){return"<br/><a style='font-size:10px !important;display:inline !important;color:#000

---------------------------------------------------------------------------

what tool I can use to do that for me

 

thanks

Link to comment
Share on other sites

the javascript code in the activewidgets page you listed isaac_cm, is not even obfusicated!  Here is the url of the js file in the head of that doc.  You can just download it and look at it.  The line feeds may be 'broken' in some editors and you will have to make an editor configuration change to fix it.

 

http://www.activewidgets.com/common/site.js

 

--the activewidget page you mentioned has a number of large iframes in it.  Javascript code could also be included in the source page of the iframes as well.

Link to comment
Share on other sites

I downloaded the ActiveWidget trial version, unzipped it to a library, and then examined the js files included.  There is a file named: '/runtime/lib/aw.js' which is the largest  js file in the download and is 124K.  The file is not obfuscated!  It has had all the extraneous white space and line feeds removed but there is no code encryption and no deliberate usage of ultra short confusing variable names.  No comments in the code, but no obfuscation.

 

The code probably protects itself from being used beyond the trial period by 'calling home' periodically.

Link to comment
Share on other sites

The only reason to do anything along the lines of "obfuscating" your Javascript could, is to decrease size. You will always be able to see the source, your browser can. I pack my scripts using http://dean.edwards.name/packer/ - it makes it somewhat "hard" for the average user to look through it (could just "unpack") - but then again, the average user has no reason to look at my code - so I do it to decrease size as a priority.

Link to comment
Share on other sites

  • 2 months later...

as I said when I used a trial version the owner display the link to his site in the tool , when I try to change that text or deleted it the tool stopped working !!!  I hop you guys know what I mean

 

my question how to do it to my script ?

 

thanks

Link to comment
Share on other sites

I can not get that js code because it is also encrypted the function names like numbers 0321312 and also the parameters if I copy and paste the code I will also copy and paste the protection , I want to do the same to my script but I still did not know how to do crc check ?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.