From ef78aec50b1c19a01aa60dc0c1f121e27b948677 Mon Sep 17 00:00:00 2001 From: Dirk Date: Sat, 15 Oct 2016 22:56:53 +0200 Subject: [PATCH] FIX #490 --- testssl.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index cf40357..a0573f8 100755 --- a/testssl.sh +++ b/testssl.sh @@ -463,7 +463,15 @@ fileout_header() { else "$do_json" && printf "[\n" > "$JSONFILE" fi - "$do_csv" && [[ ! -f "CSVFILE" ]] && echo "\"id\",\"fqdn/ip\",\"port\",\"severity\",\"finding\"" > "$CSVFILE" + if "$do_csv"; then + if [[ -f "$CSVFILE" ]]; then + # add lf, just for overview + echo >> "$CSVFILE" + else + # create file, with headline + echo "\"id\",\"fqdn/ip\",\"port\",\"severity\",\"finding\"" > "$CSVFILE" + fi + fi else "$do_json" && printf "[\n" > "$JSONFILE" "$do_csv" && echo "\"id\",\"fqdn/ip\",\"port\",\"severity\",\"finding\"" > "$CSVFILE"