Count keys inside cracker
This commit is contained in:
@ -209,6 +209,7 @@ inline uint64_t crack_states_bitsliced(uint32_t **task){
|
|||||||
for(size_t results_idx = 0; results_idx < MAX_BITSLICES; ++results_idx){
|
for(size_t results_idx = 0; results_idx < MAX_BITSLICES; ++results_idx){
|
||||||
if(get_vector_bit(results_idx, results)){
|
if(get_vector_bit(results_idx, results)){
|
||||||
key = keys[results_idx].value;
|
key = keys[results_idx].value;
|
||||||
|
__sync_fetch_and_add(&keys_found, 1);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -487,9 +487,6 @@ void* crack_states_thread(void* x){
|
|||||||
const uint64_t key = crack_states_bitsliced(space + j * 5);
|
const uint64_t key = crack_states_bitsliced(space + j * 5);
|
||||||
if(key != -1){
|
if(key != -1){
|
||||||
found_key = key;
|
found_key = key;
|
||||||
__sync_fetch_and_add(&keys_found, 1);
|
|
||||||
break;
|
|
||||||
} else if(keys_found){
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,6 @@ void* crack_states_thread(void* x){
|
|||||||
const uint64_t key = crack_states_bitsliced(space + j * 5);
|
const uint64_t key = crack_states_bitsliced(space + j * 5);
|
||||||
if(key != -1){
|
if(key != -1){
|
||||||
printf("Found key: %012"llx"\n", key);
|
printf("Found key: %012"llx"\n", key);
|
||||||
__sync_fetch_and_add(&keys_found, 1);
|
|
||||||
break;
|
break;
|
||||||
} else if(keys_found){
|
} else if(keys_found){
|
||||||
break;
|
break;
|
||||||
|
@ -45,7 +45,6 @@ uint32_t **space;
|
|||||||
size_t thread_count;
|
size_t thread_count;
|
||||||
size_t states_tested = 0;
|
size_t states_tested = 0;
|
||||||
size_t total_states;
|
size_t total_states;
|
||||||
size_t keys_found = 0;
|
|
||||||
|
|
||||||
void* crack_states_thread(void* x){
|
void* crack_states_thread(void* x){
|
||||||
const size_t thread_id = (size_t)x;
|
const size_t thread_id = (size_t)x;
|
||||||
|
@ -52,7 +52,6 @@ void* crack_states_thread(void* x){
|
|||||||
const uint64_t key = crack_states_bitsliced(space + j * 5);
|
const uint64_t key = crack_states_bitsliced(space + j * 5);
|
||||||
if(key != -1){
|
if(key != -1){
|
||||||
printf("Found key: %012"llx"\n", key);
|
printf("Found key: %012"llx"\n", key);
|
||||||
__sync_fetch_and_add(&keys_found, 1);
|
|
||||||
break;
|
break;
|
||||||
} else if(keys_found){
|
} else if(keys_found){
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user