mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
chg 'hf iclass list' - fix parity checks
This commit is contained in:
parent
341703d9a7
commit
387dd82895
2 changed files with 13 additions and 5 deletions
|
@ -294,6 +294,8 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
|||
uint8_t parityBits = parityBytes[j >> 3];
|
||||
if (protocol != LEGIC
|
||||
&& protocol != ISO_14443B
|
||||
&& protocol != ISO_15693
|
||||
&& protocol != ICLASS
|
||||
&& protocol != ISO_7816_4
|
||||
&& protocol != PROTO_HITAG
|
||||
&& protocol != THINFILM
|
||||
|
@ -301,7 +303,17 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
|||
&& (oddparity8(frame[j]) != ((parityBits >> (7 - (j & 0x0007))) & 0x01))) {
|
||||
|
||||
snprintf(line[j / 18] + ((j % 18) * 4), 110, "%02x! ", frame[j]);
|
||||
} else {
|
||||
} else if ( protocol == ICLASS && isResponse == true) {
|
||||
uint8_t parity = 0;
|
||||
for (int i=0; i<6; i++) {
|
||||
parity ^= ((frame[0] >> i) & 1);
|
||||
}
|
||||
if ( parity == ((frame[0] >> 7) & 1)) {
|
||||
snprintf(line[j / 18] + ((j % 18) * 4), 110, "%02x ", frame[j]);
|
||||
} else {
|
||||
snprintf(line[j / 18] + ((j % 18) * 4), 110, "%02x! ", frame[j]);
|
||||
}
|
||||
} else {
|
||||
snprintf(line[j / 18] + ((j % 18) * 4), 110, "%02x ", frame[j]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue