# 2026-06-25 - Fetching Files From Gopher Without Curl
I saw that curl landed on the open slopware list. That's OK, i can
use wget, right? Well, wget doesn't support the gopher protocol.
I could use `lynx -source` but that's a little heavy for me. Perfect
excuse to write a little shell script [1].
For example, if i wanted to download NetHack 5.0 for DOS from my own
gopher hole, i could run:
$ U=gopher://tilde.pink/9/~bencollver/files/dos386/game/nethack
$ U=$U/nh500dos.zip
$ gopher-get.sh $U
Ncat: Version 7.92 ( https://nmap.org/ncat )
...
Ncat: Connected to 95.216.6.12:70.
...
libnsock nsock_trace_handler_callback(): Callback: READ SUCCESS
for EID 26 [peer unspecified] (53 bytes):
/~bencollver/files/dos386/game/nethack/nh500dos.zip..
...
Ncat: 53 bytes sent, 2546448 bytes received in 19.18 seconds.
libnsock nsock_iod_delete(): nsock_iod_delete (IOD #1)
libnsock nsock_iod_delete(): nsock_iod_delete (IOD #2)
$ unzip -t nh500dos.zip
...
No errors detected in compressed data of nh500dos.zip.
My script uses AWK to parse out the host name, TCP port, and gopher
selector from the URL. It defaults to using nmap's `ncat` command
for network communication, but it can be configured to use netcat's
`nc` command instead. The error code is non-zero on failure.
I am sure there are a bazillion corner cases, but this was a fun
little exercise in digital minimalism...
tags: bencollver,technical,unix,versus
# Footnotes
(TXT) [1] gopher-get.sh
# Tags
(DIR) bencollver
(DIR) technical
(DIR) unix
(DIR) versus