mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
viewing a MFC ev1 now prints the two special sectors
This commit is contained in:
parent
16a776e79f
commit
f0bdcf3838
1 changed files with 38 additions and 14 deletions
|
@ -294,7 +294,14 @@ static void mf_print_block(uint8_t blockno, uint8_t *d, bool verbose) {
|
||||||
char ascii[24] = {0};
|
char ascii[24] = {0};
|
||||||
ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1);
|
ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1);
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "%s| %3d | " _YELLOW_("%s") _MAGENTA_("%s") "%02X " _YELLOW_("%s") "| " _YELLOW_("%s"),
|
if (blockno >= MIFARE_1K_MAXBLOCK) {
|
||||||
|
PrintAndLogEx(INFO,
|
||||||
|
_BACK_BLUE_("%s| %3d | " _YELLOW_("%s"))
|
||||||
|
_BACK_BLUE_(_MAGENTA_("%s"))
|
||||||
|
_BACK_BLUE_("%02X ")
|
||||||
|
_BACK_BLUE_(_YELLOW_("%s"))
|
||||||
|
_BACK_BLUE_("| " _YELLOW_("%s"))
|
||||||
|
,
|
||||||
secstr,
|
secstr,
|
||||||
blockno,
|
blockno,
|
||||||
keya,
|
keya,
|
||||||
|
@ -304,11 +311,28 @@ static void mf_print_block(uint8_t blockno, uint8_t *d, bool verbose) {
|
||||||
ascii
|
ascii
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
PrintAndLogEx(INFO, "%s| %3d | " _YELLOW_("%s") _MAGENTA_("%s") "%02X " _YELLOW_("%s") "| " _YELLOW_("%s"),
|
||||||
|
secstr,
|
||||||
|
blockno,
|
||||||
|
keya,
|
||||||
|
acl,
|
||||||
|
d[9],
|
||||||
|
keyb,
|
||||||
|
ascii
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
int32_t value = 0;
|
int32_t value = 0;
|
||||||
if (verbose && mfc_value(d, &value)) {
|
if (verbose && mfc_value(d, &value)) {
|
||||||
PrintAndLogEx(INFO, "%s| %3d | " _CYAN_("%s") " %"PRIi32, secstr, blockno, sprint_hex_ascii(d, MFBLOCK_SIZE), value);
|
PrintAndLogEx(INFO, "%s| %3d | " _CYAN_("%s") " %"PRIi32, secstr, blockno, sprint_hex_ascii(d, MFBLOCK_SIZE), value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (blockno >= MIFARE_1K_MAXBLOCK) {
|
||||||
|
// MFC Ev1 signature blocks.
|
||||||
|
PrintAndLogEx(INFO, _BACK_BLUE_("%s| %3d | %s"), secstr, blockno, sprint_hex_ascii(d, MFBLOCK_SIZE));
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(INFO, "%s| %3d | %s ", secstr, blockno, sprint_hex_ascii(d, MFBLOCK_SIZE));
|
PrintAndLogEx(INFO, "%s| %3d | %s", secstr, blockno, sprint_hex_ascii(d, MFBLOCK_SIZE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -324,6 +348,7 @@ static void mf_print_blocks(uint16_t n, uint8_t *d, bool verbose) {
|
||||||
PrintAndLogEx(INFO, "-----+-----+-------------------------------------------------+-----------------");
|
PrintAndLogEx(INFO, "-----+-----+-------------------------------------------------+-----------------");
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
PrintAndLogEx(HINT, _CYAN_("cyan") " = value block with decoded value");
|
PrintAndLogEx(HINT, _CYAN_("cyan") " = value block with decoded value");
|
||||||
|
PrintAndLogEx(HINT, _CYAN_("background blue") " = MFC Ev1 signature blocks");
|
||||||
}
|
}
|
||||||
|
|
||||||
// MAD detection
|
// MAD detection
|
||||||
|
@ -5389,9 +5414,8 @@ static int CmdHF14AMfCLoad(const char *Cmd) {
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gdm == false && m1ev1) {
|
if (m1ev1) {
|
||||||
PrintAndLogEx(ERR, "Normally only a GDM / UMC card will handle the extra sectors");
|
PrintAndLogEx(INFO, "Normally only a GDM / UMC card will handle the extra sectors");
|
||||||
return PM3_EINVARG;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fill_from_emulator) {
|
if (fill_from_emulator) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue