mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +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
|
||||
"$FIRST_FINDING" || echo "," >> $JSONFILE
|
||||
finding=$(strip_quote "$3")
|
||||
finding=$(newline_to_spaces "$(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?
|
||||
|
Loading…
Reference in New Issue
Block a user