diff --git a/qzsec/access-client/access-client b/qzsec/access-client/access-client index a68e211..93683d9 100644 --- a/qzsec/access-client/access-client +++ b/qzsec/access-client/access-client @@ -3,21 +3,26 @@ URL="$1" if [ "$URL" == "" ]; then - echo "Usage: $0 accessclient://" + echo "Usage: $0 accessclient://" sleep 5 exit 1 fi -if [ ! "$URL" == "accessclient://"* ]; then - echo "Invalid URL, should be accessclient://" +if [ "$URL" == "accessclient://" ]; then + echo "Invalid URL" sleep 5 exit 1 fi +if [[ "$URL" != "accessclient://"* ]]; then + echo "Invalid URL" + sleep 5 + exit 1 +fi ARGS=$(echo $URL | sed 's|accessclient://||' | base64 -d | minideflate -d ) -APP=$(echo $ARGS | jq -r.app) +APP=$(echo $ARGS | jq -r .app) if [ "$APP" != "putty" ]; then echo "Unsupported app, should be putty." sleep 5