mirror of https://github.com/hashcat/hashcat.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
761 B
35 lines
761 B
8 years ago
|
/**
|
||
|
* Author......: See docs/credits.txt
|
||
|
* License.....: MIT
|
||
|
*/
|
||
|
|
||
|
#include "common.h"
|
||
|
#include "types.h"
|
||
|
#include "memory.h"
|
||
|
#include "logging.h"
|
||
|
#include "combinator.h"
|
||
|
#include "wordlist.h"
|
||
|
|
||
|
int combinator_ctx_init (combinator_ctx_t *combinator_ctx, const user_options_t *user_options)
|
||
|
{
|
||
|
memset (combinator_ctx, 0, sizeof (combinator_ctx_t));
|
||
|
|
||
|
combinator_ctx->enabled = false;
|
||
|
|
||
|
if ((user_options->attack_mode != ATTACK_MODE_COMBI)
|
||
|
&& (user_options->attack_mode != ATTACK_MODE_HYBRID1)
|
||
|
&& (user_options->attack_mode != ATTACK_MODE_HYBRID2)) return 0;
|
||
|
|
||
|
combinator_ctx->enabled = true;
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
void combinator_ctx_destroy (combinator_ctx_t *combinator_ctx)
|
||
|
{
|
||
|
if (combinator_ctx->enabled == false) return;
|
||
|
|
||
|
myfree (combinator_ctx);
|
||
|
}
|
||
|
|