FIX: 'hf mf darkside' - correct behaviour is to copy the key candidates to the list, not only to first position.

This solves slow execution of command,  since before attack had to repeat until correct key was in pos 1.
This commit is contained in:
iceman1001
2018-02-07 21:51:45 +01:00
parent 374571046d
commit 134d04cb7a

View File

@@ -94,11 +94,9 @@ int mfDarkside(uint8_t blockno, uint8_t key_type, uint64_t *key) {
int size = keycount - i > max_keys ? max_keys : keycount - i;
for (int j = 0; j < size; j++) {
if (par_list == 0) {
if ( last_keylist != NULL ){
num_to_bytes(last_keylist[i*max_keys + j], 6, keyBlock);
}
num_to_bytes(last_keylist[i*max_keys + j], 6, keyBlock+(j*6));
} else {
num_to_bytes(keylist[i*max_keys + j], 6, keyBlock);
num_to_bytes(keylist[i*max_keys + j], 6, keyBlock+(j*6));
}
}
if (!mfCheckKeys(blockno, key_type - 0x60, false, size, keyBlock, key)) {