Skip to content

Commit 7f49ea7

Browse files
author
Patrick Bogen
committed
Merge branch 'pdbogen-master'
2 parents 947096d + d3d7441 commit 7f49ea7

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

cipherTest.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [ "z$1" = "z" -o "z$2" = "z" ]
2828
then
2929
echo "Usage: $0 <hostname> <port>" >&2
3030
echo " Behavior is undefined if hostname is invalid or not listening on the port." >&2
31-
echo " Credits: Patrick Bogen <pbogen@twitter.com>" >&2
31+
echo " Credits: Patrick Bogen <pbogen@twitter.com>, <pdbogen@cernu.us>" >&2
3232
exit 2
3333
fi
3434

@@ -195,7 +195,7 @@ do
195195
if [ $OK -eq 1 ]
196196
then
197197
[ -t 1 ] && echo -en '\r\e[K'
198-
printf '%-7s %-17s %-10s %-11s\n' "SSL2.0" $v2_cipher $_mac $_kx
198+
printf '\e[1;31m%-7s %-17s %-10s %-11s\n\e[00m' "SSL2.0" $v2_cipher $_mac $_kx
199199
# openssl ciphers -v -ssl2 | grep ^$i || echo "No match for $i"
200200
fi
201201
done
@@ -220,12 +220,14 @@ do
220220
do
221221
i=$(( $i + 1 ))
222222
[ -t 1 ] && printf '\r%-7s %-17s %-10s %-11s (%d / %d)' $proto $cipher $mac $kx $i $total
223-
# printf "%-7s %-17s %-10s %-11s " $proto $cipher $mac $kx
224223
echo -ne $request | gnutls-cli --insecure --priority NONE:+VERS-$proto:+$kx:+$mac:+COMP-NULL:+$cipher -p $PORT $IP > /dev/null 2>&1
225224
if [ $? -eq 0 ]
226225
then
227226
[ -t 1 ] && echo -en "\r\e[K"
227+
[ $mac = "MD5" ] && echo -ne '\e[1;31m'
228+
[ $cipher = "ARCFOUR-40" ] && echo -ne '\e[1;31m'
228229
printf "%-7s %-17s %-10s %-11s\n" $proto $cipher $mac $kx
230+
echo -ne '\e[00m'
229231
fi
230232
done
231233
done

0 commit comments

Comments
 (0)