From ff6e403703ef6f71cdd6f16504a761ff6ff8bbff Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Thu, 1 Nov 2018 12:03:28 +0100 Subject: [PATCH] Fixed ignoring --brain-client-features configuration in case brain-server has attack positions informations from a previous run --- docs/changes.txt | 1 + src/dispatch.c | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 7f5e08ad2..d762b3e87 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -26,6 +26,7 @@ ## Bugs ## +- Fixed ignoring --brain-client-features configuration in case brain-server has attack positions informations from a previous run - Fixed missing call to WSAStartup() and client indexing in order to start the brain server on windows - Fixed missing call to WSACleanup() to cleanly shutdown windows sockets system - Fixed endianness and invalid separator character in outfile format of hash-mode 16801 (WPA-PMKID-PMK) diff --git a/src/dispatch.c b/src/dispatch.c index ce000cc35..8d0f4af4a 100644 --- a/src/dispatch.c +++ b/src/dispatch.c @@ -391,19 +391,22 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param) brain_client_disconnect (device_param); } - hc_thread_mutex_lock (status_ctx->mux_dispatcher); - - if (status_ctx->words_off == 0) + if (user_options->brain_client_features & BRAIN_CLIENT_FEATURE_ATTACKS) { - status_ctx->words_off = highest; + hc_thread_mutex_lock (status_ctx->mux_dispatcher); - for (u32 salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++) + if (status_ctx->words_off == 0) { - status_ctx->words_progress_rejected[salt_pos] = status_ctx->words_off; + status_ctx->words_off = highest; + + for (u32 salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++) + { + status_ctx->words_progress_rejected[salt_pos] = status_ctx->words_off; + } } - } - hc_thread_mutex_unlock (status_ctx->mux_dispatcher); + hc_thread_mutex_unlock (status_ctx->mux_dispatcher); + } } #endif