mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-07 07:14:02 -07:00
Merge pull request #555 from Arnie97/master
hf mf nested: transfer keys to the correct block in one sector mode.
This commit is contained in:
commit
365627e2f1
1 changed files with 3 additions and 6 deletions
|
@ -683,9 +683,9 @@ int CmdHF14AMfNested(const char *Cmd)
|
|||
if (transferToEml) {
|
||||
uint8_t sectortrailer;
|
||||
if (trgBlockNo < 32*4) { // 4 block sector
|
||||
sectortrailer = (trgBlockNo & 0x03) + 3;
|
||||
sectortrailer = (trgBlockNo & ~0x03) + 3;
|
||||
} else { // 16 block sector
|
||||
sectortrailer = (trgBlockNo & 0x0f) + 15;
|
||||
sectortrailer = (trgBlockNo & ~0x0f) + 15;
|
||||
}
|
||||
mfEmlGetMem(keyBlock, sectortrailer, 1);
|
||||
|
||||
|
@ -1685,10 +1685,7 @@ int CmdHF14AMfESet(const char *Cmd)
|
|||
}
|
||||
|
||||
// 1 - blocks count
|
||||
UsbCommand c = {CMD_MIFARE_EML_MEMSET, {blockNo, 1, 0}};
|
||||
memcpy(c.d.asBytes, memBlock, 16);
|
||||
SendCommand(&c);
|
||||
return 0;
|
||||
return mfEmlSetMem(memBlock, blockNo, 1);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue