mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07: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;
|
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) {
|
static int CmdHF14AMfDump(const char *Cmd) {
|
||||||
|
|
||||||
uint64_t t1 = msclock();
|
uint64_t t1 = msclock();
|
||||||
|
@ -1222,6 +1227,10 @@ static int CmdHF14AMfNested(const char *Cmd) {
|
||||||
e_sector = calloc(SectorsCnt, sizeof(sector_t));
|
e_sector = calloc(SectorsCnt, sizeof(sector_t));
|
||||||
if (e_sector == NULL) return PM3_EMALLOC;
|
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
|
//test current key and additional standard keys first
|
||||||
// add parameter key
|
// add parameter key
|
||||||
memcpy(keyBlock + (ARRAYLEN(g_mifare_default_keys) * 6), key, 6);
|
memcpy(keyBlock + (ARRAYLEN(g_mifare_default_keys) * 6), key, 6);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue