From ae3fb3516bb9846d43c5d055f566599faf19e9fc Mon Sep 17 00:00:00 2001 From: philsmd Date: Mon, 13 Mar 2017 22:42:51 +0100 Subject: [PATCH] remove: do not remove hashes unless --remove was specified --- src/hashcat.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/hashcat.c b/src/hashcat.c index 551a15df1..34fb6c84f 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -504,11 +504,14 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx) if (status_ctx->devices_status == STATUS_CRACKED) { - if (hashes->digests_saved != hashes->digests_done) + if (user_options->remove == true) { - const int rc = save_hash (hashcat_ctx); + if (hashes->digests_saved != hashes->digests_done) + { + const int rc = save_hash (hashcat_ctx); - if (rc == -1) return -1; + if (rc == -1) return -1; + } } EVENT (EVENT_POTFILE_ALL_CRACKED); @@ -690,11 +693,14 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx) if (status_ctx->devices_status == STATUS_CRACKED) { - if (hashes->digests_saved != hashes->digests_done) + if (user_options->remove == true) { - const int rc = save_hash (hashcat_ctx); + if (hashes->digests_saved != hashes->digests_done) + { + const int rc = save_hash (hashcat_ctx); - if (rc == -1) return -1; + if (rc == -1) return -1; + } } EVENT (EVENT_WEAK_HASH_ALL_CRACKED);