For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > August 2005 > Net::Telnet -- does it support Proxy or SOCKS connections?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Net::Telnet -- does it support Proxy or SOCKS connections?
David B. Mears

2005-08-04, 10:00 pm

Does Net::Telnet support connections through either a Proxy or SOCKS
host as an intermediary?

I'm trying to experiment to see if I can get a GIF from an HTTP site
which my browswer won't get because it doesn't provide one specific
header in the GET request which the server is expecting. I did a
quick experiment using a socksified telnet (I'm behind a firewall
and can't directly connect) to connect to port 80. I sent the GET
request along with the missing header and was able to retrieve the
image, except for one unfortunate problem -- the GIF contained
multiple instances of 0xFF characters which are "special" to telnet
and were thus removed from the data stream, resulting in a corrupted
GIF image. (I was able to verify this was what happened via other
means.)

So I thought if I could figure out a simple way to connect to the port
with something other than telnet itself, I could retrieve all the data
without the 0xFF chars being stripped out. Searching around a bit via
the CPAN site led me to Net::Telnet. It appears it will allow me to
do what I want (via a Perl CGI program) as long as it would allow me
to connect through the firewall by specifying either a Proxy or SOCKS
host to go through.

Or does anyone have any other suggestions for a quick/simple way to
connect to port 80 of a host outside my firewall such that I can craft
the GET request sent to the port to include the full set of the headers
required for the retreival I'm attempting?

Thanks!

David B. Mears
Hewlett-Packard
Cupertino CA
mears@cup.hp.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com