mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-05 20:41:34 -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
|
@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.
|
|||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||
|
||||
## [unreleased][unreleased]
|
||||
- Changed `hf iclass wrbl` - replay behavior to use privilege escalation instead of having to generate specific block/content macs(@antiklesys)
|
||||
- Changed `hf iclass wrbl` - replay behavior to use privilege escalation if the macs field is not passed empty(@antiklesys)
|
||||
- Changed `hf iclass restore` - it now supports privilege escalation to restore card content using replay (@antiklesys)
|
||||
- Fixed `hf 15 dump` - now reads sysinfo response correct (@iceman1001)
|
||||
- Changed `make clean` - it now removes all __pycache__ folders (@iceman1001)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -2329,7 +2329,7 @@ static int CmdHFiClass_WriteBlock(const char *Cmd) {
|
|||
arg_lit0(NULL, "credit", "key is assumed to be the credit key"),
|
||||
arg_lit0(NULL, "elite", "elite computations applied to key"),
|
||||
arg_lit0(NULL, "raw", "no computations applied to key"),
|
||||
arg_lit0(NULL, "nr", "replay of NR/MAC using privilege escalation"),
|
||||
arg_lit0(NULL, "nr", "replay of NR/MAC block write or use privilege escalation if mac is empty"),
|
||||
arg_lit0("v", "verbose", "verbose output"),
|
||||
arg_lit0(NULL, "shallow", "use shallow (ASK) reader modulation instead of OOK"),
|
||||
arg_param_end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue