- time(&end);
- unsigned long elapsed_time = difftime(end, start);
- if(keys_found){
- PrintAndLog("Success! Tested %"PRIu32" states, found %u keys after %u seconds", total_states_tested, keys_found, elapsed_time);
+ // enumerate states using all hardware threads, each thread handles one bucket
+ PrintAndLog("Starting %u cracking threads to search %u buckets containing a total of %"PRIu64" states...", thread_count, bucket_count, maximum_states);
+
+ for(size_t i = 0; i < thread_count; i++){
+ pthread_create(&threads[i], NULL, crack_states_thread, (void*) i);
+ }
+ for(size_t i = 0; i < thread_count; i++){
+ pthread_join(threads[i], 0);
+ }
+
+ time(&end1);
+ unsigned long elapsed_time = difftime(end1, start1);
+ // time1 = clock() - time1;
+ // if ( time1 > 0 ) {
+ // ((float)time1)/CLOCKS_PER_SEC
+ // }
+
+ if (keys_found && TestIfKeyExists(foundkey)) {
+ printf("ICE: %u | %u | %u \n", start1, end1, elapsed_time);
+ PrintAndLog("Success! Found %u keys after %u seconds", keys_found, elapsed_time);