Skip to content

Instantly share code, notes, and snippets.

@digitalist
Created February 7, 2020 21:06
Show Gist options
  • Save digitalist/3f8d3ed88aaaf35290754892fdef7f3d to your computer and use it in GitHub Desktop.
Save digitalist/3f8d3ed88aaaf35290754892fdef7f3d to your computer and use it in GitHub Desktop.
check tls version/cipher for domain list
#!/bin/bash
#usage: ./tls.sh domains.txt
##domains.txt:
#google.com
#cloudflare.com
# ...etc
# https://stackoverflow.com/a/11394045/5006740
IFS=$'\n' read -d '' -r -a arr < "${1}"
## now loop through the above array
for i in "${arr[@]}"
do
printf "${i}: " && echo "Q" | openssl s_client -connect "${i}":443 2>&1 | grep TLS | grep -i cipher
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment