I am trying to download a binary file from an HTTP server with GNU Telnet, a tar archive to be exact. I can currently download regular files, but I can't properly redirect the output to a file. The only thing I have tried so far is
(echo 'GET /'; echo; sleep 1; ) | telnet mywebsite.com 80
(Source). It works, but redirecting the output with
> filename also includes the telnet information:
Trying 188.8.131.52... Connected to mywebsite.com. Escape character is '^]'.
How do I get the telnet output with only the data and not the connection and disconnection information?
EDIT: I just compiled curl without OpenSSL support and I'm using it instead, so I am not using telnet anymore.