mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-16 01:53:02 +08:00
chg: add used known key to found list :)
This commit is contained in:
parent
48d3802d35
commit
703329faca
1 changed files with 10 additions and 1 deletions
|
@ -751,7 +751,12 @@ static uint8_t NumBlocksPerSector(uint8_t sectorNo) {
|
|||
return 16;
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t GetSectorFromBlockNo(uint8_t blockNo) {
|
||||
if ( blockNo < 128 )
|
||||
return blockNo / 4;
|
||||
else
|
||||
return 32 + ((128 - blockNo) / 16);
|
||||
}
|
||||
static int CmdHF14AMfDump(const char *Cmd) {
|
||||
|
||||
uint64_t t1 = msclock();
|
||||
|
@ -1222,6 +1227,10 @@ static int CmdHF14AMfNested(const char *Cmd) {
|
|||
e_sector = calloc(SectorsCnt, sizeof(sector_t));
|
||||
if (e_sector == NULL) return PM3_EMALLOC;
|
||||
|
||||
// add our known key
|
||||
e_sector[GetSectorFromBlockNo(blockNo)].foundKey[keyType] = 1;
|
||||
e_sector[GetSectorFromBlockNo(blockNo)].Key[keyType] = key64;
|
||||
|
||||
//test current key and additional standard keys first
|
||||
// add parameter key
|
||||
memcpy(keyBlock + (ARRAYLEN(g_mifare_default_keys) * 6), key, 6);
|
||||
|
|
Loading…
Reference in a new issue