mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-23 08:46:13 +08:00
chg "hf mf cwipe" - textual and also use magic wipe card
This commit is contained in:
parent
92aaf5c416
commit
cb22004635
|
@ -883,8 +883,11 @@ int mfCWipe(uint8_t *uid, uint8_t *atqa, uint8_t *sak) {
|
|||
int res;
|
||||
for (int blockNo = 0; blockNo < 4 * 16; blockNo++) {
|
||||
for (int retry = 0; retry < 3; retry++) {
|
||||
|
||||
PrintAndLogEx(INPLACE, "wipe block %d", blockNo);
|
||||
|
||||
if (blockNo == 0) {
|
||||
res = mfCSetBlock(blockNo, block0, NULL, params);
|
||||
res = mfCSetBlock(blockNo, block0, NULL, (params | MAGIC_WIPE));
|
||||
} else {
|
||||
if (mfIsSectorTrailer(blockNo))
|
||||
res = mfCSetBlock(blockNo, blockK, NULL, params);
|
||||
|
@ -894,16 +897,17 @@ int mfCWipe(uint8_t *uid, uint8_t *atqa, uint8_t *sak) {
|
|||
|
||||
if (res == PM3_SUCCESS)
|
||||
break;
|
||||
PrintAndLogEx(WARNING, "Retry block[%d]...", blockNo);
|
||||
|
||||
PrintAndLogEx(WARNING, "retry block %d ...", blockNo);
|
||||
}
|
||||
|
||||
if (res) {
|
||||
PrintAndLogEx(ERR, "Error setting block[%d]: %d", blockNo, res);
|
||||
PrintAndLogEx(ERR, "error setting block %d (%d)", blockNo, res);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
DropField();
|
||||
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue