mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Merge branch 'master' of github.com:drwetter/testssl.sh
This commit is contained in:
commit
8756151a26
@ -5,8 +5,8 @@ testssl.sh is a free Unix command line tool which checks a server's service on
|
|||||||
any port for the support of TLS/SSL ciphers, protocols as well as some cryptographic flaws.
|
any port for the support of TLS/SSL ciphers, protocols as well as some cryptographic flaws.
|
||||||
It's designed to provide clear output for a "is this good or bad" decision.
|
It's designed to provide clear output for a "is this good or bad" decision.
|
||||||
|
|
||||||
It is working on every Linux distribution and MacOS X which has OpenSSL, /bin/bash and
|
It is working on every Linux distribution, MacOS X and Windows (using MSYS2) which has OpenSSL,
|
||||||
standard tools like GNU sed and awk installed.
|
/bin/bash and standard tools like GNU sed and awk installed.
|
||||||
|
|
||||||
On github (here) you will find development versions of the software -- with new features and maybe some bugs. For the stable version and a more thorough description of the software please see http://testssl.sh/ .
|
On github (here) you will find development versions of the software -- with new features and maybe some bugs. For the stable version and a more thorough description of the software please see http://testssl.sh/ .
|
||||||
|
|
||||||
|
24
testssl.sh
24
testssl.sh
@ -83,7 +83,8 @@ OSSL_VER_APPENDIX="none"
|
|||||||
NODEIP=""
|
NODEIP=""
|
||||||
IPS=""
|
IPS=""
|
||||||
|
|
||||||
|
# make sure that temporary files are cleaned up after use
|
||||||
|
trap cleanup QUIT EXIT
|
||||||
|
|
||||||
out() {
|
out() {
|
||||||
$ECHO "$1"
|
$ECHO "$1"
|
||||||
@ -1573,7 +1574,7 @@ cleanup () {
|
|||||||
[ -e $HEADERFILE_BREACH ] && cat $HEADERFILE_BREACH
|
[ -e $HEADERFILE_BREACH ] && cat $HEADERFILE_BREACH
|
||||||
#[ -e $LOGFILE ] && cat $LOGFILE
|
#[ -e $LOGFILE ] && cat $LOGFILE
|
||||||
else
|
else
|
||||||
rm $TMPFILE $HEADERFILE $LOGFILE $GOST_CONF 2>/dev/null
|
rm ${TMPFILE} ${HEADERFILE} ${HEADERFILE_BREACH} ${LOGFILE} ${GOST_CONF} 2>/dev/null
|
||||||
fi
|
fi
|
||||||
outln
|
outln
|
||||||
outln
|
outln
|
||||||
@ -1803,56 +1804,48 @@ case "$1" in
|
|||||||
maketempf
|
maketempf
|
||||||
test_just_one $2
|
test_just_one $2
|
||||||
ret=$?
|
ret=$?
|
||||||
cleanup
|
|
||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
-t|--starttls)
|
-t|--starttls)
|
||||||
parse_hn_port "$2" "$3" # here comes hostname:port and protocol to signal starttls
|
parse_hn_port "$2" "$3" # here comes hostname:port and protocol to signal starttls
|
||||||
maketempf
|
maketempf
|
||||||
starttls "$3" # protocol
|
starttls "$3" # protocol
|
||||||
ret=$?
|
ret=$?
|
||||||
cleanup
|
|
||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
-e|--each-cipher)
|
-e|--each-cipher)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
maketempf
|
maketempf
|
||||||
allciphers
|
allciphers
|
||||||
ret=$?
|
ret=$?
|
||||||
cleanup
|
|
||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
-E|-ee|--cipher-per-proto)
|
-E|-ee|--cipher-per-proto)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
maketempf
|
maketempf
|
||||||
cipher_per_proto
|
cipher_per_proto
|
||||||
ret=$?
|
ret=$?
|
||||||
cleanup
|
|
||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
-p|--protocols)
|
-p|--protocols)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
maketempf
|
maketempf
|
||||||
runprotocols ; ret=$?
|
runprotocols ; ret=$?
|
||||||
spdy ; ret=`expr $? + $ret`
|
spdy ; ret=`expr $? + $ret`
|
||||||
cleanup
|
|
||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
-f|--ciphers)
|
-f|--ciphers)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
maketempf
|
maketempf
|
||||||
run_std_cipherlists
|
run_std_cipherlists
|
||||||
ret=$?
|
ret=$?
|
||||||
cleanup
|
|
||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
-P|--preference)
|
-P|--preference)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
maketempf
|
maketempf
|
||||||
simple_preference
|
simple_preference
|
||||||
ret=$?
|
ret=$?
|
||||||
cleanup
|
|
||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
-y|--spdy|--google)
|
-y|--spdy|--google)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
maketempf
|
maketempf
|
||||||
spdy
|
spdy
|
||||||
ret=$?
|
ret=$?
|
||||||
cleanup
|
|
||||||
exit $? ;;
|
exit $? ;;
|
||||||
-B|--heartbleet)
|
-B|--heartbleet)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
@ -1860,7 +1853,6 @@ case "$1" in
|
|||||||
outln; blue "--> Testing for heartbleed vulnerability"; outln "\n"
|
outln; blue "--> Testing for heartbleed vulnerability"; outln "\n"
|
||||||
heartbleed
|
heartbleed
|
||||||
ret=$?
|
ret=$?
|
||||||
cleanup
|
|
||||||
exit $? ;;
|
exit $? ;;
|
||||||
-I|--ccs|--ccs_injection)
|
-I|--ccs|--ccs_injection)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
@ -1868,7 +1860,6 @@ case "$1" in
|
|||||||
outln; blue "--> Testing for CCS injection vulnerability"; outln "\n"
|
outln; blue "--> Testing for CCS injection vulnerability"; outln "\n"
|
||||||
ccs_injection
|
ccs_injection
|
||||||
ret=$?
|
ret=$?
|
||||||
cleanup
|
|
||||||
exit $? ;;
|
exit $? ;;
|
||||||
-R|--renegotiation)
|
-R|--renegotiation)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
@ -1876,7 +1867,6 @@ case "$1" in
|
|||||||
outln; blue "--> Testing for Renegotiation vulnerability"; outln "\n"
|
outln; blue "--> Testing for Renegotiation vulnerability"; outln "\n"
|
||||||
renego
|
renego
|
||||||
ret=$?
|
ret=$?
|
||||||
cleanup
|
|
||||||
exit $? ;;
|
exit $? ;;
|
||||||
-C|--compression|--crime)
|
-C|--compression|--crime)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
@ -1884,7 +1874,6 @@ case "$1" in
|
|||||||
outln; blue "--> Testing for CRIME vulnerability"; outln "\n"
|
outln; blue "--> Testing for CRIME vulnerability"; outln "\n"
|
||||||
crime
|
crime
|
||||||
ret=$?
|
ret=$?
|
||||||
cleanup
|
|
||||||
exit $? ;;
|
exit $? ;;
|
||||||
-T|--breach)
|
-T|--breach)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
@ -1893,7 +1882,6 @@ case "$1" in
|
|||||||
breach
|
breach
|
||||||
ret=$?
|
ret=$?
|
||||||
ret=`expr $? + $ret`
|
ret=`expr $? + $ret`
|
||||||
cleanup
|
|
||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
-0|--poodle)
|
-0|--poodle)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
@ -1902,21 +1890,18 @@ case "$1" in
|
|||||||
poodle
|
poodle
|
||||||
ret=$?
|
ret=$?
|
||||||
ret=`expr $? + $ret`
|
ret=`expr $? + $ret`
|
||||||
cleanup
|
|
||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
-4|--rc4|--appelbaum)
|
-4|--rc4|--appelbaum)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
maketempf
|
maketempf
|
||||||
rc4
|
rc4
|
||||||
ret=$?
|
ret=$?
|
||||||
cleanup
|
|
||||||
exit $? ;;
|
exit $? ;;
|
||||||
-s|--pfs|--fs|--nsa)
|
-s|--pfs|--fs|--nsa)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
maketempf
|
maketempf
|
||||||
pfs
|
pfs
|
||||||
ret=$?
|
ret=$?
|
||||||
cleanup
|
|
||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
-H|--header|--headers)
|
-H|--header|--headers)
|
||||||
parse_hn_port "$2"
|
parse_hn_port "$2"
|
||||||
@ -1927,7 +1912,6 @@ case "$1" in
|
|||||||
ret=$?
|
ret=$?
|
||||||
serverbanner
|
serverbanner
|
||||||
ret=`expr $? + $ret`
|
ret=`expr $? + $ret`
|
||||||
cleanup
|
|
||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
*)
|
*)
|
||||||
parse_hn_port "$1"
|
parse_hn_port "$1"
|
||||||
@ -1954,8 +1938,6 @@ case "$1" in
|
|||||||
|
|
||||||
rc4 ; ret=`expr $? + $ret`
|
rc4 ; ret=`expr $? + $ret`
|
||||||
pfs ; ret=`expr $? + $ret`
|
pfs ; ret=`expr $? + $ret`
|
||||||
|
|
||||||
cleanup
|
|
||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user