laconia/laconia

26 lines
439 B
Plaintext
Raw Normal View History

2021-07-05 17:01:04 +00:00
#!/bin/sh
PROGNAME=${0##*/}
VERSION="0.0.1"
URI=$( echo $1 | sed -e 's/spartan:\/\///' )
error_exit() {
printf "%s: %s\n" "$PROGNAME" "${1:-"Unknown Error"}" >&2
exit 1
}
usage() {
printf "usage: %s [OPTIONS] URL [ARGS]\n" "$PROGNAME"
printf "Simple client for spartan protocol\n"
}
case $1 in
-h | --help)
usage; exit ;;
-* | --*)
usage; error_exit "unknown option $1" ;;
*)
2021-07-05 17:13:44 +00:00
printf "$1 / 0\r\n" | nc $1 300 -4
2021-07-05 17:01:04 +00:00
;;
esac