mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
prep mac
This commit is contained in:
parent
cb82e848cc
commit
5a8d9b7954
3 changed files with 32 additions and 8 deletions
|
@ -1846,6 +1846,10 @@ void iClass_WriteBlock(uint8_t *msg) {
|
|||
AddCrc(write + 1, 9);
|
||||
write_len -= 2;
|
||||
} else {
|
||||
|
||||
if (payload->req.use_replay) {
|
||||
memcpy(write + 10, payload->mac, sizeof(payload->mac));
|
||||
} else {
|
||||
// Secure tags uses MAC
|
||||
uint8_t wb[9];
|
||||
wb[0] = payload->req.blockno;
|
||||
|
@ -1857,6 +1861,7 @@ void iClass_WriteBlock(uint8_t *msg) {
|
|||
doMAC_N(wb, sizeof(wb), hdr.key_d, 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