EncryptJS
History
date | version | author | description |
2007-01-24 | 0.1 | hofsve | initial version |
2007-02-02 | 0.2 | hofsve | fixed: encrypted file will be placed in correct folder, because the script uses absolute pathes |
2007-02-26 | 0.3 | hofsve | fixed: NOW you can move the output in a userdefined folder, because the created labyrinthfiles are reading out there own installationpath to correct the "installationpath" in the src-attribute of every generated <script src="..." ..></script> |
2007-09-20 | 1.0 | hofsve | "JavaScript-Encryption cancled!" if the depth is zero, the user
chose the "cancel"-button or the ESC-key was pressed. Additional changes in the shortcut: <CTRL><SHIFT><ALT><E< |
Shortcut in PSPad
<CTRL> <ALT> <SHIFT> <E>
Description
This userscript creates an encrypted version of your file and generates a little labyrinth of encrypted js-files (with a radomized number in the filename) around it. EnryptJS won't touch your original script-file.
It will be hard to find your enrypted script on the webserver, if now directory-listing is available.
The structure of attached example is:
EncryptJS.html
calls example_encrypted.js
example.js
. All other scripts were generated by "EncryptJS" to
hiding your javascript-sources in a labyrinth of encrypted js-source-files.
Additional information:
Output of "EnryptJS" in PSPad's "Log"-window:
"EncryptJS" generates following output in the Logging-window of PSPad:
Status of encrypting JavaScript-file 'C:\win32apps\PSPad\Script\JScript\EncryptJS_examples\example.js': - file #0 ... finished, result: 'C:\win32apps\PSPad\Script\JScript\EncryptJS_examples\example_encrypted.js'. - file #1 ... finished, result: 'C:\win32apps\PSPad\Script\JScript\EncryptJS_examples\example_01655034085806249.js'. - file #2 ... finished, result: 'C:\win32apps\PSPad\Script\JScript\EncryptJS_examples\example_040666609552426813.js'. - file #3 ... finished, result: 'C:\win32apps\PSPad\Script\JScript\EncryptJS_examples\example_07906913613952911.js'. - file #4 ... finished, result: 'C:\win32apps\PSPad\Script\JScript\EncryptJS_examples\example_0734651380546169.js'. - file #5 ... finished, result: 'C:\win32apps\PSPad\Script\JScript\EncryptJS_examples\example_022776101722639075.js'. Include following line into your HTML-page and replace <path> by the real relative or absolute path of the JavaScript on your server. <script type="text/javascript" src="<path>/example_encrypted.js"></script> IMPORTANT: Make sure that all generated files are placed in the same folder.
Now this html-page will present, that the labyrinth works. The document contains only following "inlude":
<script type="text/javascript" src="<path>/example_encrypted.js"></script>
The original file contains following line (see example.js in the example-folder):
alert( 'Hello!\nI\'m the last script in the labyrinth!' );
It's encoded source was saved in file #5 ('example_022776101722639075.js').
Sourcecode below:
eval(String.fromCharCode(97,108,101,114,116,40,32,39,72,101,108,108,111,33,92,110,73,92,39,109,32,116,104,101,32,108,97,115,116,32,115,99,114,105,112,116,32,105,110,32,116,104,101,32,108,97,98,121,114,105,110,116,104,33,39,32,41,59));