From 2d930f921a2bcb4e33d007fd15a49a551a5b1339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Esperan=C3=A7a=20Triques?= Date: Sat, 22 Feb 2025 10:53:18 -0300 Subject: [PATCH] Remove duplicated block print in verbose mode in hf mf view --- client/src/cmdhfmf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 977a9cad2..8aab08019 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -326,16 +326,16 @@ static void mf_print_block(uint8_t blockno, uint8_t *d, bool verbose) { } } else { - int32_t value = 0; - if (verbose && mfc_value(d, &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 { - PrintAndLogEx(INFO, "%s| %3d | %s", secstr, blockno, sprint_hex_ascii(d, MFBLOCK_SIZE)); + int32_t value = 0; + if (verbose && mfc_value(d, &value)) { + PrintAndLogEx(INFO, "%s| %3d | " _CYAN_("%s") " %"PRIi32, secstr, blockno, sprint_hex_ascii(d, MFBLOCK_SIZE), value); + } else { + PrintAndLogEx(INFO, "%s| %3d | %s", secstr, blockno, sprint_hex_ascii(d, MFBLOCK_SIZE)); + } } } }