mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
hf 14a simaid: ignore premature HALT until RATS is reached
This commit is contained in:
parent
9933034566
commit
f8abfc0731
1 changed files with 5 additions and 1 deletions
|
@ -4009,6 +4009,7 @@ void SimulateIso14443aTagAID(uint8_t tagType, uint16_t flags, uint8_t *data,
|
||||||
|
|
||||||
// main loop
|
// main loop
|
||||||
bool finished = false;
|
bool finished = false;
|
||||||
|
bool got_rats = false;
|
||||||
while (finished == false) {
|
while (finished == false) {
|
||||||
// BUTTON_PRESS check done in GetIso14443aCommandFromReader
|
// BUTTON_PRESS check done in GetIso14443aCommandFromReader
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
|
@ -4046,9 +4047,12 @@ void SimulateIso14443aTagAID(uint8_t tagType, uint16_t flags, uint8_t *data,
|
||||||
} else if (receivedCmd[0] == ISO14443A_CMD_HALT && len == 4) { // Received a HALT
|
} else if (receivedCmd[0] == ISO14443A_CMD_HALT && len == 4) { // Received a HALT
|
||||||
LogTrace(receivedCmd, Uart.len, Uart.startTime * 16 - DELAY_AIR2ARM_AS_TAG, Uart.endTime * 16 - DELAY_AIR2ARM_AS_TAG, Uart.parity, true);
|
LogTrace(receivedCmd, Uart.len, Uart.startTime * 16 - DELAY_AIR2ARM_AS_TAG, Uart.endTime * 16 - DELAY_AIR2ARM_AS_TAG, Uart.parity, true);
|
||||||
p_response = NULL;
|
p_response = NULL;
|
||||||
finished = true;
|
if (got_rats) {
|
||||||
|
finished = true;
|
||||||
|
}
|
||||||
} else if (receivedCmd[0] == ISO14443A_CMD_RATS && len == 4) { // Received a RATS request
|
} else if (receivedCmd[0] == ISO14443A_CMD_RATS && len == 4) { // Received a RATS request
|
||||||
p_response = &responses[RESP_INDEX_RATS];
|
p_response = &responses[RESP_INDEX_RATS];
|
||||||
|
got_rats = true;
|
||||||
} else {
|
} else {
|
||||||
// clear old dynamic responses
|
// clear old dynamic responses
|
||||||
dynamic_response_info.response_n = 0;
|
dynamic_response_info.response_n = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue