Memory: Reduced default maximum bitmap size from 24 to 18 and give a notice to use --bitmap-max to restore
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "types.h"
|
||||
#include "memory.h"
|
||||
#include "bitmap.h"
|
||||
#include "event.h"
|
||||
|
||||
static void selftest_to_bitmap (const u32 dgst_shifts, char *digests_buf_ptr, const u32 dgst_pos0, const u32 dgst_pos1, const u32 dgst_pos2, const u32 dgst_pos3, const u32 bitmap_mask, u32 *bitmap_a, u32 *bitmap_b, u32 *bitmap_c, u32 *bitmap_d)
|
||||
{
|
||||
@@ -128,6 +129,11 @@ int bitmap_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
||||
break;
|
||||
}
|
||||
|
||||
if (bitmap_bits == bitmap_max)
|
||||
{
|
||||
EVENT_DATA (EVENT_BITMAP_FINAL_OVERFLOW, NULL, 0);
|
||||
}
|
||||
|
||||
bitmap_nums = 1u << bitmap_bits;
|
||||
|
||||
bitmap_mask = bitmap_nums - 1;
|
||||
|
||||
+15
@@ -580,6 +580,20 @@ static void main_bitmap_init_post (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYB
|
||||
event_log_info_nn (hashcat_ctx, "Generated bitmap tables...");
|
||||
}
|
||||
|
||||
static void main_bitmap_final_overflow (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const void *buf, MAYBE_UNUSED const size_t len)
|
||||
{
|
||||
const user_options_t *user_options = hashcat_ctx->user_options;
|
||||
|
||||
if (user_options->quiet == true) return;
|
||||
|
||||
event_log_advice (hashcat_ctx, "Bitmap table overflowed at %d bits.", user_options->bitmap_max);
|
||||
event_log_advice (hashcat_ctx, "This typically happens with too many hashes and reduces your performance.");
|
||||
event_log_advice (hashcat_ctx, "You can increase the bitmap table size with --bitmap-max, but");
|
||||
event_log_advice (hashcat_ctx, "this creates a trade-off between L2-cache and bitmap efficiency.");
|
||||
event_log_advice (hashcat_ctx, "It is therefore not guaranteed to restore full performance.");
|
||||
event_log_advice (hashcat_ctx, NULL);
|
||||
}
|
||||
|
||||
static void main_set_kernel_power_final (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const void *buf, MAYBE_UNUSED const size_t len)
|
||||
{
|
||||
const user_options_t *user_options = hashcat_ctx->user_options;
|
||||
@@ -954,6 +968,7 @@ static void event (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, co
|
||||
{
|
||||
case EVENT_BITMAP_INIT_POST: main_bitmap_init_post (hashcat_ctx, buf, len); break;
|
||||
case EVENT_BITMAP_INIT_PRE: main_bitmap_init_pre (hashcat_ctx, buf, len); break;
|
||||
case EVENT_BITMAP_FINAL_OVERFLOW: main_bitmap_final_overflow (hashcat_ctx, buf, len); break;
|
||||
case EVENT_CALCULATED_WORDS_BASE: main_calculated_words_base (hashcat_ctx, buf, len); break;
|
||||
case EVENT_CRACKER_FINISHED: main_cracker_finished (hashcat_ctx, buf, len); break;
|
||||
case EVENT_CRACKER_HASH_CRACKED: main_cracker_hash_cracked (hashcat_ctx, buf, len); break;
|
||||
|
||||
Reference in New Issue
Block a user