bnetkit

simple networking utilities
git clone git://bvnf.space/bnetkit.git
Log | Files | Refs

commit 79c27af0b621955570a217fc290daf962e9fda31
parent c7a5f557340499e0a947242781b9cf0b07d55e35
Author: phoebos <ben@bvnf.space>
Date:   Sun, 27 Feb 2022 17:17:24 +0000

add gopher client

Diffstat:
Agopher | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/gopher b/gopher @@ -0,0 +1,13 @@ +#!/bin/sh -e + +[ "$#" -lt 1 ] && { + printf "usage: %s [gopher://]example.com/foo/bar\n" "$0" >&2 + exit 1 +} + + +nopref="${1##gopher://}" +host="${nopref%%/*}" +path="${nopref#"$host"}" +path="${path:-/}" +printf "%s\r\n" "$path" | tee /dev/stderr | ./nc "$host" 70