mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
hf trace list: fix 14b CRC & accept 14a/14b crcs in 7816
This commit is contained in:
parent
975034854d
commit
43dc10e7f0
1 changed files with 8 additions and 2 deletions
|
@ -184,6 +184,8 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
||||||
break;
|
break;
|
||||||
case ISO_14443B:
|
case ISO_14443B:
|
||||||
case TOPAZ:
|
case TOPAZ:
|
||||||
|
crcStatus = iso14443B_CRC_check(frame, data_len);
|
||||||
|
break;
|
||||||
case FELICA:
|
case FELICA:
|
||||||
crcStatus = !felica_CRC_check(frame + 2, data_len - 4);
|
crcStatus = !felica_CRC_check(frame + 2, data_len - 4);
|
||||||
break;
|
break;
|
||||||
|
@ -193,9 +195,12 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
||||||
case ISO_14443A:
|
case ISO_14443A:
|
||||||
case MFDES:
|
case MFDES:
|
||||||
case LTO:
|
case LTO:
|
||||||
case ISO_7816_4:
|
|
||||||
crcStatus = iso14443A_CRC_check(hdr->isResponse, frame, data_len);
|
crcStatus = iso14443A_CRC_check(hdr->isResponse, frame, data_len);
|
||||||
break;
|
break;
|
||||||
|
case ISO_7816_4:
|
||||||
|
crcStatus = iso14443A_CRC_check(hdr->isResponse, frame, data_len) == 1 ? 3 : 0;
|
||||||
|
crcStatus = iso14443B_CRC_check(frame, data_len) == 1 ? 4 : crcStatus;
|
||||||
|
break;
|
||||||
case THINFILM:
|
case THINFILM:
|
||||||
frame[data_len - 1] ^= frame[data_len - 2];
|
frame[data_len - 1] ^= frame[data_len - 2];
|
||||||
frame[data_len - 2] ^= frame[data_len - 1];
|
frame[data_len - 2] ^= frame[data_len - 1];
|
||||||
|
@ -280,7 +285,8 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the CRC column
|
// Draw the CRC column
|
||||||
const char *crc = (crcStatus == 0 ? "!crc" : (crcStatus == 1 ? " ok " : " "));
|
const char *crcstrings[] = { "!crc", " ok ", " ", "A ok", "B ok" };
|
||||||
|
const char *crc = crcstrings[crcStatus];
|
||||||
|
|
||||||
// mark short bytes (less than 8 Bit + Parity)
|
// mark short bytes (less than 8 Bit + Parity)
|
||||||
if (protocol == ISO_14443A ||
|
if (protocol == ISO_14443A ||
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue