From f2944205b9827f0af5272851c9bb354421e11dd2 Mon Sep 17 00:00:00 2001 From: Dirk Date: Tue, 19 Jun 2018 10:27:42 +0200 Subject: [PATCH] Fix output error when $HEADERFILE was empty --- testssl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testssl.sh b/testssl.sh index fa862f1..76a466b 100755 --- a/testssl.sh +++ b/testssl.sh @@ -1848,8 +1848,8 @@ run_http_header() { NOW_TIME=$(($(date "+%s") - HAD_SLEPT)) HTTP_TIME=$(awk -F': ' '/^date:/ { print $2 } /^Date:/ { print $2 }' $HEADERFILE) else - prln_warning " likely HTTP header requests failed (#lines: ${$(wc -l < "$HEADERFILE")// /}" - [[ "$DEBUG" -lt 1 ]] & outln "Rerun with DEBUG>=1 and inspect \"run_http_header.txt\"\n" + prln_warning " likely HTTP header requests failed (#lines: $(wc -l $HEADERFILE | awk '{ print $1 }'))" + [[ "$DEBUG" -lt 1 ]] & outln "Rerun with DEBUG>=1 and inspect $HEADERFILE\n" fileout "HTTP_status_code" "WARN" "HTTP header request failed" debugme cat $HEADERFILE ((NR_HEADER_FAIL++))