From 5b37fe8af66e8ed0e726d80239654f8e8030b04a Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 29 Jun 2025 23:38:27 +0200 Subject: [PATCH] hf mf info - dont try fudan cards --- armsrc/mifarecmd.c | 2 +- client/src/cmdhf14a.c | 8 ++++---- client/src/cmdhfmf.c | 17 ++++++++++++----- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index 4386f5003..010277873 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -3220,7 +3220,7 @@ void MifareHasStaticNonce(void) { } if (counter) { - Dbprintf("Static nonce......... " _YELLOW_("%08x"), nt); + Dbprintf("Static nonce....... " _YELLOW_("%08x"), nt); data[0] = NONCE_STATIC; } else { data[0] = NONCE_NORMAL; diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index 8d7ec5d5b..42bee9388 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -3147,18 +3147,18 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) { if (isMifareClassic || isMifareMini) { res = detect_classic_static_nonce(); if (res == NONCE_STATIC) { - PrintAndLogEx(SUCCESS, "Static nonce......... " _YELLOW_("yes")); + PrintAndLogEx(SUCCESS, "Static nonce....... " _YELLOW_("yes")); } if (res == NONCE_NORMAL) { // not static res = detect_classic_prng(); if (res == 1) { - PrintAndLogEx(SUCCESS, "Prng detection....... " _GREEN_("weak")); + PrintAndLogEx(SUCCESS, "Prng detection..... " _GREEN_("weak")); } else if (res == 0) { - PrintAndLogEx(SUCCESS, "Prng detection....... " _YELLOW_("hard")); + PrintAndLogEx(SUCCESS, "Prng detection..... " _YELLOW_("hard")); } else { - PrintAndLogEx(FAILED, "Prng detection........ " _RED_("fail")); + PrintAndLogEx(FAILED, "Prng detection...... " _RED_("fail")); } if (do_nack_test) { diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 038180ff1..f52f2ba19 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -10237,7 +10237,7 @@ static int CmdHF14AMfInfo(const char *Cmd) { } PrintAndLogEx(NORMAL, ""); - PrintAndLogEx(INFO, "--- " _CYAN_("ISO14443-a Information") " ---------------------"); + PrintAndLogEx(INFO, "--- " _CYAN_("ISO14443-a Information") " -----------------------------"); PrintAndLogEx(SUCCESS, " UID: " _GREEN_("%s"), sprint_hex(card.uid, card.uidlen)); PrintAndLogEx(SUCCESS, "ATQA: " _GREEN_("%02X %02X"), card.atqa[1], card.atqa[0]); PrintAndLogEx(SUCCESS, " SAK: " _GREEN_("%02X [%" PRIu64 "]"), card.sak, resp.oldarg[0]); @@ -10292,6 +10292,13 @@ static int CmdHF14AMfInfo(const char *Cmd) { PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("emv info") "`"); } + if ((card_type & MTFUDAN) == MTFUDAN) { + PrintAndLogEx(NORMAL, ""); + PrintAndLogEx(INFO, "FUDAN FM11RF005 detected"); + PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf fudan dump") "`"); + goto out; + } + if (setDeviceDebugLevel(verbose ? MAX(dbg_curr, DBG_INFO) : DBG_NONE, false) != PM3_SUCCESS) { return PM3_EFAILED; } @@ -10764,7 +10771,7 @@ static int CmdHF14AMfISEN(const char *Cmd) { } PrintAndLogEx(NORMAL, ""); - PrintAndLogEx(INFO, "--- " _CYAN_("ISO14443-a Information") " ---------------------"); + PrintAndLogEx(INFO, "--- " _CYAN_("ISO14443-a Information") " -----------------------------"); PrintAndLogEx(SUCCESS, " UID: " _GREEN_("%s"), sprint_hex(card.uid, card.uidlen)); PrintAndLogEx(SUCCESS, "ATQA: " _GREEN_("%02X %02X"), card.atqa[1], card.atqa[0]); PrintAndLogEx(SUCCESS, " SAK: " _GREEN_("%02X [%" PRIu64 "]"), card.sak, resp.oldarg[0]); @@ -10776,11 +10783,11 @@ static int CmdHF14AMfISEN(const char *Cmd) { int res = detect_classic_static_encrypted_nonce_ex(blockn, keytype, key, blockn_nested, keytype_nested, key_nested, nr_nested, reset, hardreset, addread, addauth, incblk2, corruptnrar, corruptnrarparity, true); if (res == NONCE_STATIC) { - PrintAndLogEx(SUCCESS, "Static nonce......... " _YELLOW_("yes")); + PrintAndLogEx(SUCCESS, "Static nonce....... " _YELLOW_("yes")); } else if (res == NONCE_SUPERSTATIC) { - PrintAndLogEx(SUCCESS, "Static nonce......... " _YELLOW_("yes, even when nested")); + PrintAndLogEx(SUCCESS, "Static nonce....... " _YELLOW_("yes, even when nested")); } else if (res == NONCE_STATIC_ENC) { - PrintAndLogEx(SUCCESS, "Static enc nonce..... " _RED_("yes")); + PrintAndLogEx(SUCCESS, "Static enc nonce... " _RED_("yes")); } if (res == NONCE_STATIC_ENC) {