Using square brackets in tr results in trying to match/replace them

This commit is contained in:
Mark Felder 2015-03-15 09:02:05 -05:00 committed by Mark Felder
parent 655944bd4d
commit 63a1df1fe2
1 changed files with 3 additions and 3 deletions

View File

@ -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 </dev/null >$TMPFILE 2>&1
ret=$?
if [ $ret -ne 0 ]; then