From 63a1df1fe28c2e18f87657b2a03c172a5e4f4dd3 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sun, 15 Mar 2015 09:02:05 -0500 Subject: [PATCH] Using square brackets in tr results in trying to match/replace them --- testssl.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testssl.sh b/testssl.sh index 596ae44..02621fa 100755 --- a/testssl.sh +++ b/testssl.sh @@ -2288,11 +2288,11 @@ beast(){ #detected_cbc_cipher=$(echo $detected_cbc_cipher | sed 's/ //g') if [ -z "$detected_cbc_cipher" ]; then - pr_litegreenln "no CBC ciphers for $(echo $proto | tr '[a-z]' '[A-Z]') (OK)" + pr_litegreenln "no CBC ciphers for $(echo $proto | tr 'a-z' 'A-Z') (OK)" else detected_cbc_cipher=$(echo "$detected_cbc_cipher" | sed -e 's/ /\n '"${spaces}"'/9' -e 's/ /\n '"${spaces}"'/6' -e 's/ /\n '"${spaces}"'/3') [ $ret -eq 1 ] && out "$spaces" - out "$(echo $proto | tr '[a-z]' '[A-Z]'):"; pr_brownln "$detected_cbc_cipher" + out "$(echo $proto | tr 'a-z' 'A-Z'):"; pr_brownln "$detected_cbc_cipher" ret=1 detected_cbc_cipher="" fi @@ -2385,7 +2385,7 @@ starttls() { protocol=$(echo "$1" | sed 's/s$//') # strip trailing s in ftp(s), smtp(s), pop3(s), imap(s), ldap(s), telnet(s) case "$1" in ftp|smtp|pop3|imap|xmpp|telnet|ldap) - outln " Trying STARTTLS via $(echo $protocol| tr '[a-z]' '[A-Z]')\n" + outln " Trying STARTTLS via $(echo $protocol| tr 'a-z' 'A-Z')\n" $OPENSSL s_client -connect $NODEIP:$PORT $SNI -starttls $protocol $TMPFILE 2>&1 ret=$? if [ $ret -ne 0 ]; then