~Welcome - Thank you for even looking!
Some of you may be familiar with a cgi script called CGI Proxy - it is a script that basically serves as a web proxy and allows visited web pages to be rewritten extremely well to redirect traffic through the server in which the script is hosted on (thus.. it is a web proxy).
It can be downloaded from
http://www.jmarshall.com/tools/cgiproxy/releases/cgiproxy.2.1beta15.tar.gzThe script has a feature that I would like to utilize that encrypts the url entry form with javascript, but the existing code doesn't do much and it looks like it just needs some small, quick work (I'm thinking just rot 13 or something simple like that) - in order to assist me with this problem, I would recommend those helping to quickly download the script (it is rather small).
On line 980, change the 0 to 1 in "$ENCODE_URL_INPUT= 0 ;" - that will activate the feature.
Now the workings behind this feature are on lines 462-475, and are as follows:
**************************
**********
**********
**********
**********
**********
*
function _proxy_jslib_proxy_encode(
URL) {
URL= URL.replace(/^([\w\+\.\-]+
)\:\/\//, '$1/') ;
// URL= URL.replace(/(.)/g, function (s,p1) { return p1.charCodeAt(0).toString(
16) } ) ;
// URL= URL.replace(/([a-mA-M])|[n
-zN-Z]/g, function (s,p1) { return String.fromCharCode(s.char
CodeAt(0)+
(p1?13:-13
)) }) ;
return URL ;
}
function _proxy_jslib_proxy_decode(
enc_URL) {
// enc_URL= enc_URL.replace(/([a-mA-M]
)|[n-zN-Z]
/g, function (s,p1) { return String.fromCharCode(s.char
CodeAt(0)+
(p1?13:-13
)) }) ;
// enc_URL= enc_URL.replace(/([\da-fA-
F]{2})/g, function (s,p1) { return String.fromCharCode(eval('
0x'+p1)) } ) ;
enc_URL= enc_URL.replace(/^([\w\+\.
\-]+)\//, '$1://') ;
return enc_URL ;
}
**************************
**********
**********
**********
**********
**********
*
As you can see, two seemingly example encryptions have been commented, but when I've tried to run the examples, I've ran into a bunch of errors - so I think some extremely simple encryption would do.
Let me explain what I'm trying to do - when telling CGI Proxy what website to go to, it sends this data unencrypted back to the server where it then sends the CGI Proxy script off to rewrite the page. But, the problem with this is that network sniffers easily pick this up and I'm just wanting to encrypt this url entry form to something different other than the plaintext (like google.com).
FOR THOSE QUICKLY BROWSING - this is all I want to do:
I want to change that code above so it can encrypt that string with something extremely simple like rot 13, then decrypt it when it reaches the server. I just want something rather simple that works, and any fast, encryption will do!
I'm not too familiar with CGI Scripts - so any and all help would be greatly appreciated! If there is any confusion whatsoever, please don't hesitate to comment and I'll do my best to help. ANY help will be considered golden with this problem - hope to hear from you soon!
Thanks!
P.S. Remember, I just want to convert the inputed URL to something that isn't plain-text, something just simple, rot 13 is a good example but I don't know how to utilize it. Good luck and thanks again!