#include <string.h>
#include <unistd.h>
#include "util.h"
+#include "util_posix.h"
#include "iso14443crc.h"
#include "data.h"
#include "proxmark3.h"
#include "cmdmain.h"
#include "mifare.h"
#include "cmdhfmfu.h"
+#include "mifarehost.h"
static int CmdHelp(const char *Cmd);
static void waitCmd(uint8_t iLen);
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;
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;
}
PrintAndLog("Buffer is full, we can't add CRC to your data");
break;
} else {
- datalen++
+ datalen++;
}
}
continue;