2
0
mirror of https://github.com/mozilla/cipherscan.git synced 2024-11-16 20:03:41 +01:00

Added check for missing OpenSSL arguments as suggested by Markus Manzke.

This commit is contained in:
Pepi Zawodsky 2014-04-09 20:19:56 +02:00
parent afcc92db02
commit 6a394b6c87

View File

@ -15,6 +15,8 @@ DELAY=0
ALLCIPHERS=0
OUTPUTFORMAT="terminal"
# Error codes
E_MISSING_OPENSSL_PARAMETERS=250 # When we have valid cipherscan options, but are missing any parameters to pass to OpenSSL.
usage() {
echo -e "usage: $0 [-a|--allciphers] [-b|--benchmark] [-d|--delay seconds] [-D|--debug] [-j|--json] [-v|--verbose] [-o|--openssl file] [openssl s_client args] <target:port>
@ -253,6 +255,13 @@ if [ $VERBOSE != 0 ] ; then
fi
# echo paramters left: $@
# Testing for existence of OpenSSL parameters
if [ -z "$1" ]; then
usage
exit $E_MISSING_OPENSSL_PARAMETERS
fi
TEMPTARGET=$(sed -e 's/^.* //'<<<"${@}")
HOST=$(sed -e 's/:.*//'<<<"${TEMPTARGET}")