"hf mf ekeyprn d" doesn't works properly

FIX: command "hf mf ekeyprn  d" doesn't use the correct offset to locate the A key in data[] array and record the 2 last bytes followed by 4 0x00 instead of the 6 good bytes (All the A keys are corrupted in file dumpkeys.bin). B keys are not affected.
This commit is contained in:
Phil 2019-12-27 22:44:04 +01:00 committed by GitHub
parent 5a03ea993f
commit d89dd848b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2060,7 +2060,7 @@ int CmdHF14AMfEKeyPrn(const char *Cmd)
PrintAndLog("error get block %d", FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1); PrintAndLog("error get block %d", FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1);
break; break;
} }
fwrite(data+6, 1, 6, fkeys); fwrite(data, 1, 6, fkeys);
} }
for(i = 0; i < numSectors; i++) { for(i = 0; i < numSectors; i++) {
if (mfEmlGetMem(data, FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1, 1)) { if (mfEmlGetMem(data, FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1, 1)) {