'hf 14a read' - added mifare classic prng detection
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;
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)");
+ }
+