mf chk queue up the next set of keys to check (#1)

This commit is contained in:
uzlonewolf 2019-12-29 06:10:51 -08:00 committed by pwpiwi
parent 24683e5381
commit 766c978bd0
5 changed files with 70 additions and 20 deletions

View file

@ -675,7 +675,7 @@ int CmdHF14AMfNested(const char *Cmd) {
}
// check if we can authenticate to sector
res = mfCheckKeys(blockNo, keyType, timeout14a, true, true, true, 1, key, &key64);
res = mfCheckKeys(blockNo, keyType, timeout14a, true, true, true, false, 1, key, &key64);
if (res) {
PrintAndLog("Can't authenticate to block:%3d key type:%c key:%s", blockNo, keyType?'B':'A', sprint_hex(key, 6));
return 3;
@ -1275,7 +1275,7 @@ int CmdHF14AMfChk(const char *Cmd) {
uint32_t size = keycnt-c > max_keys ? max_keys : keycnt-c;
bool init = (c == 0);
bool drop_field = (c + size == keycnt);
res = mfCheckKeys(blockNo, keyAB & 0x01, timeout14a, true, init, drop_field, size, &keyBlock[6 * c], &key64);
res = mfCheckKeys(blockNo, keyAB & 0x01, timeout14a, true, init, drop_field, false, size, &keyBlock[6 * c], &key64);
clearTraceLog = false;
if (res != 1) {