adapting to the new return value from hardnested

This commit is contained in:
iceman1001 2023-05-26 05:20:29 +02:00
commit c35749dd13

View file

@ -2170,6 +2170,10 @@ static int CmdHF14AMfNestedHard(const char *Cmd) {
case PM3_ESTATIC_NONCE: case PM3_ESTATIC_NONCE:
PrintAndLogEx(ERR, "Error: Static encrypted nonce detected. Aborted\n"); PrintAndLogEx(ERR, "Error: Static encrypted nonce detected. Aborted\n");
break; break;
case PM3_EFAILED: {
PrintAndLogEx(FAILED, "\nFailed to recover a key...");
break;
}
default : default :
break; break;
} }
@ -2862,7 +2866,7 @@ tryHardnested: // If the nested attack fails then we try the hardnested attack
foundkey = 0; foundkey = 0;
isOK = mfnestedhard(mfFirstBlockOfSector(sectorno), keytype, key, mfFirstBlockOfSector(current_sector_i), current_key_type_i, NULL, false, false, slow, 0, &foundkey, NULL); isOK = mfnestedhard(mfFirstBlockOfSector(sectorno), keytype, key, mfFirstBlockOfSector(current_sector_i), current_key_type_i, NULL, false, false, slow, 0, &foundkey, NULL);
DropField(); DropField();
if (isOK) { if (isOK != PM3_SUCCESS) {
switch (isOK) { switch (isOK) {
case PM3_ETIMEOUT: { case PM3_ETIMEOUT: {
PrintAndLogEx(ERR, "\nError: No response from Proxmark3"); 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, ""); PrintAndLogEx(NORMAL, "");
break; break;
} }
case PM3_EFAILED: {
PrintAndLogEx(FAILED, "\nFailed to recover a key...");
continue;
}
default: { default: {
break; break;
} }