text
This commit is contained in:
1 parent
5faf625032
commit
3b91c1a47f
1 file changed
+8
-4
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user