diff --git a/misfin.sh b/misfin.sh index c473308..546c275 100755 --- a/misfin.sh +++ b/misfin.sh @@ -22,17 +22,10 @@ fi USER=$1 shift -HOST=`echo $USER|sed 's/.*@//'` - -if [ $PORT != 1958 ] -then - HOSTPORT=$HOST:$PORT -else - HOSTPORT=$HOST -fi +HOST=$(echo "$USER"|sed 's/.*@//') PROXY= #PROXY=-proxy localhost:8118 -echo "misfin://$USER $*\r" | openssl s_client -cert $KEY -quiet $PROXY -connect $HOST:$PORT +printf "misfin://%s %s\r\n" "$USER" "$*" | openssl s_client -cert "$KEY" -quiet $PROXY -connect "$HOST:$PORT"