From c35749dd13d9ca0150321c2f05169b492df80f85 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 26 May 2023 05:20:29 +0200 Subject: [PATCH] adapting to the new return value from hardnested --- client/src/cmdhfmf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 335898ef1..553317bcd 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -2170,6 +2170,10 @@ static int CmdHF14AMfNestedHard(const char *Cmd) { case PM3_ESTATIC_NONCE: PrintAndLogEx(ERR, "Error: Static encrypted nonce detected. Aborted\n"); break; + case PM3_EFAILED: { + PrintAndLogEx(FAILED, "\nFailed to recover a key..."); + break; + } default : break; } @@ -2862,7 +2866,7 @@ tryHardnested: // If the nested attack fails then we try the hardnested attack foundkey = 0; isOK = mfnestedhard(mfFirstBlockOfSector(sectorno), keytype, key, mfFirstBlockOfSector(current_sector_i), current_key_type_i, NULL, false, false, slow, 0, &foundkey, NULL); DropField(); - if (isOK) { + if (isOK != PM3_SUCCESS) { switch (isOK) { case PM3_ETIMEOUT: { PrintAndLogEx(ERR, "\nError: No response from Proxmark3"); @@ -2885,6 +2889,10 @@ tryHardnested: // If the nested attack fails then we try the hardnested attack PrintAndLogEx(NORMAL, ""); break; } + case PM3_EFAILED: { + PrintAndLogEx(FAILED, "\nFailed to recover a key..."); + continue; + } default: { break; }