View previous topic :: View next topic |
Author |
Message |
Carlos305 -
Joined: 05 Jun 2006 Posts: 3
|
Posted: Mon Jun 12, 2006 11:42 pm Post subject: CGI URL Encoding |
|
|
What do i need to do so when i go to a site through a cgi-proxy it wont show the name of the site on the address bar?
For Example: If i put myspace.com in the proxy it shows
Code: |
http://mydomain.com/nph-proxy.cgi/010110A/http/myspace.com/ |
i want it to show it like this
Code: | http://pbp.iamnewguy.com/perl/nph-proxy.pl/000110A/687474703a2f2f6d7973706163652e636f6d2f |
I dont want the http/myspace.com/ to come out |
|
Back to top |
|
|
RTAdams89 -
Joined: 06 Nov 2005 Posts: 102
|
Posted: Mon Jun 12, 2006 11:49 pm Post subject: |
|
|
The proxy you are using needs to have "encode-url" enabled. Or if you are running your own (CGIProxy) you need to enable it in the configuration. I believe you can use base64 or 13-letter shift. |
|
Back to top |
|
|
Carlos305 -
Joined: 05 Jun 2006 Posts: 3
|
Posted: Tue Jun 13, 2006 1:19 am Post subject: |
|
|
i uncommented this
Code: | sub proxy_encode {
my($URL)= @_ ;
$URL=~ s#^([\w+.-]+)://#$1/# ; # http://xxx -> http/xxx
# $URL=~ s/(.)/ sprintf('%02x',ord($1)) /ge ; # each char -> 2-hex
# $URL=~ tr/a-zA-Z/n-za-mN-ZA-M/ ; # rot-13
return $URL ;
}
sub proxy_decode {
my($enc_URL)= @_ ;
# $enc_URL=~ tr/a-zA-Z/n-za-mN-ZA-M/ ; # rot-13
# $enc_URL=~ s/([\da-fA-F]{2})/ sprintf("%c",hex($1)) /ge ;
$enc_URL=~ s#^([\w+.-]+)/#$1://# ; # http/xxx -> http://xxx
return $enc_URL ;
} |
so that is looked like this
Code: | sub proxy_encode {
my($URL)= @_ ;
# $URL=~ s#^([\w+.-]+)://#$1/# ; # http://xxx -> http/xxx
# $URL=~ s/(.)/ sprintf('%02x',ord($1)) /ge ; # each char -> 2-hex
$URL=~ tr/a-zA-Z/n-za-mN-ZA-M/ ; # rot-13
return $URL ;
}
sub proxy_decode {
my($enc_URL)= @_ ;
$enc_URL=~ tr/a-zA-Z/n-za-mN-ZA-M/ ; # rot-13
# $enc_URL=~ s/([\da-fA-F]{2})/ sprintf("%c",hex($1)) /ge ;
# $enc_URL=~ s#^([\w+.-]+)/#$1://# ; # http/xxx -> http://xxx
return $enc_URL ;
} |
but it still doesn;t work |
|
Back to top |
|
|
|