mirror of
https://github.com/drwetter/testssl.sh.git
synced 2026-08-03 21:07:39 +02:00
Fix bogus "Scan interrupted" scanTime in mass-testing JSON (#1246)
In mass-testing mode main() runs run_mass_testing()/run_mass_testing_parallel() and exits without ever calling lets_roll() for the scan itself, so calc_scantime() never runs and SCAN_TIME stays 0. fileout_json_footer(), invoked from cleanup() on exit, treats SCAN_TIME==0 as an interrupted scan and writes "scanTime": "Scan interrupted" for the whole batch. START_TIME is already set by the earlier "lets_roll init" call, so compute the overall scan time with calc_scantime() before exiting the mass-testing path. The aggregate footer now reports the real elapsed time as an INFO finding instead of a spurious WARN.
This commit is contained in:
+6
-1
@@ -26291,7 +26291,12 @@ lets_roll() {
|
|||||||
else
|
else
|
||||||
run_mass_testing
|
run_mass_testing
|
||||||
fi
|
fi
|
||||||
exit $?
|
RET=$?
|
||||||
|
# START_TIME was set by "lets_roll init" above; compute the overall scan
|
||||||
|
# time here so fileout_json_footer() doesn't mistake it for an interrupted
|
||||||
|
# scan (SCAN_TIME==0) and report "Scan interrupted", see #1246
|
||||||
|
calc_scantime
|
||||||
|
exit $RET
|
||||||
fi
|
fi
|
||||||
html_banner
|
html_banner
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user