Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- if [ -z "$1" ]; then
- echo "Usage: `basename $0` hostname [hostname]..."
- exit $E_NOARGS
- fi
- until [ -z "$1" ]; do
- host=$1
- if [[ $host != *:* ]]; then
- host="$host:443"
- fi
- cert=`echo | openssl s_client -connect $host 2>/dev/null`
- echo "= $host ="
- echo "$cert" | openssl x509 -noout -fingerprint -md5
- echo "$cert" | openssl x509 -noout -fingerprint -sha1
- echo "$cert" | openssl x509 -noout -fingerprint -sha256
- echo
- shift
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement