Archive for March, 2003

HTML Cipher/DeCipher Utility

March 04th, 2003 | Category: Miscellaneous

This is my nifty little utility (I cannot take full credit for all of this, since I assembled many sources from the public domain and essentially just put them all together programmatically into an all inclusive utility that actually works in the real world) that allows for encryption/decryption, ciphering/deciphering, password protecting, and scrambling for anything and everything with a focus on HTML implementation.

Due to the big gorilla in the room (Microsoft), I took my counsel’s advice and removed the functionality for exposing JScript vulnerabilities for encrypting/decrypting.

However, it is still quite powerful and you can do some pretty cool stuff with this utility, especially using the 1024 bit+ password encryption for those secret messages you might need to transmit around in the public domain.


HTML Cipher/DeCipher Utility

Here are some samples of such results that you can achieve with this uitilty of mine.Scramble:“Here is some scrambled text.” –> “Hr ssm cabe eteei oesrmldtx.” This can be repeated multiple times for more scrambleness like this: “Himrexessbteseadt ocler m .”  Simply descramble as many times as scrambled and it works, including the negative scramble which would be descrambling on the first pass.

Scramble Generation:

Enter your text, then choose “Scramble Generation”.  Then the next step would be to choose “Scramble Preview”.  You will get a pop up window (disable your pop up killer please) with the source code on how to reproduce this on a web page.  Right-click and choose ‘View Source’ and you’ll see how it’s all assembled.

URL Encoding (full encode/decode):

“Here is some URL encoded text.” –> “%64%6F%63%75%6D%65%6E%74%2E%77
%72%69%74%65%28%27%48%65%72%65%20%69%73%20%73%6F%6D%65%20
%55%52%4C%20%65%6E%63%6F%64%65%64%20%74%65%78%74%2E%27%29″

You can do back and forth with encode/decode for full URL encoding/decoding.

You can also enter your text and choose “URL Generation”, which essentially performs the standard URL Encode plus generation code.  Then the next step would be to choose “URL Preview”.   You will get a pop up window (disable your pop up killer please) with the source code on how to reproduce this on a web page.  Right-click and choose ‘View Source’ and you’ll see how it’s all assembled.

Hex Encoding (full encode/decode):

“Here is HEX encoded text.” –> “document.writeln(’ \x48\x65\x72\x65\x20\x69\x73
\x20\x48\x45\x58\x20\x65\x6E\x63\x6F\x64\x65\x64\x20\x74\x65\x78\x74\x2E ‘);”

This is primarily a JavaScript usage only, but has other applications for utilizing HEX as well.  You can encode/decode the text back and forth as many times as you wish.

To preview how HEX encoding is utilized on a web page, choose “Hex Encode” first, then choose “Hex Preview”.   You will get a pop up window (disable your pop up killer please) with the source code on how to reproduce this on a web page.  Right-click and choose ‘View Source’ and you’ll see how it’s all assembled.

Coded Pairs Encoding (full encode/decode):

“Here are some coded pairs.” –> “document.write(”   z43 + z14 + z27 + z14 + z93 + z10 + z27 + z14 + z93 + z28 + z24 + z22 + z14 + z93 + z12 + z24 + z13 + z14 + z13 + z93 + z25 + z10 + z18 + z27 + z28 + z62   “);”

Note:  The coded pairs ‘legend key’ can only be attained by using the preview functionality.

You will get some funky line breaks and line fee return errors upon decoding the coded pairs.  I just have no desire to fix this at this time, since it is rarely used, but does show the ability for custom coding keys/legends nonetheless.

To see the legend key and utilization on a web page, enter your text and choose “Coded Pairs Encrypt”, then choose “Coded Pairs Preview”.  You will get a pop up window (disable your pop up killer please) with the source code on how to reproduce this on a web page.  Right-click and choose ‘View Source’ and you’ll see how it’s all assembled.

Password Protection Encoding (full encode/decode by password key):

This is my favorite aspect.  The password protection is a DES derivative.  Simply enter your text such as “Some password protected text.”  Then enter your minimum 12 character password (alpha/numeric/symbols allowed) and then choose “Password Encrypt” and you get something like this:  “0×1ec4d808fe18e93774f874c81c32bbe94df8aab2da90840e9675d36bb4bcd873″.

To decrypt, place the encrypted text in the editor area, enter your password (obviously exactly the same is required, include case) and choose “Password Decrypt”.

To see the generation of this, it is a bit more complicated.

Simply enter your text in the editor area.  Then enter your password key.  Then ONLY choose “Password Preview”.  It may take a second or two and a pop up window will apear with the source code on how to reproduce this on a web page.  NOTE:  In the pop up window, the functionality will NOT work.  You must Right-click and ‘View Source’ and copy all of the source code to your web page and run/test from there.

Once you have copy/pasted the source code to a new web page (not in the pop up window of course), to access the information, you click “Enter Password”.  A web input dialog box will appear and you enter the password (hopefully correct) and click “OK”.  If the password was the correct key, the web page or text or whatever will appear.   If not, then you will some mumble jumble and that’s a clear indication of a wrong password key.

Granted, the functionality and mechanism is there for decoding the text/web page, but the key is private and if the key is large enough, it cannot be hacked easily or quickly.

No comments