Merge pull request #1061 from aveao/csetuid-olduid-fix
Fix old UID display on hf mf csetuid
This commit is contained in:
@@ -2082,9 +2082,10 @@ void MifareCSetBlock(uint32_t arg0, uint32_t arg1, uint8_t *datain) {
|
|||||||
if (!iso14443a_select_card(uid, NULL, &cuid, true, 0, true)) {
|
if (!iso14443a_select_card(uid, NULL, &cuid, true, 0, true)) {
|
||||||
if (DBGLEVEL >= DBG_ERROR) Dbprintf("Can't select card");
|
if (DBGLEVEL >= DBG_ERROR) Dbprintf("Can't select card");
|
||||||
errormsg = MAGIC_UID;
|
errormsg = MAGIC_UID;
|
||||||
|
mifare_classic_halt_ex(NULL);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
mifare_classic_halt_ex(NULL);
|
mifare_classic_halt_ex(NULL);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// wipe tag, fill it with zeros
|
// wipe tag, fill it with zeros
|
||||||
|
|||||||
@@ -859,7 +859,7 @@ int mfCSetUID(uint8_t *uid, uint8_t *atqa, uint8_t *sak, uint8_t *oldUID, uint8_
|
|||||||
PrintAndLogEx(SUCCESS, "new block 0: %s", sprint_hex(block0, 16));
|
PrintAndLogEx(SUCCESS, "new block 0: %s", sprint_hex(block0, 16));
|
||||||
|
|
||||||
if (wipecard) params |= MAGIC_WIPE;
|
if (wipecard) params |= MAGIC_WIPE;
|
||||||
if (oldUID == NULL) params |= MAGIC_UID;
|
if (oldUID != NULL) params |= MAGIC_UID;
|
||||||
|
|
||||||
return mfCSetBlock(0, block0, oldUID, params);
|
return mfCSetBlock(0, block0, oldUID, params);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user