|
|
|
@ -5,17 +5,16 @@
|
|
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
#include "types.h"
|
|
|
|
|
#include "bitops.h"
|
|
|
|
|
#include "convert.h"
|
|
|
|
|
#include "memory.h"
|
|
|
|
|
#include "event.h"
|
|
|
|
|
#include "interface.h"
|
|
|
|
|
#include "hashes.h"
|
|
|
|
|
#include "filehandling.h"
|
|
|
|
|
#include "loopback.h"
|
|
|
|
|
#include "outfile.h"
|
|
|
|
|
#include "potfile.h"
|
|
|
|
|
#include "locking.h"
|
|
|
|
|
#include "shared.h"
|
|
|
|
|
#include "potfile.h"
|
|
|
|
|
|
|
|
|
|
static const char MASKED_PLAIN[] = "[notfound]";
|
|
|
|
|
|
|
|
|
@ -378,7 +377,7 @@ int potfile_remove_parse (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
if (potfile_ctx->enabled == false) return 0;
|
|
|
|
|
|
|
|
|
|
if (hashconfig->potfile_disable == true) return 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (hashconfig->opts_type & OPTS_TYPE_PT_NEVERCRACK) return 0;
|
|
|
|
|
|
|
|
|
|
// if no potfile exists yet we don't need to do anything here
|
|
|
|
@ -667,11 +666,11 @@ int potfile_handle_show (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
u8 *out_buf = potfile_ctx->out_buf;
|
|
|
|
|
|
|
|
|
|
int out_len = ascii_digest (hashcat_ctx->hashconfig, hashcat_ctx->hashes, hashcat_ctx->module_ctx, (char *) out_buf + 0, HCBUFSIZ_LARGE - 0, salt_idx, digest_idx);
|
|
|
|
|
int out_len = hash_encode (hashcat_ctx->hashconfig, hashcat_ctx->hashes, hashcat_ctx->module_ctx, (char *) out_buf + 0, HCBUFSIZ_LARGE - 0, salt_idx, digest_idx);
|
|
|
|
|
|
|
|
|
|
if (hash2)
|
|
|
|
|
{
|
|
|
|
|
out_len += ascii_digest (hashcat_ctx->hashconfig, hashcat_ctx->hashes, hashcat_ctx->module_ctx, (char *) out_buf + 16, HCBUFSIZ_LARGE - 16, salt_idx, split_neighbor);
|
|
|
|
|
out_len += hash_encode (hashcat_ctx->hashconfig, hashcat_ctx->hashes, hashcat_ctx->module_ctx, (char *) out_buf + 16, HCBUFSIZ_LARGE - 16, salt_idx, split_neighbor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
out_buf[out_len] = 0;
|
|
|
|
@ -755,7 +754,7 @@ int potfile_handle_show (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
u8 *out_buf = potfile_ctx->out_buf;
|
|
|
|
|
|
|
|
|
|
const int out_len = ascii_digest (hashcat_ctx->hashconfig, hashcat_ctx->hashes, hashcat_ctx->module_ctx, (char *) out_buf, HCBUFSIZ_LARGE, salt_idx, digest_idx);
|
|
|
|
|
const int out_len = hash_encode (hashcat_ctx->hashconfig, hashcat_ctx->hashes, hashcat_ctx->module_ctx, (char *) out_buf, HCBUFSIZ_LARGE, salt_idx, digest_idx);
|
|
|
|
|
|
|
|
|
|
out_buf[out_len] = 0;
|
|
|
|
|
|
|
|
|
@ -875,11 +874,11 @@ int potfile_handle_left (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
u8 *out_buf = potfile_ctx->out_buf;
|
|
|
|
|
|
|
|
|
|
int out_len = ascii_digest (hashcat_ctx->hashconfig, hashcat_ctx->hashes, hashcat_ctx->module_ctx, (char *) out_buf + 0, HCBUFSIZ_LARGE - 0, salt_idx, digest_idx);
|
|
|
|
|
int out_len = hash_encode (hashcat_ctx->hashconfig, hashcat_ctx->hashes, hashcat_ctx->module_ctx, (char *) out_buf + 0, HCBUFSIZ_LARGE - 0, salt_idx, digest_idx);
|
|
|
|
|
|
|
|
|
|
if (hash2)
|
|
|
|
|
{
|
|
|
|
|
out_len += ascii_digest (hashcat_ctx->hashconfig, hashcat_ctx->hashes, hashcat_ctx->module_ctx, (char *) out_buf + 16, HCBUFSIZ_LARGE - 16, salt_idx, split_neighbor);
|
|
|
|
|
out_len += hash_encode (hashcat_ctx->hashconfig, hashcat_ctx->hashes, hashcat_ctx->module_ctx, (char *) out_buf + 16, HCBUFSIZ_LARGE - 16, salt_idx, split_neighbor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
out_buf[out_len] = 0;
|
|
|
|
@ -928,7 +927,7 @@ int potfile_handle_left (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
u8 *out_buf = potfile_ctx->out_buf;
|
|
|
|
|
|
|
|
|
|
const int out_len = ascii_digest (hashcat_ctx->hashconfig, hashcat_ctx->hashes, hashcat_ctx->module_ctx, (char *) out_buf, HCBUFSIZ_LARGE, salt_idx, digest_idx);
|
|
|
|
|
const int out_len = hash_encode (hashcat_ctx->hashconfig, hashcat_ctx->hashes, hashcat_ctx->module_ctx, (char *) out_buf, HCBUFSIZ_LARGE, salt_idx, digest_idx);
|
|
|
|
|
|
|
|
|
|
out_buf[out_len] = 0;
|
|
|
|
|
|
|
|
|
|