improved staticnonce tristate processing

This commit is contained in:
iceman1001
2020-09-11 16:15:58 +02:00
parent bc19a532a9
commit 5b695153b6
4 changed files with 37 additions and 25 deletions

View File

@@ -1956,12 +1956,17 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
isMagic = detect_classic_magic();
if (isMifareClassic) {
int res = detect_classic_static_nonce();
if (res == 1)
if (res == NONCE_STATIC)
PrintAndLogEx(SUCCESS, "Static nonce: " _YELLOW_("yes"));
if (res == 2 && verbose)
PrintAndLogEx(SUCCESS, "Static nonce: " _RED_("fail"));
if (res != 1) { // not static
if (res == NONCE_FAIL && verbose)
PrintAndLogEx(SUCCESS, "Static nonce: " _RED_("read failed"));
if (res == NONCE_NORMAL) {
// not static
res = detect_classic_prng();
if (res == 1)
PrintAndLogEx(SUCCESS, "Prng detection: " _GREEN_("weak"));