Created
March 2, 2021 16:24
-
-
Save zafergurel/63290ac725f655b3d0b9e613e83d3569 to your computer and use it in GitHub Desktop.
check-ssl-cert.sh
This file contains 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
domain=$1 | |
ips="$(nslookup $1 | grep -zoP "Non-authoritative(.|\n)+" | grep -aPo "\d+\.\d+\.\d+\.\d+")"; | |
# echo $ips; | |
for ip in $ips; do | |
echo "Checking $domain on $ip"; | |
curl --resolve $domain:443:$ip https://$domain -s -S > /dev/null | |
curl --verbose --resolve $domain:443:$ip https://$domain 2>&1 | grep -E "expire" | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment