From 1d4b67cb3daf01ae9908443bc1b0fd32a25060d8 Mon Sep 17 00:00:00 2001 From: Phil Date: Sat, 28 Dec 2019 14:04:46 +0100 Subject: [PATCH 1/1] "hf mf ekeyprn d" doesn't works properly (#904) 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. --- client/cmdhfmf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 2fe74705..22e6efac 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -2060,7 +2060,7 @@ int CmdHF14AMfEKeyPrn(const char *Cmd) PrintAndLog("error get block %d", FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1); break; } - fwrite(data+6, 1, 6, fkeys); + fwrite(data, 1, 6, fkeys); } for(i = 0; i < numSectors; i++) { if (mfEmlGetMem(data, FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1, 1)) { -- 2.39.2