I'm trying to download a file, https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe or https://www.7-zip.org/a/7z1806-x64.exe, without using
wget; rather, I want to download the file by using
telnet as follows.
(echo 'GET /~sgtatham/putty/latest/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe
This does not work; when I use
cat the file contents are as follows.
HTTP/1.1 302 Found Date: Sun, 17 Feb 2019 18:40:22 GMT Server: Apache Location: https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe Content-Length: 301 Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe">here</a>.</p> <hr> <address>Apache Server at the.earth.li Port 80</address> </body></html>