Last active
August 9, 2017 01:59
-
-
Save astropuffin/d38d0db74824f543d179e0816ea9b992 to your computer and use it in GitHub Desktop.
check tls certs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| while read d; do | |
| echo $d | |
| gtimeout 1 nc -z $d 443 | |
| if [ $? -eq 0 ]; then | |
| gtimeout 2 openssl s_client -connect $d:443 2> /dev/null < /dev/null| openssl x509 -noout -dates | |
| else | |
| echo "No TLS enabled" | |
| fi | |
| done< domains |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment