fix: 'hf iclass sim 4' array out-of-bounds write.

chg: 'hf iclass loclass'  nice output
This commit is contained in:
iceman1001
2017-09-18 15:31:53 +02:00
parent a5ffc567c6
commit dd870ece28
2 changed files with 37 additions and 21 deletions

View File

@@ -403,7 +403,9 @@ int bruteforceItem(dumpdata item, uint16_t keytable[])
brute++;
if ((brute & 0xFFFF) == 0) {
printf("%d,",(brute >> 16) & 0xFF);
printf("%3d,",(brute >> 16) & 0xFF);
if ( ((brute >> 16) % 0x10) == 0)
printf("\n");
fflush(stdout);
}
}
@@ -418,6 +420,7 @@ int bruteforceItem(dumpdata item, uint16_t keytable[])
keytable[bytes_to_recover[i]] |= CRACK_FAILED;
}
} else {
prnlog("DES calcs: %u\n", brute);
for (i=0; i < numbytes_to_recover; i++){
keytable[bytes_to_recover[i]] &= 0xFF;
keytable[bytes_to_recover[i]] |= CRACKED;