Skip to content

Instantly share code, notes, and snippets.

@philcryer
Created June 25, 2018 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philcryer/5ce6746b1ec8487196d7e897425ee526 to your computer and use it in GitHub Desktop.
Save philcryer/5ce6746b1ec8487196d7e897425ee526 to your computer and use it in GitHub Desktop.
Quickly query a domain's SSL configuration and describe what SSL Ciphers it accepts.
#!/bin/bash
if [ $# -eq 0 ]
then
echo "No fqdn given to check, try again (ie- $0 yahoo.com)"
exit 1
fi
for v in ssl2 ssl3 tls1 tls1_1 tls1_2; do
for c in $(openssl ciphers 'ALL:eNULL' | tr ':' ' '); do
openssl s_client -connect ${1}:443 \
-cipher $c -$v < /dev/null > /dev/null 2>&1 && echo -e "$v:\t$c"
done
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment