mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 14:13:42 -07:00
deleted wipe and fill functionality from mfCSetUID
This commit is contained in:
parent
351224fac0
commit
657d82f11e
2 changed files with 3 additions and 28 deletions
|
@ -464,11 +464,9 @@ int mfCWipe(uint32_t numSectors, bool wantWipe, bool wantFill) {
|
|||
return isOK;
|
||||
}
|
||||
|
||||
int mfCSetUID(uint8_t *uid, uint8_t *atqa, uint8_t *sak, uint8_t *oldUID, bool wantWipe, bool wantFill) {
|
||||
int mfCSetUID(uint8_t *uid, uint8_t *atqa, uint8_t *sak, uint8_t *oldUID) {
|
||||
uint8_t oldblock0[16] = {0x00};
|
||||
uint8_t block0[16] = {0x00};
|
||||
uint8_t block1[16] = {0x00};
|
||||
uint8_t blockK[16] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x08, 0x77, 0x8F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
|
||||
int gen = 0, res;
|
||||
|
||||
gen = mfCIdentify();
|
||||
|
@ -503,35 +501,12 @@ int mfCSetUID(uint8_t *uid, uint8_t *atqa, uint8_t *sak, uint8_t *oldUID, bool w
|
|||
}
|
||||
PrintAndLog("new block 0: %s", sprint_hex(block0, 16));
|
||||
|
||||
res = mfCSetBlock(0, block0, oldUID, wantWipe, cmdParams);
|
||||
res = mfCSetBlock(0, block0, oldUID, false, cmdParams);
|
||||
if (res) {
|
||||
PrintAndLog("Can't set block 0. Error: %d", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
if (wantFill) {
|
||||
int blockNo = 1;
|
||||
|
||||
printf("write blocks ");
|
||||
while (blockNo < 64) {
|
||||
if ((blockNo + 1) % 4) {
|
||||
res = mfCSetBlock(blockNo, block1, NULL, false, cmdParams);
|
||||
} else {
|
||||
res = mfCSetBlock(blockNo, blockK, NULL, false, cmdParams);
|
||||
printf(".");
|
||||
}
|
||||
if (res) {
|
||||
printf("\n");
|
||||
PrintAndLog("Can't set block %d. Error: %d", blockNo, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
blockNo++;
|
||||
}
|
||||
printf("\n");
|
||||
PrintAndLog("64 blocks writed successfully.");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ extern int mfEmlGetMem(uint8_t *data, int blockNum, int blocksCount);
|
|||
extern int mfEmlSetMem(uint8_t *data, int blockNum, int blocksCount);
|
||||
|
||||
extern int mfCWipe(uint32_t numSectors, bool wantWipe, bool wantFill);
|
||||
extern int mfCSetUID(uint8_t *uid, uint8_t *atqa, uint8_t *sak, uint8_t *oldUID, bool wantWipe, bool wantFill);
|
||||
extern int mfCSetUID(uint8_t *uid, uint8_t *atqa, uint8_t *sak, uint8_t *oldUID);
|
||||
extern int mfCSetBlock(uint8_t blockNo, uint8_t *data, uint8_t *uid, bool wantWipe, uint8_t params);
|
||||
extern int mfCGetBlock(uint8_t blockNo, uint8_t *data, uint8_t params);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue