1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-15 12:29:35 +00:00

Fix random rules generator seeding

This commit is contained in:
jsteube 2016-09-23 20:08:47 +02:00
parent c51c59e061
commit 7d9ff152b0

View File

@ -369,15 +369,6 @@ int main (int argc, char **argv)
set_cpu_affinity (user_options->cpu_affinity); set_cpu_affinity (user_options->cpu_affinity);
} }
if (user_options->rp_gen_seed_chgd == false)
{
srand (user_options->rp_gen_seed);
}
else
{
srand (proc_start);
}
/** /**
* logfile init * logfile init
*/ */
@ -803,6 +794,19 @@ int main (int argc, char **argv)
opencl_ctx->force_jit_compilation = 1500; opencl_ctx->force_jit_compilation = 1500;
} }
/**
* prepare seeding for random number generator used from random rules generator
*/
if (user_options->rp_gen_seed_chgd == true)
{
srand (user_options->rp_gen_seed);
}
else
{
srand (proc_start);
}
/** /**
* load rules * load rules
*/ */