X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/6067df30c59dc58dd4bb0bb922fd28087d3f58f9..ba1324a5feddd5f9f7d7328f60202f93116c11bb:/client/cmdhfmf.c?ds=sidebyside diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 65c9dcb7..a8a1eb80 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -239,6 +239,16 @@ start: c.arg[0] = false; goto start; } else { + + // nonce2key found a candidate key. Lets verify it. + uint8_t keyblock[] = {0,0,0,0,0,0}; + num_to_bytes(r_key, 6, keyblock); + uint64_t key64 = 0; + int res = mfCheckKeys(blockNo, keytype - 0x60 , false, 1, keyblock, &key64); + if ( res > 0 ) { + PrintAndLog("Candidate Key found (%012"llx") - Test authentication failed. Starting over darkside attack", r_key); + goto start; + } PrintAndLog("Found valid key: %012"llx" \n", r_key); } END: