Count keys inside cracker

This commit is contained in:
Aram
2016-05-12 00:53:03 +02:00
parent ec8689cbba
commit f0f54481c1
5 changed files with 1 additions and 6 deletions

View File

@ -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;
} }
} }

View File

@ -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;
} }
} }

View File

@ -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;

View File

@ -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;

View File

@ -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;