mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-06 00:39:44 +01:00
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 ```
This commit is contained in:
parent
209b21c817
commit
77fc111b13
@ -2598,7 +2598,7 @@ std_cipherlists() {
|
|||||||
# sockets inspired by http://blog.chris007.de/?p=238
|
# sockets inspired by http://blog.chris007.de/?p=238
|
||||||
# ARG1: hexbyte with a leading comma (!!), separated by commas
|
# ARG1: hexbyte with a leading comma (!!), separated by commas
|
||||||
# ARG2: sleep
|
# ARG2: sleep
|
||||||
socksend() {
|
socksend2() {
|
||||||
local data
|
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
|
# 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
|
sleep $2
|
||||||
}
|
}
|
||||||
|
|
||||||
socksend2() {
|
socksend() {
|
||||||
local data line
|
local data line
|
||||||
|
|
||||||
# read line per line and strip comments (bash internal func can't handle multiline statements
|
# read line per line and strip comments (bash internal func can't handle multiline statements
|
||||||
data="$(while read line; do
|
data="$(while read line; do
|
||||||
printf "${line%\#*}"
|
printf "${line%%\#*}"
|
||||||
done <<< "$1" )"
|
done <<< "$1" )"
|
||||||
data="${data// /}" # strip ' '
|
data="${data// /}" # strip ' '
|
||||||
data="${data//,/\\}" # s&r , by \
|
data="${data//,/\\}" # s&r , by \
|
||||||
|
Loading…
Reference in New Issue
Block a user