fix escaping of debugging output.  credits to @dcooper16
This commit is contained in:
Dirk 2017-11-17 20:56:18 +01:00
parent 52809d0800
commit 98f4f28017
1 changed files with 4 additions and 4 deletions

View File

@ -2604,7 +2604,7 @@ socksend() {
else else
data=$(sed -e 's/# .*$//g' -e 's/ //g' <<< "$1" | sed -r 's/^[[:space:]]+//; s/[[:space:]]+$//; /^$/d' | sed 's/,/\\/g' | tr -d '\n') data=$(sed -e 's/# .*$//g' -e 's/ //g' <<< "$1" | sed -r 's/^[[:space:]]+//; s/[[:space:]]+$//; /^$/d' | sed 's/,/\\/g' | tr -d '\n')
fi fi
[[ $DEBUG -ge 4 ]] && safe_echo "\"$data\"" [[ $DEBUG -ge 4 ]] && echo && echo "\"$data\""
printf -- "$data" >&5 2>/dev/null & printf -- "$data" >&5 2>/dev/null &
sleep $2 sleep $2
} }
@ -3783,7 +3783,7 @@ client_simulation_sockets() {
code2network "${data}" code2network "${data}"
data="$NW_STR" data="$NW_STR"
fd_socket 5 || return 6 fd_socket 5 || return 6
[[ "$DEBUG" -ge 4 ]] && echo "\"$data\"" [[ "$DEBUG" -ge 4 ]] && echo && echo "\"$data\""
printf -- "$data" >&5 2>/dev/null & printf -- "$data" >&5 2>/dev/null &
sleep $USLEEP_SND sleep $USLEEP_SND
@ -7932,7 +7932,7 @@ socksend_sslv2_clienthello() {
code2network "$1" code2network "$1"
data="$NW_STR" data="$NW_STR"
[[ "$DEBUG" -ge 4 ]] && echo "\"$data\"" [[ "$DEBUG" -ge 4 ]] && echo && echo "\"$data\""
printf -- "$data" >&5 2>/dev/null & printf -- "$data" >&5 2>/dev/null &
sleep $USLEEP_SND sleep $USLEEP_SND
} }
@ -9768,7 +9768,7 @@ socksend_tls_clienthello() {
code2network "$TLS_CLIENT_HELLO$all_extensions" code2network "$TLS_CLIENT_HELLO$all_extensions"
data="$NW_STR" data="$NW_STR"
[[ "$DEBUG" -ge 4 ]] && echo "\"$data\"" [[ "$DEBUG" -ge 4 ]] && echo && echo "\"$data\""
printf -- "$data" >&5 2>/dev/null & printf -- "$data" >&5 2>/dev/null &
sleep $USLEEP_SND sleep $USLEEP_SND