mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
Update cmdhf14b.c to respect bytes order when evaluating SR/ST25TB locks
Signed-off-by: Benjamin DELPY <benjamin@gentilkiwi.com>
This commit is contained in:
parent
04a132b6ba
commit
ee1a38d975
1 changed files with 11 additions and 11 deletions
|
@ -569,7 +569,7 @@ static const char *get_st_lock_info(uint8_t model, const uint8_t *lockbytes, uin
|
|||
default:
|
||||
return ST_LOCK_INFO_EMPTY;
|
||||
}
|
||||
if ((lockbytes[1] & mask) == 0) {
|
||||
if ((lockbytes[3] & mask) == 0) {
|
||||
return _RED_("1");
|
||||
}
|
||||
return ST_LOCK_INFO_EMPTY;
|
||||
|
@ -578,7 +578,7 @@ static const char *get_st_lock_info(uint8_t model, const uint8_t *lockbytes, uin
|
|||
case 0x6: // SRI512
|
||||
case 0xC: { // SRT512
|
||||
//need data[2] and data[3]
|
||||
uint8_t b = 1;
|
||||
uint8_t b = 2;
|
||||
switch (blk) {
|
||||
case 0:
|
||||
mask = 0x01;
|
||||
|
@ -606,35 +606,35 @@ static const char *get_st_lock_info(uint8_t model, const uint8_t *lockbytes, uin
|
|||
break;
|
||||
case 8:
|
||||
mask = 0x01;
|
||||
b = 0;
|
||||
b = 3;
|
||||
break;
|
||||
case 9:
|
||||
mask = 0x02;
|
||||
b = 0;
|
||||
b = 3;
|
||||
break;
|
||||
case 10:
|
||||
mask = 0x04;
|
||||
b = 0;
|
||||
b = 3;
|
||||
break;
|
||||
case 11:
|
||||
mask = 0x08;
|
||||
b = 0;
|
||||
b = 3;
|
||||
break;
|
||||
case 12:
|
||||
mask = 0x10;
|
||||
b = 0;
|
||||
b = 3;
|
||||
break;
|
||||
case 13:
|
||||
mask = 0x20;
|
||||
b = 0;
|
||||
b = 3;
|
||||
break;
|
||||
case 14:
|
||||
mask = 0x40;
|
||||
b = 0;
|
||||
b = 3;
|
||||
break;
|
||||
case 15:
|
||||
mask = 0x80;
|
||||
b = 0;
|
||||
b = 3;
|
||||
break;
|
||||
}
|
||||
if ((lockbytes[b] & mask) == 0) {
|
||||
|
@ -679,7 +679,7 @@ static const char *get_st_lock_info(uint8_t model, const uint8_t *lockbytes, uin
|
|||
break;
|
||||
}
|
||||
// iceman: this is opposite! need sample to test with.
|
||||
if ((lockbytes[0] & mask)) {
|
||||
if ((lockbytes[2] & mask)) {
|
||||
return _RED_("1");
|
||||
}
|
||||
return ST_LOCK_INFO_EMPTY;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue