]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhf14a.c
Merge pull request #355 from pwpiwi/io_fix
[proxmark3-svn] / client / cmdhf14a.c
index 58d1e8b24fb5e96c6d99587bf44019d3e5bb7529..b75215a0d41ef1b4f00a30e12a4ddf098dbbfc5e 100644 (file)
@@ -15,6 +15,7 @@
 #include <string.h>
 #include <unistd.h>
 #include "util.h"
+#include "util_posix.h"
 #include "iso14443crc.h"
 #include "data.h"
 #include "proxmark3.h"
@@ -25,6 +26,7 @@
 #include "cmdmain.h"
 #include "mifare.h"
 #include "cmdhfmfu.h"
+#include "mifarehost.h"
 
 static int CmdHelp(const char *Cmd);
 static void waitCmd(uint8_t iLen);
@@ -409,8 +411,13 @@ int CmdHF14AReader(const char *Cmd)
        c.arg[2] = 0;   
        SendCommand(&c);
        WaitForResponse(CMD_ACK,&resp);
-       uint8_t isOK  = resp.arg[0] & 0xff;
-       PrintAndLog("Answers to chinese magic backdoor commands: %s", (isOK ? "YES" : "NO") );
+       
+       uint8_t isGeneration = resp.arg[0] & 0xff;
+       switch( isGeneration ){
+               case 1: PrintAndLog("Answers to chinese magic backdoor commands (GEN 1a): YES"); break;
+               case 2: PrintAndLog("Answers to chinese magic backdoor commands (GEN 1b): YES"); break;
+               default: PrintAndLog("Answers to chinese magic backdoor commands: NO"); break;
+       }
        
        // disconnect
        c.cmd = CMD_READER_ISO_14443a;
Impressum, Datenschutz