mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-07 09:10:57 +01:00
Another fix for #140
Suppress awk warnings Don't try to retrieve header information from openssl stderr output
This commit is contained in:
parent
c05de1801f
commit
c04497f2f6
@ -531,15 +531,15 @@ EOF
|
|||||||
ret=0
|
ret=0
|
||||||
else
|
else
|
||||||
#TODO: attention: if this runs into a timeout, we're dead. Try again differently:
|
#TODO: attention: if this runs into a timeout, we're dead. Try again differently:
|
||||||
printf "$GET_REQ11" | $OPENSSL s_client $OPTIMAL_PROTO -quiet -ign_eof -connect $NODEIP:$PORT $PROXY $SNI &>$HEADERFILE
|
printf "$GET_REQ11" | $OPENSSL s_client $OPTIMAL_PROTO -quiet -ign_eof -connect $NODEIP:$PORT $PROXY $SNI 1>$HEADERFILE 2>/dev/null
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
pr_litemagentaln " failed (HTTP header request stalled)"
|
pr_litemagentaln " failed (HTTP header request stalled)"
|
||||||
return 3
|
return 3
|
||||||
#ret=3
|
#ret=3
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
status_code=$(awk '/^HTTP\// { print $2 }' $HEADERFILE)
|
status_code=$(awk '/^HTTP\// { print $2 }' $HEADERFILE 2>/dev/null)
|
||||||
msg_thereafter=$(awk -F"$status_code" '/^HTTP\// { print $2 }' $HEADERFILE) # dirty trick to use the status code as a
|
msg_thereafter=$(awk -F"$status_code" '/^HTTP\// { print $2 }' $HEADERFILE 2>/dev/null) # dirty trick to use the status code as a
|
||||||
msg_thereafter=$(strip_lf "$msg_thereafter") # field separator, otherwise we need a loop with awk
|
msg_thereafter=$(strip_lf "$msg_thereafter") # field separator, otherwise we need a loop with awk
|
||||||
debugme echo "Status/MSG: $status_code $msg_thereafter"
|
debugme echo "Status/MSG: $status_code $msg_thereafter"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user