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
This commit is contained in:
Olivier Paroz 2014-09-24 17:20:35 +02:00
parent 4ad8ae7659
commit 04ce8014ca

View File

@ -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