]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmf.c
there was bug in `hf mf mifare`. and speed up this command.
[proxmark3-svn] / client / cmdhfmf.c
index f3f243c440f94ab60a9aa4efb226c8e2c0e9b08f..dff5db37e08e526687e816480e66880082ae2ca0 100644 (file)
@@ -71,17 +71,22 @@ start:
        if (isOK != 1) return 1;\r
        \r
        // execute original function from util nonce2key\r
-       if (nonce2key(uid, nt, par_list, ks_list, &r_key)) return 2;\r
-       printf("------------------------------------------------------------------\n");\r
-       PrintAndLog("Key found:%012llx \n", r_key);\r
+       if (nonce2key(uid, nt, par_list, ks_list, &r_key))\r
+       {\r
+               isOK = 2;\r
+               PrintAndLog("Key not found (lfsr_common_prefix list is null). Nt=%08x", nt);    \r
+       } else {\r
+               printf("------------------------------------------------------------------\n");\r
+               PrintAndLog("Key found:%012llx \n", r_key);\r
 \r
-       num_to_bytes(r_key, 6, keyBlock);\r
-       isOK = mfCheckKeys(0, 0, 1, keyBlock, &r_key);\r
+               num_to_bytes(r_key, 6, keyBlock);\r
+               isOK = mfCheckKeys(0, 0, 1, keyBlock, &r_key);\r
+       }\r
        if (!isOK) \r
                PrintAndLog("Found valid key:%012llx", r_key);\r
        else\r
        {\r
-               PrintAndLog("Found invalid key. ( Nt=%08x ,Trying use it to run again...", nt); \r
+               if (isOK != 2) PrintAndLog("Found invalid key. ( Nt=%08x ,Trying use it to run again...", nt);  \r
                c.arg[0] = nt;\r
                goto start;\r
        }\r
Impressum, Datenschutz