Skip to content

Instantly share code, notes, and snippets.

@astropuffin
Last active August 9, 2017 01:59
Show Gist options
  • Save astropuffin/d38d0db74824f543d179e0816ea9b992 to your computer and use it in GitHub Desktop.
Save astropuffin/d38d0db74824f543d179e0816ea9b992 to your computer and use it in GitHub Desktop.
check tls certs
#!/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