mirror of
https://github.com/captn3m0/Scripts.git
synced 2024-09-05 19:57:28 +00:00
26 lines
618 B
Bash
26 lines
618 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
# OpenSSL requires the port number.
|
||
|
SERVER=216.119.218.146:443
|
||
|
DELAY=1
|
||
|
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g')
|
||
|
|
||
|
echo Obtaining cipher list from $(openssl version).
|
||
|
|
||
|
for cipher in ${ciphers[@]}
|
||
|
do
|
||
|
echo -n Testing $cipher...
|
||
|
result=$(echo -n | openssl s_client -cipher "$cipher" -connect $SERVER 2>&1)
|
||
|
if [[ "$result" =~ ":error:" ]] ; then
|
||
|
error=$(echo -n $result | cut -d':' -f6)
|
||
|
echo NO \($error\)
|
||
|
else
|
||
|
if [[ "$result" =~ "Cipher is ${cipher}" || "$result" =~ "Cipher :" ]] ; then
|
||
|
echo YES
|
||
|
else
|
||
|
echo UNKNOWN RESPONSE
|
||
|
echo $result
|
||
|
fi
|
||
|
fi
|
||
|
sleep $DELAY
|
||
|
done
|