FIX: 'hf mf mifare' - special zero parity attack vector now works. Thanks to the dude who figured this vector out: @douniwan5788 (sorry for comments, I was clearly wrong.) @piwi - for proving me wrong.

this version uses int64_t  (signed)  to signify end-of-lists (-1). It also needs its own compare function for the qsort.  I didn't merge this into existing code which uses uint64_t. (too lazy)
This commit is contained in:
iceman1001 2016-10-29 21:41:02 +02:00
commit 19693bdc06
3 changed files with 59 additions and 47 deletions

View file

@ -214,9 +214,10 @@ start:
}
}
printf("\n");
// error
if (isOK != 1) return 1;
// par == 0, and -4
if (isOK == -4 && par_list == 0) {
if (par_list == 0 && ks_list != 0) {
// this special attack when parities is zero, uses checkkeys. Which now with block/keytype option also needs.
// but it uses 0|1 instead of 0x60|0x61...
if (nonce2key_ex(blockNo, keytype - 0x60 , uid, nt, nr, ks_list, &r_key) ){
@ -229,10 +230,7 @@ start:
goto END;
}
}
// error
if (isOK != 1) return 1;
// execute original function from util nonce2key
if (nonce2key(uid, nt, nr, par_list, ks_list, &r_key)) {
isOK = 2;