]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Update cmdhf14a.c
authorIceman <iceman@iuse.se>
Mon, 26 Jun 2017 19:55:19 +0000 (21:55 +0200)
committerGitHub <noreply@github.com>
Mon, 26 Jun 2017 19:55:19 +0000 (21:55 +0200)
'hf 14a read' - added mifare classic prng detection

client/cmdhf14a.c

index 258a55782bb1f72bc2e35f33564a2442f2b4785c..4093752263f38c1bddd4456d33bc53a47dc30b6f 100644 (file)
@@ -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]);
 
        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: 
        switch (card.sak) {
                case 0x00: 
-
+                       isMifareClassic = false;
                        //***************************************test****************
                        // disconnect
                        c.arg[0] = 0;
                        //***************************************test****************
                        // disconnect
                        c.arg[0] = 0;
@@ -420,6 +421,13 @@ int CmdHF14AReader(const char *Cmd)
        c.arg[2] = 0;
        SendCommand(&c);
 
        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;
 }
 
        return select_status;
 }
 
Impressum, Datenschutz