Skip to content

Commit f0f69d6

Browse files
committed
refactor: mifare info
1 parent 168c523 commit f0f69d6

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

client/src/cmdhf14a.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2609,8 +2609,8 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
26092609
PrintAndLogEx(SUCCESS, "Static nonce......... " _YELLOW_("yes"));
26102610
}
26112611

2612-
if (res == NONCE_FAIL && verbose) {
2613-
PrintAndLogEx(SUCCESS, "Static nonce......... " _RED_("read failed"));
2612+
if (res == NONCE_FAIL) {
2613+
PrintAndLogEx(SUCCESS, "nonce................ " _RED_("read failed"));
26142614
}
26152615

26162616
if (res == NONCE_NORMAL) {

client/src/cmdhfmf.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9552,7 +9552,7 @@ static int CmdHF14AMfInfo(const char *Cmd) {
95529552
}
95539553

95549554
if (fKeyType != 0xFF) {
9555-
PrintAndLogEx(SUCCESS, "Block 0.......... %s", sprint_hex(blockdata, MFBLOCK_SIZE));
9555+
PrintAndLogEx(SUCCESS, "Block 0.......... %s", sprint_hex_ascii(blockdata, MFBLOCK_SIZE));
95569556
}
95579557

95589558
PrintAndLogEx(NORMAL, "");
@@ -9586,7 +9586,7 @@ static int CmdHF14AMfInfo(const char *Cmd) {
95869586
PrintAndLogEx(SUCCESS, "NXP MF1ICS5004");
95879587
} else if (fKeyType == MF_KEY_BD08 || fKeyType == MF_KEY_BD08S || fKeyType == MF_KEY_BD32) {
95889588
PrintAndLogEx(SUCCESS, _RED_("Unknown card with backdoor, please report details!"));
9589-
}
9589+
} else
95909590
// other cards
95919591
if (card.sak == 0x08 && memcmp(blockdata + 5, "\x88\x04\x00\x46", 4) == 0) {
95929592
PrintAndLogEx(SUCCESS, "NXP MF1ICS5005");
@@ -9598,6 +9598,8 @@ static int CmdHF14AMfInfo(const char *Cmd) {
95989598
PrintAndLogEx(SUCCESS, "NXP MF1ICS5007");
95999599
} else if (card.sak == 0x08 && memcmp(blockdata + 5, "\x88\x04\x00\xc0", 4) == 0) {
96009600
PrintAndLogEx(SUCCESS, "NXP MF1ICS5035");
9601+
} else {
9602+
PrintAndLogEx(SUCCESS, "unknown");
96019603
}
96029604

96039605
if (e_sector[1].foundKey[MF_KEY_A] && (e_sector[1].Key[MF_KEY_A] == 0x2A2C13CC242A)) {
@@ -9627,8 +9629,8 @@ static int CmdHF14AMfInfo(const char *Cmd) {
96279629
PrintAndLogEx(SUCCESS, "Static nonce......... " _YELLOW_("yes"));
96289630
}
96299631

9630-
if (res == NONCE_FAIL && verbose) {
9631-
PrintAndLogEx(SUCCESS, "Static nonce......... " _RED_("read failed"));
9632+
if (res == NONCE_FAIL) {
9633+
PrintAndLogEx(SUCCESS, "nonce................ " _RED_("read failed"));
96329634
}
96339635

96349636
if (res == NONCE_NORMAL) {

0 commit comments

Comments
 (0)