mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-07 17:20:57 +01:00
fix json output
use double quotes instead of single quotes delete newlines from strings
This commit is contained in:
parent
70cd658447
commit
b2e4df60ca
12
testssl.sh
12
testssl.sh
@ -457,14 +457,14 @@ fileout() { # ID, SEVERITY, FINDING
|
|||||||
|
|
||||||
if "$do_json"; then
|
if "$do_json"; then
|
||||||
"$FIRST_FINDING" || echo "," >> $JSONFILE
|
"$FIRST_FINDING" || echo "," >> $JSONFILE
|
||||||
finding=$(strip_quote "$3")
|
finding=$(newline_to_spaces "$(strip_quote "$3")")
|
||||||
echo -e "
|
echo -e "
|
||||||
{
|
{
|
||||||
'id' : '$1',
|
\"id\" : \"$1\",
|
||||||
'ip' : '$NODE/$NODEIP',
|
\"ip\" : \"$NODE/$NODEIP\",
|
||||||
'port' : '$PORT',
|
\"port\" : \"$PORT\",
|
||||||
'severity' : '$2',
|
\"severity\" : \"$2\",
|
||||||
'finding' : '$finding'
|
\"finding\" : \"$finding\"
|
||||||
}" >> $JSONFILE
|
}" >> $JSONFILE
|
||||||
fi
|
fi
|
||||||
# does the following do any sanitization?
|
# does the following do any sanitization?
|
||||||
|
Loading…
Reference in New Issue
Block a user