]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhf14a.c
added showing apdu response codes
[proxmark3-svn] / client / cmdhf14a.c
index 97a57c5f9815cfa762b53a46d5718ba530320e5c..6d6ea8549a7cb9cbcae78ecf6f0f2c75cdb6db65 100644 (file)
@@ -1,5 +1,5 @@
 //-----------------------------------------------------------------------------
-// 2011, Merlok
+// 2011, 2017 Merlok
 // Copyright (C) 2010 iZsh <izsh at fail0verflow.com>, Hagen Fritsch
 //
 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
@@ -9,34 +9,11 @@
 // High frequency ISO14443A commands
 //-----------------------------------------------------------------------------
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include "util.h"
-#include "util_posix.h"
-#include "iso14443crc.h"
-#include "data.h"
-#include "proxmark3.h"
-#include "ui.h"
-#include "cmdparser.h"
 #include "cmdhf14a.h"
-#include "common.h"
-#include "cmdmain.h"
-#include "mifare.h"
-#include "cmdhfmfu.h"
-#include "mifarehost.h"
 
 static int CmdHelp(const char *Cmd);
 static int waitCmd(uint8_t iLen);
 
-// structure and database for uid -> tagtype lookups 
-typedef struct { 
-       uint8_t uid;
-       char* desc;
-} manufactureName; 
-
 const manufactureName manufactureMapping[] = {
        // ID,  "Vendor Country"
        { 0x01, "Motorola UK" },
@@ -110,7 +87,6 @@ const manufactureName manufactureMapping[] = {
        { 0x00, "no tag-info available" } // must be the last entry
 };
 
-
 // get a product description based on the UID
 //             uid[8]  tag uid
 // returns description of the best match       
@@ -709,7 +685,7 @@ int CmdHF14AAPDU(const char *cmd) {
 
        PrintAndLog("<<<< %s", sprint_hex(data, datalen));
        
-       PrintAndLog("APDU response: %02x %02x", data[datalen - 2], data[datalen - 1]); // TODO add APDU descriptions
+       PrintAndLog("APDU response: %02x %02x - %s", data[datalen - 2], data[datalen - 1], GetAPDUCodeDescription(data[datalen - 2], data[datalen - 1])); 
 
        // here TLV decoder...
        if (decodeTLV) {
Impressum, Datenschutz