Skip to content

Instantly share code, notes, and snippets.

@sasqwatch
Forked from gwen001/sslsub.sh
Created August 18, 2020 04:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sasqwatch/a5206e53db6a5902435f993da32a60e9 to your computer and use it in GitHub Desktop.
Save sasqwatch/a5206e53db6a5902435f993da32a60e9 to your computer and use it in GitHub Desktop.
get altnames from ssl certificates
function sslsub() {
timeout 3 openssl s_client -showcerts -servername $1 -connect $1:443 <<< "Q" 2>/dev/null | openssl x509 -text -noout | grep DNS | tr ',' '\n' | cut -d ':' -f 2 | sort -fu
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment