]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
CHG: added a verification to see if the found candidate key was able to validate...
authoriceman1001 <iceman@iuse.se>
Wed, 24 Aug 2016 12:10:30 +0000 (14:10 +0200)
committericeman1001 <iceman@iuse.se>
Wed, 24 Aug 2016 12:10:30 +0000 (14:10 +0200)
client/cmdhfmf.c

index 65c9dcb775b8918d50dddec9d91371e24e0e203f..c25ba32bb4ed8653d79f4d1d0be7c650062d02b6 100644 (file)
@@ -239,6 +239,17 @@ start:
                c.arg[0] = false;\r
                goto start;\r
        } else {\r
+               \r
+               // nonce2key found a candidate key.  Lets verify it.\r
+               uint8_t keyblock[] = {0,0,0,0,0,0};\r
+               num_to_bytes(r_key, 6, keyblock);\r
+               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")", r_key);  \r
+                       PrintAndLog("Failing is expected to happen. Trying again ...");\r
+                       goto start;\r
+               }\r
                PrintAndLog("Found valid key: %012"llx" \n", r_key);\r
        }\r
 END:\r
Impressum, Datenschutz