Last active
August 29, 2015 13:58
-
-
Save michiel/10102208 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# check for heartbleed.com vuln | |
# quick, dirty, grain of salt, etc | |
declare -a hosts=('api.example.com' 'www.google.com') | |
for host in "${hosts[@]}"; | |
do | |
echo "Testing $host ..." | |
echo -e "quit\n" | openssl s_client -connect $host:443 -tlsextdebug 2>&1| [ "` grep -c 'TLS server extension \"heartbeat\" (id=15), len=1'`" -gt 0 ] && echo 'Vulnerable' || echo 'Not vulnerable' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment