mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-19 19:38:52 +08:00
CHG: added a verification to see if the found candidate key was able to validate against tag. If not ok, start darkside attack again.
This commit is contained in:
parent
63a1d80130
commit
760157f50b
1 changed files with 11 additions and 0 deletions
|
@ -239,6 +239,17 @@ 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")", r_key);
|
||||
PrintAndLog("Failing is expected to happen. Trying again ...");
|
||||
goto start;
|
||||
}
|
||||
PrintAndLog("Found valid key: %012"llx" \n", r_key);
|
||||
}
|
||||
END:
|
||||
|
|
Loading…
Add table
Reference in a new issue