Last active
February 23, 2021 15:55
-
-
Save hahwul/2a93156d22ba150c8878ffe661868744 to your computer and use it in GitHub Desktop.
Emun cipher suite of website (only use openssl)
This file contains 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
SERVER=$1 | |
DELAY=1 | |
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g') | |
echo Enum cipher list from $(openssl version). | |
echo "========================" | |
for cipher in ${ciphers[@]} | |
do | |
result=$(echo -n | openssl s_client -cipher "$cipher" -connect $SERVER 2>&1) | |
if [[ "$result" =~ ":error:" ]] ; then | |
a=1 | |
else | |
if [[ "$result" =~ "Cipher is ${cipher}" || "$result" =~ "Cipher :" ]] ; then | |
echo ${cipher} | |
fi | |
fi | |
sleep $DELAY | |
done | |
# ./enum-ciphersuite.sh www.hahwul.com:443 | |
# Enum cipher list from LibreSSL 2.8.3. | |
# ======================== | |
# ECDHE-RSA-AES256-GCM-SHA384 | |
# ECDHE-RSA-AES256-SHA384 | |
# ECDHE-RSA-AES256-SHA | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment