mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
chg: 'hf iclass chk' - adjustments to output
This commit is contained in:
parent
0773e1a663
commit
c50c0e49d6
1 changed files with 7 additions and 5 deletions
|
@ -800,7 +800,7 @@ static bool select_and_auth(uint8_t *KEY, uint8_t *MAC, uint8_t *div_key, bool u
|
|||
else
|
||||
HFiClassCalcDivKey(CSN, KEY, div_key, elite);
|
||||
|
||||
PrintAndLog("Authing with %s: %02x%02x%02x%02x%02x%02x%02x%02x", rawkey ? "raw key" : "diversified key", div_key[0],div_key[1],div_key[2],div_key[3],div_key[4],div_key[5],div_key[6],div_key[7]);
|
||||
if (verbose) PrintAndLog("Authing with %s: %s", rawkey ? "raw key" : "diversified key", sprint_hex(div_key, 8) );
|
||||
|
||||
doMAC(CCNR, div_key, MAC);
|
||||
UsbCommand resp;
|
||||
|
@ -809,12 +809,12 @@ static bool select_and_auth(uint8_t *KEY, uint8_t *MAC, uint8_t *div_key, bool u
|
|||
clearCommandBuffer();
|
||||
SendCommand(&d);
|
||||
if (!WaitForResponseTimeout(CMD_ACK,&resp,4500)) {
|
||||
PrintAndLog("Auth Command execute timeout");
|
||||
if (verbose) PrintAndLog("Auth Command execute timeout");
|
||||
return false;
|
||||
}
|
||||
uint8_t isOK = resp.arg[0] & 0xff;
|
||||
if (!isOK) {
|
||||
PrintAndLog("Authentication error");
|
||||
if (verbose) PrintAndLog("Authentication error");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -1895,6 +1895,8 @@ int CmdHFiClassCheckKeys(const char *Cmd) {
|
|||
break;
|
||||
}
|
||||
|
||||
memcpy(key, keyBlock + 8 * c , 8);
|
||||
|
||||
// debit key. try twice
|
||||
if ( !found_debit ) {
|
||||
for (int foo = 0; foo < 2; foo++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue