Skip to content

Instantly share code, notes, and snippets.

@fliiiix
Last active August 29, 2015 13:56
Show Gist options
  • Save fliiiix/9233547 to your computer and use it in GitHub Desktop.
Save fliiiix/9233547 to your computer and use it in GitHub Desktop.
shameless stolen from http://superuser.com/a/224263/303350
#!/usr/bin/env bash
# OpenSSL requires the port number.
SERVER=s.ytimg.com:443
DELAY=1
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g')
echo Obtaining cipher list from $(openssl version).
for cipher in ${ciphers[@]}
do
echo -n Testing $cipher...
result=$(echo -n | openssl s_client -cipher "$cipher" -connect $SERVER 2>&1)
if [[ "$result" =~ "Cipher is " ]] ; then
echo YES
else
if [[ "$result" =~ ":error:" ]] ; then
error=$(echo -n $result | cut -d':' -f6)
echo NO \($error\)
else
echo UNKNOWN RESPONSE
echo $result
fi
fi
sleep $DELAY
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment