mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Fix output error when $HEADERFILE was empty
This commit is contained in:
parent
d23241b8cd
commit
f2944205b9
@ -1848,8 +1848,8 @@ run_http_header() {
|
|||||||
NOW_TIME=$(($(date "+%s") - HAD_SLEPT))
|
NOW_TIME=$(($(date "+%s") - HAD_SLEPT))
|
||||||
HTTP_TIME=$(awk -F': ' '/^date:/ { print $2 } /^Date:/ { print $2 }' $HEADERFILE)
|
HTTP_TIME=$(awk -F': ' '/^date:/ { print $2 } /^Date:/ { print $2 }' $HEADERFILE)
|
||||||
else
|
else
|
||||||
prln_warning " likely HTTP header requests failed (#lines: ${$(wc -l < "$HEADERFILE")// /}"
|
prln_warning " likely HTTP header requests failed (#lines: $(wc -l $HEADERFILE | awk '{ print $1 }'))"
|
||||||
[[ "$DEBUG" -lt 1 ]] & outln "Rerun with DEBUG>=1 and inspect \"run_http_header.txt\"\n"
|
[[ "$DEBUG" -lt 1 ]] & outln "Rerun with DEBUG>=1 and inspect $HEADERFILE\n"
|
||||||
fileout "HTTP_status_code" "WARN" "HTTP header request failed"
|
fileout "HTTP_status_code" "WARN" "HTTP header request failed"
|
||||||
debugme cat $HEADERFILE
|
debugme cat $HEADERFILE
|
||||||
((NR_HEADER_FAIL++))
|
((NR_HEADER_FAIL++))
|
||||||
|
Loading…
Reference in New Issue
Block a user