mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-07 09:10:57 +01:00
Move insertion of commas to a separate file
Create a separate function to insert the comma separators between findings for different tests within mass testing.
This commit is contained in:
parent
d8a7037000
commit
9f93d9d578
12
testssl.sh
12
testssl.sh
@ -956,6 +956,13 @@ fileout_banner() {
|
||||
#fi
|
||||
}
|
||||
|
||||
fileout_separator() {
|
||||
if "$JSONHEADER"; then
|
||||
"$do_pretty_json" && echo " ," >> "$JSONFILE"
|
||||
"$do_json" && echo -n "," >> "$JSONFILE"
|
||||
fi
|
||||
}
|
||||
|
||||
fileout_footer() {
|
||||
if "$JSONHEADER"; then
|
||||
fileout_json_footer
|
||||
@ -11847,10 +11854,7 @@ run_mass_testing() {
|
||||
cmdline="$0 $global_cmdline --warnings=batch $cmdline"
|
||||
draw_line "=" $((TERM_WIDTH / 2)); outln;
|
||||
outln "$cmdline"
|
||||
if ! "$first" && "$JSONHEADER"; then
|
||||
"$do_pretty_json" && echo " ," >> "$JSONFILE"
|
||||
"$do_json" && echo -n "," >> "$JSONFILE"
|
||||
fi
|
||||
"$first" || fileout_separator
|
||||
CHILD_MASS_TESTING=true $cmdline
|
||||
first=false
|
||||
done < "${FNAME}"
|
||||
|
Loading…
Reference in New Issue
Block a user