29 lines
451 B
Bash
Executable File
29 lines
451 B
Bash
Executable File
#! /bin/sh
|
|
#
|
|
# small misfin test client to debug a server
|
|
#
|
|
# usage: misfin.sh user@host message
|
|
#
|
|
# e.g. misfin.sh alexlehm@gemini.lehmann.cx Testmessage
|
|
#
|
|
# tildegit.org/alexlehm/misfin-shell
|
|
#
|
|
|
|
# change as necessary
|
|
PORT=1958
|
|
KEY=alexlehm.pem
|
|
|
|
if [ $# = 0 ]
|
|
then
|
|
echo "error"
|
|
exit
|
|
fi
|
|
|
|
USER=$1
|
|
shift
|
|
|
|
HOST=$(echo "$USER"|sed 's/.*@//')
|
|
|
|
printf "misfin://%s %s\r\n" "$USER" "$*" | openssl s_client -cert "$KEY" -quiet -connect "$HOST:$PORT"
|
|
|