[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

Need Quick SIMPLE encryption/URL converter

Asked by T-Snipez in JavaScript

Tags: url, encrypt, converter

~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.gz

The 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.charCodeAt(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.charCodeAt(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!
[+][-]01/06/07 03:43 PM, ID: 18259871Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: JavaScript
Tags: url, encrypt, converter
Sign Up Now!
Solution Provided By: Zvonko
Participating Experts: 1
Solution Grade: A
 
[+][-]01/05/07 04:53 PM, ID: 18256068Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/05/07 05:33 PM, ID: 18256228Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/05/07 05:43 PM, ID: 18256278Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/05/07 05:54 PM, ID: 18256332Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/05/07 06:03 PM, ID: 18256377Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/05/07 06:30 PM, ID: 18256526Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/06/07 06:51 PM, ID: 18260411Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/06/07 09:28 PM, ID: 18260989Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92