Skip to content

Instantly share code, notes, and snippets.

@nobiit
Created August 9, 2022 07:28
Show Gist options
  • Save nobiit/977a42365e4b52c660702b0b5e738b4f to your computer and use it in GitHub Desktop.
Save nobiit/977a42365e4b52c660702b0b5e738b4f to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
DOMAIN=${1}
printf "Testing SSL for %s ...\n" ${DOMAIN}
for item in $(dig +short ${DOMAIN} | sort); do
if [[ ${item} =~ ^[0-9.]+$ ]]; then
printf "%15s ..... " ${item}
if curl -s --resolve "${DOMAIN}:443:${item}" https://${DOMAIN} >>/dev/null; then
echo OK
else
echo Failed
fi
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment