From f59ee2ffeb3b05cd9f055ba94fdbcc1560c61bf8 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 6 Dec 2017 01:20:31 +0100 Subject: [PATCH] chg: textual --- client/mifarehost.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/client/mifarehost.c b/client/mifarehost.c index 3258aea0b..bbbe2c76d 100644 --- a/client/mifarehost.c +++ b/client/mifarehost.c @@ -890,15 +890,21 @@ int detect_classic_nackbug(bool verbose){ PrintAndLog("Num of received NACK : %u", nacks); } switch( ok ) { - case 99 : if (verbose) PrintAndLog("Button pressed. Aborted."); return 0; + case 99 : 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 98 : { + if (verbose) + PrintAndLog("Card random number generator is not predictable."); + PrintAndLog("Detection failed"); + return 2; } - + 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;