Merge pull request #954 from byron1901/autopwn-static

hf mf autopwn: fix static nonce detection
This commit is contained in:
Iceman 2020-09-14 21:39:37 +02:00 committed by GitHub
commit 2b9a9801af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2348,7 +2348,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
// Check if at least one sector key was found
if (know_target_key == false) {
// Check if the darkside attack can be used
if (prng_type && has_staticnonce == false) {
if (prng_type && has_staticnonce != NONCE_STATIC) {
if (verbose) {
PrintAndLogEx(INFO, "======================= " _YELLOW_("START DARKSIDE ATTACK") " =======================");
}
@ -2485,7 +2485,7 @@ noValidKeyFound:
skipReadBKey:
if (e_sector[current_sector_i].foundKey[current_key_type_i] == 0) {
if (has_staticnonce)
if (has_staticnonce == NONCE_STATIC)
goto tryStaticnested;
if (prng_type && (nested_failed == false)) {
@ -2578,7 +2578,7 @@ tryHardnested: // If the nested attack fails then we try the hardnested attack
e_sector[current_sector_i].foundKey[current_key_type_i] = 'H';
}
if (has_staticnonce) {
if (has_staticnonce == NONCE_STATIC) {
tryStaticnested:
if (verbose) {
PrintAndLogEx(INFO, "======================= " _YELLOW_("START STATIC NESTED ATTACK") " =======================");