Skip to content
Snippets Groups Projects
Commit ca777cd8 authored by Mathieu Valois's avatar Mathieu Valois
Browse files

simplify regex check

parent 87755480
No related branches found
No related tags found
No related merge requests found
Pipeline #6271 passed
......@@ -324,7 +324,9 @@ void updateMinMax(minMax& m, const Policy& pol) {
void handle_password(const string& password, const uint64_t& nbPasswords, thread_data* my_data){
my_data->total_counter += nbPasswords;
if ( !my_data->use_regex || regex_match(password,my_data->current_regex)) {
if(my_data->use_regex && !regex_match(password,my_data->current_regex)){
return;
}
PasswordStats c = analyze_password(password, my_data->sr,my_data->limitAdvancedmask, my_data->limitSimplemask);
my_data->total_filter += nbPasswords;
my_data->length[ c.pass_length ] += nbPasswords;
......@@ -333,7 +335,6 @@ void handle_password(const string& password, const uint64_t& nbPasswords, thread
my_data->advancedmasks[ c.advancedmask_string ] += nbPasswords;
updateMinMax(my_data->minMaxValue, c.pol);
}
}
void* generate_stats_thread_queue(void* threadarg) {
struct thread_data *my_data = (struct thread_data *) threadarg;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment