mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-23 06:25:28 -07:00
Revert to MF_DBG_ERROR level in mifare_classic_halt() and don't issue the halt command for gen1b
This commit is contained in:
parent
473d745309
commit
8004437b42
2 changed files with 101 additions and 96 deletions
|
@ -1281,11 +1281,14 @@ void MifareCSetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai
|
||||||
};
|
};
|
||||||
|
|
||||||
if (workFlags & 0x04) {
|
if (workFlags & 0x04) {
|
||||||
if (mifare_classic_halt(NULL, cuid)) {
|
// do no issue halt command for gen1b magic tag (#db# halt error. response len: 1)
|
||||||
if (MF_DBGLEVEL > 2) Dbprintf("Halt error");
|
if (!(workFlags & 0x40)) {
|
||||||
// Continue, some magic tags misbehavies and send an answer to it.
|
if (mifare_classic_halt(NULL, cuid)) {
|
||||||
// break;
|
if (MF_DBGLEVEL > 2) Dbprintf("Halt error");
|
||||||
};
|
// Continue, some magic tags misbehavies and send an answer to it.
|
||||||
|
// break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isOK = 1;
|
isOK = 1;
|
||||||
|
@ -1362,11 +1365,14 @@ void MifareCGetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai
|
||||||
memcpy(data, receivedAnswer, 18);
|
memcpy(data, receivedAnswer, 18);
|
||||||
|
|
||||||
if (workFlags & 0x04) {
|
if (workFlags & 0x04) {
|
||||||
if (mifare_classic_halt(NULL, cuid)) {
|
// do no issue halt command for gen1b magic tag (#db# halt error. response len: 1)
|
||||||
if (MF_DBGLEVEL > 2) Dbprintf("Halt error");
|
if (!(workFlags & 0x40)) {
|
||||||
// Continue, some magic tags misbehavies and send an answer to it.
|
if (mifare_classic_halt(NULL, cuid)) {
|
||||||
// break;
|
if (MF_DBGLEVEL > 1) Dbprintf("Halt error");
|
||||||
};
|
// Continue, some magic tags misbehavies and send an answer to it.
|
||||||
|
// break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isOK = 1;
|
isOK = 1;
|
||||||
|
|
|
@ -511,8 +511,7 @@ int mifare_classic_halt(struct Crypto1State *pcs, uint32_t uid)
|
||||||
|
|
||||||
len = mifare_sendcmd_short(pcs, pcs == NULL ? false:true, 0x50, 0x00, receivedAnswer, receivedAnswerPar, NULL);
|
len = mifare_sendcmd_short(pcs, pcs == NULL ? false:true, 0x50, 0x00, receivedAnswer, receivedAnswerPar, NULL);
|
||||||
if (len != 0) {
|
if (len != 0) {
|
||||||
// change from MF_DBG_ERROR to MF_DBG_ALL, to much halt error for moagic tags
|
if (MF_DBGLEVEL >= MF_DBG_ERROR)
|
||||||
if (MF_DBGLEVEL > MF_DBG_ALL)
|
|
||||||
Dbprintf("halt error. response len: %x", len);
|
Dbprintf("halt error. response len: %x", len);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue