From ee3f06d78ad3dc481b5c8ebdf2e825bc21b9f427 Mon Sep 17 00:00:00 2001 From: Alexander Lehmann Date: Sat, 30 Sep 2023 16:05:08 +0200 Subject: [PATCH] initial version --- .drone.yml | 10 ++++++++++ .gitignore | 1 + README.md | 6 +++++- misfin.sh | 38 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .drone.yml create mode 100644 .gitignore create mode 100755 misfin.sh diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..29fd915 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,10 @@ +--- +kind: pipeline +name: shellcheck + +steps: + - name: shellcheck + image: koalaman/shellcheck-alpine:stable + commands: + - shellcheck backup_cosmicvoyage + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cfaad76 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pem diff --git a/README.md b/README.md index 7bdbf19..05a2fee 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # misfin-shell -small wrapper script to send messages to misfin using openssl +small wrapper script to send messages to misfin using openssl + +usage example +./misfin.sh alexlehm@gemini.lehmann.cx Test message + diff --git a/misfin.sh b/misfin.sh new file mode 100755 index 0000000..c473308 --- /dev/null +++ b/misfin.sh @@ -0,0 +1,38 @@ +#! /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/.*@//'` + +if [ $PORT != 1958 ] +then + HOSTPORT=$HOST:$PORT +else + HOSTPORT=$HOST +fi + +PROXY= +#PROXY=-proxy localhost:8118 + +echo "misfin://$USER $*\r" | openssl s_client -cert $KEY -quiet $PROXY -connect $HOST:$PORT +