adapted viewing MFC dump files to also colorize ACL + GPB bytes
This commit is contained in:
1 parent
fe204d8529
commit
a43d8ea9e0
2 files changed
+22
-1
No files matched your search
+21
-1
@@ -251,7 +251,27 @@ static void mf_print_block(uint8_t blockno, uint8_t *d, bool verbose) {
|
||||
if (blockno == 0) {
|
||||
PrintAndLogEx(INFO, "%s| %3d | " _RED_("%s"), secstr, blockno, sprint_hex_ascii(d, MFBLOCK_SIZE));
|
||||
} else if (mfIsSectorTrailer(blockno)) {
|
||||
PrintAndLogEx(INFO, "%s| %3d | " _YELLOW_("%s"), secstr, blockno, sprint_hex_ascii(d, MFBLOCK_SIZE));
|
||||
|
||||
char keya[26] = {0};
|
||||
hex_to_buffer((uint8_t *)keya, d, MIFARE_KEY_SIZE, sizeof(keya) - 1, 0, 1, true);
|
||||
|
||||
char acl[20] = {0};
|
||||
hex_to_buffer((uint8_t *)acl, d + MIFARE_KEY_SIZE, 4, sizeof(acl) - 1, 0, 1, true);
|
||||
|
||||
char keyb[26] = {0};
|
||||
hex_to_buffer((uint8_t *)keyb, d + 10, MIFARE_KEY_SIZE, sizeof(keyb) - 1, 0, 1, true);
|
||||
|
||||
char ascii[24] = {0};
|
||||
ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1);
|
||||
|
||||
PrintAndLogEx(INFO, "%s| %3d | " _YELLOW_("%s") _MAGENTA_("%s") _YELLOW_("%s") "| " _YELLOW_("%s"),
|
||||
secstr,
|
||||
blockno,
|
||||
keya,
|
||||
acl,
|
||||
keyb,
|
||||
ascii
|
||||
);
|
||||
} else {
|
||||
int32_t value = 0;
|
||||
if (verbose && mfc_value(d, &value)) {
|
||||
|
||||
Reference in new issue
Block a user