Skip to content

Instantly share code, notes, and snippets.

View zafergurel's full-sized avatar
🏀
Focusing

Zafer Gürel zafergurel

🏀
Focusing
  • CTO@Perculus / PhDc@Ozyegin Uni.
  • İstanbul
  • X @xaferel
View GitHub Profile
@zafergurel
zafergurel / check-ssl-cert.sh
Created March 2, 2021 16:24
check-ssl-cert.sh
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"