mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-25 00:25:48 +08: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;
|
||||
case ISO_14443B:
|
||||
case TOPAZ:
|
||||
crcStatus = iso14443B_CRC_check(frame, data_len);
|
||||
break;
|
||||
case FELICA:
|
||||
crcStatus = !felica_CRC_check(frame + 2, data_len - 4);
|
||||
break;
|
||||
|
@ -193,9 +195,12 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
|||
case ISO_14443A:
|
||||
case MFDES:
|
||||
case LTO:
|
||||
case ISO_7816_4:
|
||||
crcStatus = iso14443A_CRC_check(hdr->isResponse, frame, data_len);
|
||||
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:
|
||||
frame[data_len - 1] ^= frame[data_len - 2];
|
||||
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
|
||||
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)
|
||||
if (protocol == ISO_14443A ||
|
||||
|
|
Loading…
Reference in a new issue