From 77fc111b1365536f90d30d94629ff0f494603662 Mon Sep 17 00:00:00 2001 From: Dirk Date: Mon, 20 Nov 2017 16:33:40 +0100 Subject: [PATCH] put new socksend() into production FIX #902. Performance improvements LAN (just one shot): ``` 58 / 50 52 / 44 53 / 47 143 / 137 63 / 53 48 / 43 ``` WAN: ``` 89 / 77 88/ 67 234 / 231 67 / 63 84 / 81 ``` --- testssl.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testssl.sh b/testssl.sh index 8999de7..c6798ab 100755 --- a/testssl.sh +++ b/testssl.sh @@ -2598,7 +2598,7 @@ std_cipherlists() { # sockets inspired by http://blog.chris007.de/?p=238 # ARG1: hexbyte with a leading comma (!!), separated by commas # ARG2: sleep -socksend() { +socksend2() { local data # the following works under BSD and Linux, which is quite tricky. So don't mess with it unless you're really sure what you do @@ -2612,12 +2612,12 @@ socksend() { sleep $2 } -socksend2() { +socksend() { local data line # read line per line and strip comments (bash internal func can't handle multiline statements data="$(while read line; do - printf "${line%\#*}" + printf "${line%%\#*}" done <<< "$1" )" data="${data// /}" # strip ' ' data="${data//,/\\}" # s&r , by \