chg: 'hf mf nack' - minor

This commit is contained in:
iceman1001 2017-12-05 18:04:21 +01:00
commit a43f156370
2 changed files with 4 additions and 1 deletions

View file

@ -2734,6 +2734,7 @@ void DetectNACKbug() {
// Receive answer. This will be a 4 Bit NACK when the 8 parity bits are OK after decoding // Receive answer. This will be a 4 Bit NACK when the 8 parity bits are OK after decoding
if (ReaderReceive(receivedAnswer, receivedAnswerPar)) { if (ReaderReceive(receivedAnswer, receivedAnswerPar)) {
catch_up_cycles = 8; // the PRNG is delayed by 8 cycles due to the NAC (4Bits = 0x05 encrypted) transfer catch_up_cycles = 8; // the PRNG is delayed by 8 cycles due to the NAC (4Bits = 0x05 encrypted) transfer
isOK = 1;
num_nacks++; num_nacks++;
} }

View file

@ -2856,6 +2856,8 @@ int CmdHf14AMfNack(const char *Cmd) {
SendCommand(&c); SendCommand(&c);
UsbCommand resp; UsbCommand resp;
PrintAndLog("Started testing card for NACK bug");
while (true) { while (true) {
printf("."); printf(".");
@ -2871,7 +2873,7 @@ int CmdHf14AMfNack(const char *Cmd) {
uint32_t nacks = resp.arg[1]; uint32_t nacks = resp.arg[1];
uint32_t auths = resp.arg[2]; uint32_t auths = resp.arg[2];
PrintAndLog("Num of sent auth requestes : %u", auths); PrintAndLog("\nNum of sent auth requestes : %u", auths);
PrintAndLog("Num of received NACK : %u", nacks); PrintAndLog("Num of received NACK : %u", nacks);
switch( ok ) { switch( ok ) {
case -1 : PrintAndLog("Button pressed. Aborted."); return 1; case -1 : PrintAndLog("Button pressed. Aborted."); return 1;