chg: 'hf mf nack' - adjustments in return values..

add: 'hf 14a info -n'  added new parameter,  to enable test for nack bug.
This commit is contained in:
iceman1001 2017-12-06 00:34:57 +01:00
commit 56dbf3ea15
3 changed files with 16 additions and 8 deletions

View file

@ -890,13 +890,15 @@ int detect_classic_nackbug(bool verbose){
PrintAndLog("Num of received NACK : %u", nacks);
}
switch( ok ) {
case -1 : if (verbose) PrintAndLog("Button pressed. Aborted."); return 0;
case -3 : if (verbose) PrintAndLog("Card random number generator is not predictable)."); return 0;
case -4 : if (verbose) {
case 99 : if (verbose) PrintAndLog("Button pressed. Aborted."); return 0;
case 96 :
case 98 : if (verbose) PrintAndLog("Card random number generator is not predictable)."); return 0;
case 97 : if (verbose) {
PrintAndLog("Card random number generator seems to be based on the well-known generating polynomial");
PrintAndLog("with 16 effective bits only, but shows unexpected behavior, try again.");
return 0;
}
case 2 : PrintAndLog("Always leak NACK detected"); return 3;
case 1 : PrintAndLog("NACK bug detected"); return 1;
case 0 : PrintAndLog("No NACK bug detected"); return 2;