]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Merge branch 'master' into fix_iclass_sim
authorpwpiwi <pwpiwi@users.noreply.github.com>
Tue, 24 Sep 2019 17:34:05 +0000 (19:34 +0200)
committerpwpiwi <pwpiwi@users.noreply.github.com>
Tue, 24 Sep 2019 17:34:05 +0000 (19:34 +0200)
1  2 
client/loclass/elite_crack.c

index 21a67f54c85ab26b8a604e9b89629f9385b65522,cfadcfbc3c9f66ea89377a0915fa0daf9899421f..8fda0fbd96db7d5c17ef982508f169aa2ad9d07a
@@@ -391,10 -392,10 +392,10 @@@ int bruteforceItem(dumpdata item, uint1
                //Diversify
                diversifyKey(item.csn, key_sel_p, div_key);
                //Calc mac
 -              doMAC(item.cc_nr, div_key,calculated_MAC);
 +              doMAC(item.cc_nr, div_key, calculated_MAC);
  
                if (memcmp(calculated_MAC, item.mac, 4) == 0) {
-                       for (int i =; i < numbytes_to_recover; i++)
+                       for (int i = 0; i < numbytes_to_recover; i++)
                                prnlog("=> %d: 0x%02x", bytes_to_recover[i], 0xFF & keytable[bytes_to_recover[i]]);
                        found = true;
                        break;
                errors++;
                //Before we exit, reset the 'BEING_CRACKED' to zero
                for (int i = 0; i < numbytes_to_recover; i++) {
-                       keytable[bytes_to_recover[i]]  &= 0xFF;
-                       keytable[bytes_to_recover[i]]  |= CRACK_FAILED;
+                       keytable[bytes_to_recover[i]] &= ~BEING_CRACKED;
                }
        } else {
-               for (int i = 0 ;i < numbytes_to_recover; i++) {
-                       keytable[bytes_to_recover[i]]  &= 0xFF;
-                       keytable[bytes_to_recover[i]]  |= CRACKED;
+               for (int i = 0i < numbytes_to_recover; i++) {
+                       keytable[bytes_to_recover[i]] &= ~BEING_CRACKED;
+                       keytable[bytes_to_recover[i]] |= CRACKED;
                }
 -
        }
        return errors;
  }
  
Impressum, Datenschutz