Please visit our sponsor
UNKNOWN =************************************** = Name: Socket get = Description:I made this little program to get past those darn content filters at the school that filter out things that shouldn't be in my opinion like neworder and blacksun. http://www.whatever.com/cgi-bin/proxy.cgi?http://bannedsite.com The www.bannedsite.com can be replaced with any site that you want to go to. This script downloads the site and then sends it to the client so it looks like it came from the trusted site. It also makes every link that you click on go through the same process so you don't have to keep puttin the link on the browser url bar thingy. I haven't added image support but I plan to in the future. Also I will make it easier to read with /Q and /E = By: Chris Meyers = = = Inputs:None = = Returns:It should return the page that is blocked. = =Assumes:None = =Side Effects:None =This code is copyrighted and has limited warranties. =Please see http://www.Planet-Source-Code.com/xq/ASP/txtCodeId.298/lngWId.6/qx/vb/scripts/ShowCode.htm =for details. =************************************** #!/usr/bin/perl use IO::Socket; print "Content-type: text/html\n\n"; $port = 80; $site = $ENV{'QUERY_STRING'}; $site =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $site =~ s/\%20/ /g; $site =~ s/^(.*?)http:\/\///; $host = $site; $host =~ s/\/(.*)//; $site = $1; print "<base href=".">"; $connect = IO::Socket::INET-&gt;new(PeerAddr =&gt; $host, PeerPort =&gt; $port, Proto =&gt; "tcp") || die "Cannot connect to $host: $!\n"; print $connect "GET http://$host/$site HTTP/1.0\n\n"; while (&lt;$connect&gt;) { if (s/href=\"(http:\/\/.*?)\"/href=\"http:\/\/www\.whateveritishostedon\.com\/cgi-bin\/proxy\.cgi\?$1\"/isg) { print "$_"; } else { s/href=\"(.*?)\"/href=\"http:\/\/www\.whateveritishostedon\.com\/cgi-bin\/proxy\.cgi\?$host$1\"/isg; print "$_"; } } close($connect);