mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-21 05:43:23 -07:00
fix nested loop with cards that do not NACK
This commit is contained in:
parent
e73c9f1bd4
commit
9b6d1f74da
3 changed files with 13 additions and 2 deletions
|
@ -335,7 +335,11 @@ int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo,
|
|||
memcpy(c.d.asBytes, key, 6);
|
||||
SendCommand(&c);
|
||||
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 1500)) {
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) {
|
||||
// cards that do not NACK bad keys cause it to get stuck in a loop, so break it out
|
||||
UsbCommand c = {CMD_PING};
|
||||
SendCommand(&c);
|
||||
(void)WaitForResponseTimeout(CMD_ACK,NULL,500);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue