Koozali.org: home of the SME Server

Telstra Cable Web Pages

Luke Drumm

Telstra Cable Web Pages
« on: November 25, 2000, 09:49:36 AM »
Hi,

Are you a Telstra Cable user who's suffering under those http://www/cable.. style web pages that Telstra insist on using?

Here's a little a fix I found that doesn't involve rewiring your DNS tables or anything horrible like that.

Download the cgi web proxy from http://www.jmarshall.com/tools/cgiproxy/.
(Its a great cgi based proxy to use anyway!)

In the source code, look for the subroutines called proxy_encode and proxy_decode.

Change them to the following:

sub proxy_encode {
    local($URL)= @_ ;
    $URL=~ s/\/www\//\/www.nsw.bigpond.net.au\//;
    $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 {
    local($PATH_INFO)= @_ ;
#    $PATH_INFO=~ tr/a-zA-Z/n-za-mN-ZA-M/ ;        # rot-13
#    $PATH_INFO=~ s/([0-9A-Fa-f]{2})/ sprintf("%c",hex($1)) /ge ;
    $PATH_INFO=~ s#^([\w+.-]+)/#$1://# ;           # http/xxx -> http://xxx
    $URL=~ s/\/www\//\/www.nsw.bigpond.net.au\//;
    return $PATH_INFO ;
}

If you stick the proxy program in an ibay (along with chmoding the right permissions),run the CGI program from your web browser (eg. .../ibay/nph-proxy.cgi), type 'www.telstra.com' into the program's URL section and hit go: You're off!

I know it's not the best possible fix... but I found it easy.

Regards,
Luke

Charlie Brady

RE: Telstra Cable Web Pages
« Reply #1 on: November 26, 2000, 11:32:43 AM »
Luke Drumm wrote:

> I know it's not the best possible fix... but I found it easy.

Luke, that's great detective work, and a great contribution. You're not
the only one to report problem with such "broken" cable provider web sites (ones which include "http://www/blah/..." URLs), and finding a general solution which doesn't overly complicate e-smith installation, setup and operation has been a big challenge.

Hopefully someone will package up thie cgiproxy with your proposed mods (did you work them out yourself, or did this come from the BPC Users Group?) and make it into a nice easy e-smith add-on RPM.

Regards

Charlie

Luke Drumm

RE: Telstra Cable Web Pages
« Reply #2 on: November 27, 2000, 01:59:28 AM »
I can some of the credit for this one although the CGI proxy's credit obviously goes to James Marshall.

A few things I forgot to mention in my original post:

 - The state (eg. nsw) needs to be adjusted in the code to match the state you live in (as Telstra seems to split their cable subnets that way).

 - Please don't place the CGI proxy in a public ibay unless you're either prepared to spend a lot of time to 'secure' the script or let the rest of the world hijack your cable connection.

 - You'll need to switch off all the 'anon' services in the proxy if you wish to access some of the Telstra internal 'media' sites such as 'The Broadroom' as they rely on Javascript (etc...) to make them work.

Regards,
Luke