Subject: Re: telnet for HTTP download
To: NetBSD User's Discussion List <netbsd-users@NetBSD.ORG>
From: Oliver Tonnhofer <olt@bogosoft.com>
List: netbsd-users
Date: 06/15/2002 22:05:31
Hallo Greg,
woods@weird.com (Greg A. Woods) wrote:
>> Is there a way to download a file on a HTTP server by doing a GET request
>> from within a telnet. I'm not a telnet expert, but I know you can go into
>> telnet and connect to web servers and view the pages (in source form). Can
>> you also do a GET on a linked binary file and redirect it to a file?
>
>I tried using the "script" utility to save the output of the session and
>then used emacs to strip off all the crud. The file looked right but
>'xv' was unable to process it:
>
>$ telnet www 80
[...]
>An attempt to cut&paste the telnet output on an xterm didn't work
>either, and resulted in corruption even 'file' could see (the image
>really is 31x12 pixels):
This won't work with binary data. A EOF (04h) char will close the
connection. Maybe netcat will work instead of telnet.
file recognize the picture as a gif because of the magic file header
'GIF89a'.
If you want a small tool to download something, use snarf.
But this is off topic.
~
Oliver