From 3b91c1a47f3088c335b01d455122fb82f8219072 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 27 Jul 2023 18:50:19 +0200 Subject: [PATCH] text --- client/src/cmdhfmf.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 45f33d665..10e305912 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -3113,8 +3113,9 @@ all_found: clearCommandBuffer(); SendCommandNG(CMD_HF_MIFARE_EML_MEMCLR, NULL, 0); - PrintAndLogEx(SUCCESS, "transferring keys to simulator memory (Cmd Error: 04 can occur)"); + PrintAndLogEx(INFO, "transferring keys to simulator memory" NOLF); + bool transfer_status = true; for (current_sector_i = 0; current_sector_i < sector_cnt; current_sector_i++) { mfEmlGetMem(block, current_sector_i, 1); if (e_sector[current_sector_i].foundKey[0]) @@ -3122,8 +3123,11 @@ all_found: if (e_sector[current_sector_i].foundKey[1]) num_to_bytes(e_sector[current_sector_i].Key[1], 6, block + 10); - mfEmlSetMem(block, mfFirstBlockOfSector(current_sector_i) + mfNumBlocksPerSector(current_sector_i) - 1, 1); + transfer_status |= mfEmlSetMem(block, mfFirstBlockOfSector(current_sector_i) + mfNumBlocksPerSector(current_sector_i) - 1, 1); } + PrintAndLogEx(NORMAL, "( %s )", (transfer_status) ? _GREEN_("ok") : _RED_("fail")); + + PrintAndLogEx(INFO, "dumping card content to emulator memory (Cmd Error: 04 can occur)"); // use ecfill trick FastDumpWithEcFill(sector_cnt); @@ -3137,8 +3141,8 @@ all_found: return PM3_EMALLOC; } - PrintAndLogEx(INFO, "downloading the card content from emulator memory"); - if (!GetFromDevice(BIG_BUF_EML, dump, bytes, 0, NULL, 0, NULL, 2500, false)) { + PrintAndLogEx(INFO, "downloading card content from emulator memory"); + if (GetFromDevice(BIG_BUF_EML, dump, bytes, 0, NULL, 0, NULL, 2500, false) == false) { PrintAndLogEx(ERR, "Fail, transfer from device time-out"); free(e_sector); free(dump);