]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmf.c
CHG: adding the HID wiegand calcs again. Still need to set the bit37 indicator...
[proxmark3-svn] / client / cmdhfmf.c
index a840969e20c5e0af8d9e36985bf2ae6f455e5d7b..0ea171afce13084a06621625175801541bbc39b8 100644 (file)
@@ -214,14 +214,14 @@ start:
                }\r
        }       \r
        printf("\n");\r
+       // error\r
+       if (isOK != 1) return 1;\r
        \r
-       // par == 0,  and -4\r
-       if (isOK == -4 && par_list == 0) {\r
+       if (par_list == 0 && ks_list != 0) {\r
                // this special attack when parities is zero, uses checkkeys. Which now with block/keytype option also needs. \r
                // but it uses 0|1 instead of 0x60|0x61...\r
                if (nonce2key_ex(blockNo, keytype - 0x60 , uid, nt, nr, ks_list, &r_key) ){\r
-                       PrintAndLog("Key not found (lfsr_common_prefix list is null).");        \r
-                       PrintAndLog("Failing is expected to happen in 25%% of all cases. Trying again with a different reader nonce...");\r
+                       PrintAndLog("Trying again with a different reader nonce...");\r
                        c.arg[0] = false;\r
                        goto start;\r
                } else {\r
@@ -229,10 +229,7 @@ start:
                        goto END;\r
                }\r
        }\r
-       \r
-       // error\r
-       if (isOK != 1) return 1;\r
-       \r
+\r
        // execute original function from util nonce2key\r
        if (nonce2key(uid, nt, nr, par_list, ks_list, &r_key)) {\r
                isOK = 2;\r
@@ -248,7 +245,7 @@ start:
                uint64_t key64 = 0;\r
                int res = mfCheckKeys(blockNo, keytype - 0x60 , false, 1, keyblock, &key64);\r
                if ( res > 0 ) {\r
-                       PrintAndLog("Candidate Key found (%012"llx") - Test authentication failed. Starting over darkside attack", r_key);      \r
+                       PrintAndLog("Candidate Key found (%012"llx") - Test authentication failed. [%d] Restarting darkside attack", r_key, res);       \r
                        goto start;\r
                }\r
                PrintAndLog("Found valid key: %012"llx" \n", r_key);\r
@@ -1060,7 +1057,8 @@ int CmdHF14AMfNestedHard(const char *Cmd) {
                        slow ? "Yes" : "No",\r
                        tests);\r
 \r
-       int16_t isOK = mfnestedhard(blockNo, keyType, key, trgBlockNo, trgKeyType, know_target_key ? trgkey : NULL, nonce_file_read, nonce_file_write, slow, tests);\r
+       uint64_t foundkey = 0;\r
+       int16_t isOK = mfnestedhard(blockNo, keyType, key, trgBlockNo, trgKeyType, know_target_key ? trgkey : NULL, nonce_file_read, nonce_file_write, slow, tests, &foundkey);\r
 \r
        if (isOK) {\r
                switch (isOK) {\r
Impressum, Datenschutz