Download a file without wget or curl

How would one go about downloading a file from the command line without using Wget or Curl?


Solution 1:

Using FTP:

ftp -A -v mirrors.sonic.net <<eof
binary
get cygwin/x86_64/setup.xz setup.xz
eof

Using OpenSSL - note this only works for HTTPS:

openssl s_client -quiet -connect superuser.com:443 <<eof
GET / HTTP/1.0
Host: superuser.com

eof

Using lynx:

lynx -source example.com > index.html

Solution 2:

This works with telnet instead of lynx:

(echo 'GET /'; echo; sleep 1; ) | telnet example.com 80