From 04ce8014ca93ba41f5265dab4136aed8227a22ed Mon Sep 17 00:00:00 2001 From: Olivier Paroz Date: Wed, 24 Sep 2014 17:20:35 +0200 Subject: [PATCH] Fixed sending of data to socket The stream had extra quotes on FreeBSD, so called printf directly. Also removed unnecessary `tr` call that should have been removed in previous commit --- testssl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testssl.sh b/testssl.sh index fa9a3a7..22763fa 100755 --- a/testssl.sh +++ b/testssl.sh @@ -462,7 +462,7 @@ std_cipherlists() { socksend() { data=`echo $1 | sed 's/tls_version/'"$2"'/g'` [ $VERBOSE -eq 1 ] && echo "\"$data\"" - out "$data" >&5 & + printf $data >&5 & sleep $3 } @@ -1062,7 +1062,7 @@ ccs_injection(){ outln fi - reply_sanitized=`echo "$SOCKREPLY" | "${HEXDUMPPLAIN[@]}" | tr -cd '[:print:]' | sed 's/^..........//'` + reply_sanitized=`echo "$SOCKREPLY" | "${HEXDUMPPLAIN[@]}" | sed 's/^..........//'` lines=`echo "$SOCKREPLY" | "${HEXDUMP[@]}" | wc -l` if [ "$reply_sanitized" == "0a" ] || [ "$lines" -gt 1 ] ; then