Skip to content

Instantly share code, notes, and snippets.

@subfission
Created October 2, 2018 22:05
Show Gist options
  • Select an option

  • Save subfission/4061ca6f3bd60d00cabe880f04ac5520 to your computer and use it in GitHub Desktop.

Select an option

Save subfission/4061ca6f3bd60d00cabe880f04ac5520 to your computer and use it in GitHub Desktop.
Interrogate those darn SSL certs!
#!/bin/bash
#
# Written By Zach Jetson
# Licence: MIT
#
# Use OpenSSL to inspect the decoded SSL cert
if [ -z "$1" ]; then
printf "[!] Error: missing domain in argument\n\n"
printf "usage: ssl_remotecert domain\n\n"
printf "\tdomain\tThe domain to query for SSL certs\n\n"
exit 1
fi
echo | openssl s_client -servername $1 -connect $1:443 2>/dev/null | openssl x509 -noout -text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment