I am trying to write a small web application to do the following:
You want to browse a URL "http://www.google.com".
You enter this URL in a form. (In Form.aspx or whatever)
The form will do a basic encryption on the URL (like shift each character one way, like "H" becomes "I" etc.), then redirect to another page with a link like this: "http://www.mydomain.com/View.aspx?url=iuuq://xxx.hpphmf.dpn"
Now View.aspx will decrypt the given URL to "http://www.google.com", it will read the requested page using the following:
So now I have the page contents in a stream reader. Now I want to go through the contents and encrypt all links (same encryption as above), then output the page to the viewer.
Now it gets harder: All links on the page being viewed should now point to "http://www.mydomain.com/View.aspx?url=xyxyxyx", where "xyxyxyx" is the encrypted link. If the link is to a binary file, like an image or something, how do I output that normally without going through the whole encryption/decryption process?
So View.aspx should be able to output ANY webpages with all links encrypted, as well as normal binary files like images etc.
Any help would be appreciated!
You want to browse a URL "http://www.google.com".
You enter this URL in a form. (In Form.aspx or whatever)
The form will do a basic encryption on the URL (like shift each character one way, like "H" becomes "I" etc.), then redirect to another page with a link like this: "http://www.mydomain.com/View.aspx?url=iuuq://xxx.hpphmf.dpn"
Now View.aspx will decrypt the given URL to "http://www.google.com", it will read the requested page using the following:
Code:
Dim myClient As WebClient = New WebClient()
Dim response As StreamReader = new StreamReader(myClient.OpenRead("http://www.google.com"))
So now I have the page contents in a stream reader. Now I want to go through the contents and encrypt all links (same encryption as above), then output the page to the viewer.
Now it gets harder: All links on the page being viewed should now point to "http://www.mydomain.com/View.aspx?url=xyxyxyx", where "xyxyxyx" is the encrypted link. If the link is to a binary file, like an image or something, how do I output that normally without going through the whole encryption/decryption process?
So View.aspx should be able to output ANY webpages with all links encrypted, as well as normal binary files like images etc.
Any help would be appreciated!