Skip to content

Commit

Permalink
clearning variable before each call to hardnested
Browse files Browse the repository at this point in the history
  • Loading branch information
iceman1001 committed May 6, 2023
1 parent f5e93c0 commit 31b01ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/cmdhfmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2841,7 +2841,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
}
break;
}
case PM3_ESTATIC_NONCE:
case PM3_ESTATIC_NONCE: {
PrintAndLogEx(ERR, "Error: Static encrypted nonce detected. Aborted\n");

e_sector[current_sector_i].Key[current_key_type_i] = 0xffffffffffff;;
Expand All @@ -2854,6 +2854,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
free(e_sector);
free(fptr);
return isOK;
}
case PM3_SUCCESS: {
calibrate = false;
e_sector[current_sector_i].Key[current_key_type_i] = bytes_to_num(tmp_key, 6);
Expand All @@ -2878,6 +2879,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
slow ? "Yes" : "No");
}

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) {
Expand Down

0 comments on commit 31b01ff

Please sign in to comment.