From fa532a0e1bbd15a4cfab7373001e8beae140c872 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 5 Sep 2020 08:19:25 +0200 Subject: [PATCH] dont check KEYB if KEYA dumped it all --- client/src/cmdhfmf.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 5e4af4015..c51f3aa23 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -869,17 +869,18 @@ static int FastDumpWithEcFill(uint8_t numsectors) { int res = WaitForResponseTimeout(CMD_HF_MIFARE_EML_LOAD, &resp, 2000); if (res != PM3_SUCCESS) { - PrintAndLogEx(INFO, "fast dump reported back failure, when trying keyA"); - } + PrintAndLogEx(INFO, "fast dump reported back failure w KEY A, swapping to KEY B"); + + // ecfill key B + payload.keytype = 1; - // ecfill key B - payload.keytype = 1; - - clearCommandBuffer(); - SendCommandNG(CMD_HF_MIFARE_EML_LOAD, (uint8_t *)&payload, sizeof(payload)); - res = WaitForResponseTimeout(CMD_HF_MIFARE_EML_LOAD, &resp, 2000); - if (res != PM3_SUCCESS) { - PrintAndLogEx(INFO, "fast dump reported back failure, when trying keyB"); + clearCommandBuffer(); + SendCommandNG(CMD_HF_MIFARE_EML_LOAD, (uint8_t *)&payload, sizeof(payload)); + res = WaitForResponseTimeout(CMD_HF_MIFARE_EML_LOAD, &resp, 2000); + if (res != PM3_SUCCESS) { + PrintAndLogEx(INFO, "fast dump reported back failure w KEY B"); + PrintAndLogEx(INFO, "Dump file is " _RED_("PARTIAL") "complete"); + } } return PM3_SUCCESS; }