mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
Fix nonce acquisition
This commit is contained in:
parent
2829e20d4b
commit
7094994b57
1 changed files with 4 additions and 8 deletions
|
@ -696,7 +696,7 @@ void MifareAcquireNonces(uint32_t arg0, uint32_t flags) {
|
|||
|
||||
LED_C_ON();
|
||||
|
||||
for (uint16_t i = 0; i <= PM3_CMD_DATA_SIZE - 4; i += 4) {
|
||||
while (num_nonces < PM3_CMD_DATA_SIZE / 4) {
|
||||
|
||||
// Test if the action was cancelled
|
||||
if (BUTTON_PRESS()) {
|
||||
|
@ -746,18 +746,14 @@ void MifareAcquireNonces(uint32_t arg0, uint32_t flags) {
|
|||
continue;
|
||||
}
|
||||
|
||||
num_nonces++;
|
||||
|
||||
// Save the tag nonce (nt)
|
||||
buf[i] = answer[0];
|
||||
buf[i + 1] = answer[1];
|
||||
buf[i + 2] = answer[2];
|
||||
buf[i + 3] = answer[3];
|
||||
memcpy(buf + num_nonces * 4, answer, 4);
|
||||
num_nonces++;
|
||||
}
|
||||
|
||||
LED_C_OFF();
|
||||
LED_B_ON();
|
||||
reply_old(CMD_ACK, isOK, cuid, num_nonces - 1, buf, sizeof(buf));
|
||||
reply_old(CMD_ACK, isOK, cuid, num_nonces, buf, sizeof(buf));
|
||||
LED_B_OFF();
|
||||
|
||||
if (DBGLEVEL >= 3) DbpString("AcquireNonces finished");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue