Skip to content

Commit 2d7cb0b

Browse files
committed
Fix and complete one/many salts debugging
1 parent 4bd6e83 commit 2d7cb0b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

run/john.conf

+3-1
Original file line numberDiff line numberDiff line change
@@ -565,9 +565,11 @@ TrustPadding = Y
565565
#somedirectory
566566
#$JOHN/my.pot
567567

568-
# Changing this to Yes will enable legacy-style benchmarks, for comparisons
569568
[Debug]
569+
# Changing this to Yes will enable legacy-style benchmarks, for comparisons
570570
Benchmarks_1_8 = N
571+
# Changing this to Yes will test salted formats as one/many salts, for debug
572+
BenchmarkMany = N
571573

572574
[PRINCE]
573575
# Default wordlist file name. Will fall back to standard wordlist if not

src/bench.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,9 @@ int benchmark_all(void)
742742
continue;
743743

744744
/* Hack for scripting raw/one/many tests, only test salted formats */
745-
if (!cfg_get_bool(SECTION_DEBUG, NULL, "BenchmarkMany", 0)) {
746-
if (!format->params.salt_size)
745+
if (cfg_get_bool(SECTION_DEBUG, NULL, "BenchmarkMany", 0)) {
746+
if (!format->params.salt_size ||
747+
(format->params.flags & FMT_DYNAMIC))
747748
continue;
748749
format->params.benchmark_length &= ~0x500;
749750
}

0 commit comments

Comments
 (0)