mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-10-30 21:35:26 +01:00 
			
		
		
		
	Using square brackets in tr results in trying to match/replace them
This commit is contained in:
		| @@ -2288,11 +2288,11 @@ beast(){ | |||||||
|  |  | ||||||
| 		#detected_cbc_cipher=$(echo $detected_cbc_cipher | sed 's/ //g') | 		#detected_cbc_cipher=$(echo $detected_cbc_cipher | sed 's/ //g') | ||||||
| 		if [ -z "$detected_cbc_cipher" ]; then | 		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 | 		else | ||||||
| 			detected_cbc_cipher=$(echo "$detected_cbc_cipher" | sed -e 's/ /\n      '"${spaces}"'/9' -e 's/ /\n      '"${spaces}"'/6' -e 's/ /\n      '"${spaces}"'/3') | 			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" | 			[ $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 | 			ret=1 | ||||||
| 			detected_cbc_cipher="" | 			detected_cbc_cipher="" | ||||||
| 		fi | 		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) | 	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 | 	case "$1" in | ||||||
| 		ftp|smtp|pop3|imap|xmpp|telnet|ldap) | 		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 | 			$OPENSSL s_client -connect $NODEIP:$PORT $SNI -starttls $protocol </dev/null >$TMPFILE 2>&1 | ||||||
| 			ret=$? | 			ret=$? | ||||||
| 			if [ $ret -ne 0 ]; then | 			if [ $ret -ne 0 ]; then | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Mark Felder
					Mark Felder