mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-13 10:07:25 -07:00
chg: 'hf mf nack' better output
This commit is contained in:
parent
4289846383
commit
984a26370d
2 changed files with 16 additions and 9 deletions
|
@ -2758,13 +2758,10 @@ void DetectNACKbug() {
|
|||
consecutive_resyncs = 0;
|
||||
} // end for loop
|
||||
|
||||
Dbprintf("Num of sent auth requestes : %u", i);
|
||||
Dbprintf("Num of received NACK : %u", num_nacks);
|
||||
|
||||
if ( num_nacks == 3)
|
||||
if (num_nacks == 3)
|
||||
isOK = 1;
|
||||
|
||||
cmd_send(CMD_ACK, isOK, num_nacks, 0, 0, 0 );
|
||||
cmd_send(CMD_ACK, isOK, num_nacks, i, 0, 0 );
|
||||
|
||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
||||
LEDsoff();
|
||||
|
|
|
@ -2867,10 +2867,20 @@ int CmdHf14AMfNack(const char *Cmd) {
|
|||
}
|
||||
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 2000)) {
|
||||
uint8_t ok = resp.arg[0] & 0xff;
|
||||
PrintAndLog("isOk:%02x", ok);
|
||||
if (!ok) {
|
||||
PrintAndLog("Failed.");
|
||||
int32_t ok = resp.arg[0] & 0xff;
|
||||
uint32_t nacks = resp.arg[1];
|
||||
uint32_t auths = resp.arg[2];
|
||||
|
||||
PrintAndLog("Three different nonces used, expecting three nacks");
|
||||
PrintAndLog("Num of sent auth requestes : %u", auths);
|
||||
PrintAndLog("Num of received NACK : %u", num_nacks);
|
||||
switch( ok ) {
|
||||
case -1 : PrintAndLog("Button pressed. Aborted."); return 1;
|
||||
case -3 : PrintAndLog("Card random number generator is not predictable)."); return 1;
|
||||
case -4 : PrintAndLog("Card random number generator seems to be based on the wellknown");
|
||||
PrintAndLog("generating polynomial with 16 effective bits only, but shows unexpected behaviour."); return 1;
|
||||
case 1 : PrintAndLog("Card has NACK bug."); return 1;
|
||||
case 0 : PrintAndLog("Card may have NACK bug. inconclusive result"); return 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue