Gopher bug out kit: netcat

Are you stranded with just your basic Unix toolkit? No internet browser? No gopher client? Use netcat!

echo "/directory/file" | nc domain.name port

For example:

To view tilde.institute root goohermap: echo / | nc tilde.institute 70

or to get a .txt file from: occ.deadnet.se in /users/how.txt

echo /users/how.txt | nc occ.deadnet.se 70

3 points · 2 comments · view on lemmy.world

2 Comments

screwtape@lemmy.sdf.org · 0 pts · 3y (1 reply)

Hmmmm does echo do the CRLF? I thought I normally printf "~tomasino/phlog\r\n" | nc tilde.institute 70 which I guess should actually be printf "%s/%s\r\n" "~tomasino" "phlog" | nc tilde.institute 70

my name is screwtape right

odc@lemmy.sdf.org · 2 pts · 2y

Even better: netcat has a -C flag that will take care of CRLF.