From 890738733a64445e6565516fe20c927884b712fd Mon Sep 17 00:00:00 2001 From: Iceman Date: Mon, 26 Jun 2017 21:55:19 +0200 Subject: [PATCH] Update cmdhf14a.c 'hf 14a read' - added mifare classic prng detection --- client/cmdhf14a.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/cmdhf14a.c b/client/cmdhf14a.c index 258a5578..40937522 100644 --- a/client/cmdhf14a.c +++ b/client/cmdhf14a.c @@ -170,9 +170,10 @@ int CmdHF14AReader(const char *Cmd) PrintAndLog("ATQA : %02x %02x", card.atqa[1], card.atqa[0]); PrintAndLog(" SAK : %02x [%d]", card.sak, resp.arg[0]); + bool isMifareClassic = true; switch (card.sak) { case 0x00: - + isMifareClassic = false; //***************************************test**************** // disconnect c.arg[0] = 0; @@ -420,6 +421,13 @@ int CmdHF14AReader(const char *Cmd) c.arg[2] = 0; SendCommand(&c); + if (isMifareClassic) { + if ( detect_classic_prng() ) + PrintAndLog("Prng detection: WEAK (darkside)"); + else + PrintAndLog("Prng detection: HARDEND (hardnested)"); + } + return select_status; } -- 2.39.5