]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmfhard.c
CHG: we don't want to assert inside the pm3 client.
[proxmark3-svn] / client / cmdhfmfhard.c
index 1d642676a442d92a23665411f0e51f6f64b65831..015da045fd59ae143264f30d7abba93f08f25914 100644 (file)
@@ -33,9 +33,6 @@
 #include <malloc.h>
 #include <assert.h>
 
-// uint32_t test_state_odd = 0;
-// uint32_t test_state_even = 0;
-
 #define CONFIDENCE_THRESHOLD   0.95            // Collect nonces until we are certain enough that the following brute force is successfull
 #define GOOD_BYTES_REQUIRED            28
 
@@ -1315,8 +1312,8 @@ static void generate_candidates(uint16_t sum_a0, uint16_t sum_a8)
                                                                        *p = 0xffffffff;
                                                                }
                                                        }
-                                                       printf("Odd  state candidates: %6d (2^%0.1f)\n", current_candidates->len[ODD_STATE], log(current_candidates->len[ODD_STATE])/log(2)); 
-                                                       printf("Even state candidates: %6d (2^%0.1f)\n", current_candidates->len[EVEN_STATE], log(current_candidates->len[EVEN_STATE])/log(2)); 
+                                                       //printf("Odd  state candidates: %6d (2^%0.1f)\n", current_candidates->len[ODD_STATE], log(current_candidates->len[ODD_STATE])/log(2)); 
+                                                       //printf("Even state candidates: %6d (2^%0.1f)\n", current_candidates->len[EVEN_STATE], log(current_candidates->len[EVEN_STATE])/log(2)); 
                                                }
                                        }
                                }
@@ -1679,10 +1676,11 @@ static void brute_force(void)
 
         time(&end);
         unsigned long elapsed_time = difftime(end, start);
-        PrintAndLog("Tested %"PRIu32" states, found %u keys after %u seconds", total_states_tested, keys_found, elapsed_time);
-        if(!keys_found){
-            assert(total_states_tested == maximum_states);
-        }
+        if(keys_found){
+                       PrintAndLog("Success! Tested %"PRIu32" states, found %u keys after %u seconds", total_states_tested, keys_found, elapsed_time);
+        } else {
+                       PrintAndLog("Fail! Tested %"PRIu32" states, in %u seconds", total_states_tested, elapsed_time);
+               }
         // reset this counter for the next call
         nonces_to_bruteforce = 0;
        }
Impressum, Datenschutz