mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
text
This commit is contained in:
parent
5faf625032
commit
3b91c1a47f
1 changed files with 8 additions and 4 deletions
|
@ -3113,8 +3113,9 @@ all_found:
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommandNG(CMD_HF_MIFARE_EML_MEMCLR, NULL, 0);
|
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++) {
|
for (current_sector_i = 0; current_sector_i < sector_cnt; current_sector_i++) {
|
||||||
mfEmlGetMem(block, current_sector_i, 1);
|
mfEmlGetMem(block, current_sector_i, 1);
|
||||||
if (e_sector[current_sector_i].foundKey[0])
|
if (e_sector[current_sector_i].foundKey[0])
|
||||||
|
@ -3122,8 +3123,11 @@ all_found:
|
||||||
if (e_sector[current_sector_i].foundKey[1])
|
if (e_sector[current_sector_i].foundKey[1])
|
||||||
num_to_bytes(e_sector[current_sector_i].Key[1], 6, block + 10);
|
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
|
// use ecfill trick
|
||||||
FastDumpWithEcFill(sector_cnt);
|
FastDumpWithEcFill(sector_cnt);
|
||||||
|
@ -3137,8 +3141,8 @@ all_found:
|
||||||
return PM3_EMALLOC;
|
return PM3_EMALLOC;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "downloading the card content from emulator memory");
|
PrintAndLogEx(INFO, "downloading card content from emulator memory");
|
||||||
if (!GetFromDevice(BIG_BUF_EML, dump, bytes, 0, NULL, 0, NULL, 2500, false)) {
|
if (GetFromDevice(BIG_BUF_EML, dump, bytes, 0, NULL, 0, NULL, 2500, false) == false) {
|
||||||
PrintAndLogEx(ERR, "Fail, transfer from device time-out");
|
PrintAndLogEx(ERR, "Fail, transfer from device time-out");
|
||||||
free(e_sector);
|
free(e_sector);
|
||||||
free(dump);
|
free(dump);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue