From: iceman1001 Date: Wed, 16 Nov 2016 18:19:06 +0000 (+0100) Subject: FIX: "hf mf hardnested" - removed the call to free_candidates_memory, on my ubuntu... X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/f07ffa7672ccff152875a5560fd7d2e3edbd6165 FIX: "hf mf hardnested" - removed the call to free_candidates_memory, on my ubuntu env it crashes all the time with it. --- diff --git a/client/cmdhfmfhard.c b/client/cmdhfmfhard.c index 7197b1a0..58bfbf04 100644 --- a/client/cmdhfmfhard.c +++ b/client/cmdhfmfhard.c @@ -866,12 +866,6 @@ static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_ } num_good_first_bytes = estimate_second_byte_sum(); - if ( prev_best == best_first_bytes[0] ){ - ++three_in_row; - } else { - three_in_row = 0; - } - prev_best = best_first_bytes[0]; if (total_num_nonces > next_fivehundred) { next_fivehundred = (total_num_nonces/500+1) * 500; @@ -881,10 +875,18 @@ static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_ NONCES_THRESHOLD * idx, CONFIDENCE_THRESHOLD * 100.0, num_good_first_bytes - ); + ); } if ( num_good_first_bytes > 0 ) { + + if ( prev_best == best_first_bytes[0] ){ + ++three_in_row; + } else { + three_in_row = 0; + } + prev_best = best_first_bytes[0]; + //printf("GOOD BYTES: %s \n", sprint_hex(best_first_bytes, num_good_first_bytes) ); if ( total_added_nonces >= (NONCES_THRESHOLD * idx) || three_in_row >= 3) { @@ -895,7 +897,7 @@ static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_ SendCommand(&cOff); field_off = brute_force(); } - free_candidates_memory(candidates); + three_in_row = 0; } }