diff --git a/testssl.sh b/testssl.sh index f61b88d..6c487b2 100755 --- a/testssl.sh +++ b/testssl.sh @@ -453,23 +453,22 @@ fileout_footer() { } fileout() { # ID, SEVERITY, FINDING - local finding="$5" + local finding=$(strip_lf "$(newline_to_spaces "$(strip_quote "$3")")") if "$do_json"; then "$FIRST_FINDING" || echo "," >> $JSONFILE - finding=$(strip_quote "$3") echo -e " { - 'id' : '$1', - 'ip' : '$NODE/$NODEIP', - 'port' : '$PORT', - 'severity' : '$2', - 'finding' : '$finding' + \"id\" : \"$1\", + \"ip\" : \"$NODE/$NODEIP\", + \"port\" : \"$PORT\", + \"severity\" : \"$2\", + \"finding\" : \"$finding\" }" >> $JSONFILE fi # does the following do any sanitization? if "$do_csv"; then - echo -e \""$1\"",\"$NODE/$NODEIP\",\"$PORT"\",\""$2"\",\"$(strip_quote "$3")\"" >>$CSVFILE + echo -e \""$1\"",\"$NODE/$NODEIP\",\"$PORT"\",\""$2"\",\""$finding"\"" >>$CSVFILE fi "$FIRST_FINDING" && FIRST_FINDING=false }