Cleanup arm-side reader-mode mifare classic block read/write code.

This commit is contained in:
nvx committed 2023-07-04 00:11:01 +10:00
1 parent 5de6fa443c
commit edd8e36d80
10 files changed
+249 -523

No files matched your search

+13 -5
View File
@@ -910,11 +910,19 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
uint8_t crcc = iso14443A_CRC_check(hdr->isResponse, mfData, mfDataLen);
//iceman: colorise crc bytes here will need a refactor of code from above.
PrintAndLogEx(NORMAL, " | | * |%-*s | %-4s| %s",
str_padder,
sprint_hex_inrow_spaces(mfData, mfDataLen, 2),
(crcc == 0 ? _RED_(" !! ") : (crcc == 1 ? _GREEN_(" ok ") : " ")),
explanation);
if (hdr->isResponse) {
PrintAndLogEx(NORMAL, " | | * |%-*s | %-4s| %s",
str_padder,
sprint_hex_inrow_spaces(mfData, mfDataLen, 2),
(crcc == 0 ? _RED_(" !! ") : (crcc == 1 ? _GREEN_(" ok ") : " ")),
explanation);
} else {
PrintAndLogEx(NORMAL, " | | * |" _YELLOW_("%-*s")" | " _YELLOW_("%s") "| " _YELLOW_("%s"),
str_padder,
sprint_hex_inrow_spaces(mfData, mfDataLen, 2),
(crcc == 0 ? _RED_(" !! ") : (crcc == 1 ? _GREEN_(" ok ") : " ")),
explanation);
}
}
}