mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
NEW: first working implementation of "-x <list_of_csv_hexcodes> server" with a catch: none a/v local cipher
This commit is contained in:
parent
a2cd77c4ee
commit
481af083a3
36
testssl.sh
36
testssl.sh
@ -584,38 +584,30 @@ neat_list(){
|
|||||||
|
|
||||||
test_just_one(){
|
test_just_one(){
|
||||||
|
|
||||||
ciph=""
|
# erstmal überprüfen, ob openssl den cipher überhaupt hat | oder per socket
|
||||||
for arg in $@; do
|
|
||||||
$OPENSSL ciphers -V 'ALL:COMPLEMENTOFALL:@STRENGTH' | while read hexcode dash ciph restofline; do
|
|
||||||
normalize_ciphercode $hexcode
|
|
||||||
grep arg
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
neat_header
|
neat_header
|
||||||
|
for arg in `echo $@ | sed 's/,/ /g'`; do
|
||||||
|
$OPENSSL ciphers -V 'ALL:COMPLEMENTOFALL:@STRENGTH' | while read hexcode dash ciph sslvers kx auth enc mac export ; do
|
||||||
|
normalize_ciphercode $hexcode
|
||||||
|
neat_list $HEXC $ciph $kx $enc | strings | grep -qwai "$arg" # -w doesn't work yest for cipher strings --> column positioning
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
$OPENSSL s_client -cipher $ciph $STARTTLS -connect $NODEIP:$PORT $SNI &>$TMPFILE </dev/null
|
||||||
|
ret=$?
|
||||||
|
neat_list $HEXC $ciph $kx $enc
|
||||||
|
|
||||||
$OPENSSL ciphers -V 'ALL:COMPLEMENTOFALL:@STRENGTH' | while read hexcode dash ciph sslversmin kx auth enc mac export; do
|
|
||||||
for ciph in $@; do
|
|
||||||
$OPENSSL s_client -cipher $ciph $STARTTLS -connect $NODEIP:$PORT $SNI &>$TMPFILE </dev/null
|
|
||||||
ret=$?
|
|
||||||
if [ $ret -ne 0 ] && [ "$SHOW_EACH_C" -eq 0 ]; then
|
|
||||||
continue # no successful connect AND not verbose displaying each cipher
|
|
||||||
fi
|
|
||||||
normalize_ciphercode $hexcode
|
|
||||||
neat_list $HEXC $ciph $kx $enc
|
|
||||||
if [ "$SHOW_EACH_C" -ne 0 ]; then
|
|
||||||
[ -r $MAP_RFC_FNAME ] && go2_column 114
|
|
||||||
if [ $ret -eq 0 ]; then
|
if [ $ret -eq 0 ]; then
|
||||||
cyan " available"
|
cyan " available"
|
||||||
else
|
else
|
||||||
out " not a/v"
|
out " not a/v"
|
||||||
fi
|
fi
|
||||||
|
outln
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
outln
|
|
||||||
rm $TMPFILE
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
outln
|
||||||
|
rm $TMPFILE
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1955,7 +1947,7 @@ case "$1" in
|
|||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# $Id: testssl.sh,v 1.131 2014/10/30 20:12:17 dirkw Exp $
|
# $Id: testssl.sh,v 1.132 2014/11/02 22:37:16 dirkw Exp $
|
||||||
# vim:ts=5:sw=5
|
# vim:ts=5:sw=5
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user