From 743325e90f5f492cd395a26e66855b298b864a1c Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 24 Feb 2020 20:39:12 +0100 Subject: [PATCH 1/3] chg: make it slower --- armsrc/mifarecmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index 9e9c721bd..b869489ab 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2229,7 +2229,7 @@ void MifareHasStaticNonce() { nt = bytes_to_num(rec, 4); -// CHK_TIMEOUT(); + CHK_TIMEOUT(); } OUT: From 17dd4bc57217d9046f14166b411766b98e52151d Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 24 Feb 2020 20:39:32 +0100 Subject: [PATCH 2/3] revert #520 --- client/cmdhfmfhard.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/cmdhfmfhard.c b/client/cmdhfmfhard.c index 32afd8cf2..90f686b80 100644 --- a/client/cmdhfmfhard.c +++ b/client/cmdhfmfhard.c @@ -1845,7 +1845,6 @@ static bool TestIfKeyExists(uint64_t key) { num_keys_tested += count; hardnested_print_progress(num_acquired_nonces, "(Test: Key found)", 0.0, 0); crypto1_destroy(pcs); - pthread_mutex_destroy(&statelist_cache_mutex); return true; } } @@ -1853,7 +1852,6 @@ static bool TestIfKeyExists(uint64_t key) { num_keys_tested += count; hardnested_print_progress(num_acquired_nonces, "(Test: Key NOT found)", 0.0, 0); crypto1_destroy(pcs); - pthread_mutex_destroy(&statelist_cache_mutex); return false; } From b87b0313dad220c0c26d3a499e58bdf4b54ea2e4 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 24 Feb 2020 20:39:53 +0100 Subject: [PATCH 3/3] chg: tighter detection of static nonce --- client/cmdhfmf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index c8ee0013c..24296b31d 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -1279,7 +1279,7 @@ static int CmdHF14AMfNested(const char *Cmd) { } // check if tag doesn't have static nonce - if (detect_classic_static_nonce() != 0) { + if (detect_classic_static_nonce() == 1) { PrintAndLogEx(WARNING, "Static nonce detected. Quitting..."); PrintAndLogEx(INFO, "\t Try use " _YELLOW_("`hf mf staticnested`")); return PM3_EOPABORTED; @@ -1839,7 +1839,7 @@ static int CmdHF14AMfNestedHard(const char *Cmd) { if (!know_target_key && nonce_file_read == false) { // check if tag doesn't have static nonce - if (detect_classic_static_nonce() != 0) { + if (detect_classic_static_nonce() == 1) { PrintAndLogEx(WARNING, "Static nonce detected. Quitting..."); PrintAndLogEx(INFO, "\t Try use `" _YELLOW_("hf mf staticnested") "`"); return PM3_EOPABORTED;