chg: 'hf mf mifare' - my darkside attack has been buggy last months. This reverts back to offical pm3.
This commit is contained in:
@@ -1832,7 +1832,6 @@ static int GetATQA(uint8_t *resp, uint8_t *resp_par) {
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// performs iso14443a anticollision (optional) and card select procedure
|
// performs iso14443a anticollision (optional) and card select procedure
|
||||||
// fills the uid and cuid pointer unless NULL
|
// fills the uid and cuid pointer unless NULL
|
||||||
// fills the card info record unless NULL
|
// fills the card info record unless NULL
|
||||||
@@ -2427,7 +2426,7 @@ void ReaderMifare(bool first_try, uint8_t block, uint8_t keytype ) {
|
|||||||
}
|
}
|
||||||
// we didn't calibrate our clock yet,
|
// we didn't calibrate our clock yet,
|
||||||
// iceman: has to be calibrated every time.
|
// iceman: has to be calibrated every time.
|
||||||
if (previous_nt && !nt_attacked) {
|
if (first_try && previous_nt && !nt_attacked) {
|
||||||
|
|
||||||
int nt_distance = dist_nt(previous_nt, nt);
|
int nt_distance = dist_nt(previous_nt, nt);
|
||||||
|
|
||||||
@@ -2500,7 +2499,7 @@ void ReaderMifare(bool first_try, uint8_t block, uint8_t keytype ) {
|
|||||||
if (received_nack) {
|
if (received_nack) {
|
||||||
catch_up_cycles = 8; // the PRNG is delayed by 8 cycles due to the NAC (4Bits = 0x05 encrypted) transfer
|
catch_up_cycles = 8; // the PRNG is delayed by 8 cycles due to the NAC (4Bits = 0x05 encrypted) transfer
|
||||||
|
|
||||||
if (nt_diff == 0)
|
if (nt_diff == 0 && first_try)
|
||||||
par_low = par[0] & 0xE0; // there is no need to check all parities for other nt_diff. Parity Bits for mf_nr_ar[0..2] won't change
|
par_low = par[0] & 0xE0; // there is no need to check all parities for other nt_diff. Parity Bits for mf_nr_ar[0..2] won't change
|
||||||
|
|
||||||
par_list[nt_diff] = SwapBits(par[0], 8);
|
par_list[nt_diff] = SwapBits(par[0], 8);
|
||||||
|
|||||||
Reference in New Issue
Block a user