mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 22:23:38 -07:00
hf mf nested. change key search procedure
This commit is contained in:
parent
8388f5441d
commit
c24188dd17
1 changed files with 2 additions and 24 deletions
|
@ -684,18 +684,7 @@ int CmdHF14AMfNested(const char *Cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintAndLog("Testing known keys. Sector count=%d", SectorsCnt);
|
PrintAndLog("Testing known keys. Sector count=%d", SectorsCnt);
|
||||||
for (i = 0; i < SectorsCnt; i++) {
|
mfCheckKeysSec(SectorsCnt, 2, true, NESTED_KEY_COUNT, keyBlock, e_sector);
|
||||||
for (j = 0; j < 2; j++) {
|
|
||||||
if (e_sector[i].foundKey[j]) continue;
|
|
||||||
|
|
||||||
res = mfCheckKeys(FirstBlockOfSector(i), j, true, NESTED_KEY_COUNT, keyBlock, &key64);
|
|
||||||
|
|
||||||
if (!res) {
|
|
||||||
e_sector[i].Key[j] = key64;
|
|
||||||
e_sector[i].foundKey[j] = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// get known key from array
|
// get known key from array
|
||||||
bool keyFound = false;
|
bool keyFound = false;
|
||||||
|
@ -807,18 +796,7 @@ int CmdHF14AMfNested(const char *Cmd)
|
||||||
|
|
||||||
// try to auth with known keys to not recognized sectors keys
|
// try to auth with known keys to not recognized sectors keys
|
||||||
PrintAndLog("Testing keys. Sector count=%d known keys count:%d", SectorsCnt, cnt);
|
PrintAndLog("Testing keys. Sector count=%d known keys count:%d", SectorsCnt, cnt);
|
||||||
for (i = 0; i < SectorsCnt; i++) {
|
mfCheckKeysSec(SectorsCnt, 2, true, cnt, keyBlock, e_sector);
|
||||||
for (j = 0; j < 2; j++) {
|
|
||||||
if (e_sector[i].foundKey[j]) continue;
|
|
||||||
|
|
||||||
res = mfCheckKeys(FirstBlockOfSector(i), j, true, cnt, keyBlock, &key64);
|
|
||||||
|
|
||||||
if (!res) {
|
|
||||||
e_sector[i].Key[j] = key64;
|
|
||||||
e_sector[i].foundKey[j] = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // if (notFoundKeys)
|
} // if (notFoundKeys)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue