Skip to content

Instantly share code, notes, and snippets.

@opless
Created April 25, 2013 14:52
Show Gist options
  • Save opless/5460312 to your computer and use it in GitHub Desktop.
Save opless/5460312 to your computer and use it in GitHub Desktop.
How to dump a SSL cert and determine if it's valid. Useful if someone is doing a MITM attack on you.
#!/bin/sh
echo "HEAD / HTTP/1.0\n Host: $1:443\n\n EOT\n" | openssl s_client -prexit -connect $1:443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment