mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
Fix broken older functionality
Updated to still maintain older functionality when the macs field is passed
This commit is contained in:
parent
7ad3f6eaf2
commit
33c3988a94
3 changed files with 7 additions and 3 deletions
|
@ -1938,6 +1938,9 @@ void iClass_WriteBlock(uint8_t *msg) {
|
|||
write_len -= 2;
|
||||
} else {
|
||||
|
||||
if (payload->req.use_replay && sizeof(payload->mac) > 0) {
|
||||
memcpy(write + 10, payload->mac, sizeof(payload->mac));
|
||||
} else {
|
||||
// Secure tags uses MAC
|
||||
uint8_t wb[9];
|
||||
wb[0] = payload->req.blockno;
|
||||
|
@ -1954,8 +1957,9 @@ void iClass_WriteBlock(uint8_t *msg) {
|
|||
}else{
|
||||
doMAC_N(wb, sizeof(wb), hdr.key_d, mac);
|
||||
}
|
||||
memcpy(write + 10, mac, sizeof(mac));
|
||||
|
||||
memcpy(write + 10, mac, sizeof(mac));
|
||||
}
|
||||
}
|
||||
|
||||
start_time = eof_time + DELAY_ICLASS_VICC_TO_VCD_READER;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue