mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-02 21:54:10 +08:00
adjust tests
This commit is contained in:
parent
f3b4028e8a
commit
351a8d26af
1 changed files with 7 additions and 3 deletions
|
@ -1938,11 +1938,15 @@ static int CmdHFiClass_loclass(const char *Cmd) {
|
||||||
}
|
}
|
||||||
} else if (opt == 't') {
|
} else if (opt == 't') {
|
||||||
char opt2 = tolower(param_getchar(Cmd, 1));
|
char opt2 = tolower(param_getchar(Cmd, 1));
|
||||||
|
|
||||||
int errors = testCipherUtils();
|
int errors = testCipherUtils();
|
||||||
errors += testMAC();
|
errors += testMAC();
|
||||||
errors += doKeyTests(0);
|
errors += doKeyTests();
|
||||||
errors += testElite(opt2 == 'l');
|
errors += testElite(opt2 == 'l');
|
||||||
if (errors) PrintAndLogEx(ERR, "There were errors!!!");
|
|
||||||
|
if (errors != PM3_SUCCESS)
|
||||||
|
PrintAndLogEx(ERR, "There were errors!!!");
|
||||||
|
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
|
@ -2076,7 +2080,7 @@ void HFiClassCalcDivKey(uint8_t *CSN, uint8_t *KEY, uint8_t *div_key, bool elite
|
||||||
hash2(KEY, keytable);
|
hash2(KEY, keytable);
|
||||||
hash1(CSN, key_index);
|
hash1(CSN, key_index);
|
||||||
for (uint8_t i = 0; i < 8 ; i++)
|
for (uint8_t i = 0; i < 8 ; i++)
|
||||||
key_sel[i] = keytable[key_index[i]] & 0xFF;
|
key_sel[i] = keytable[key_index[i]];
|
||||||
|
|
||||||
//Permute from iclass format to standard format
|
//Permute from iclass format to standard format
|
||||||
permutekey_rev(key_sel, key_sel_p);
|
permutekey_rev(key_sel, key_sel_p);
|
||||||
|
|
Loading…
Reference in a new issue