From: Iceman Date: Mon, 26 Jun 2017 19:55:19 +0000 (+0200) Subject: Update cmdhf14a.c X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/890738733a64445e6565516fe20c927884b712fd Update cmdhf14a.c 'hf 14a read' - added mifare classic prng detection --- 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; }