From 2e8d938befceab53c0b88cad5d9be54061aff9b1 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 5 Feb 2017 21:56:47 +0100 Subject: [PATCH 1/1] ADD: 'hf emv' - from @peterfillmore emv fork. A bit cleaned up and moved around. Should compile --- client/Makefile | 1 + client/cmdhf.c | 14 ++++++++------ client/cmdhf14a.c | 4 +++- client/cmdhf14a.h | 1 + 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/client/Makefile b/client/Makefile index 0053d8e5..a56fd35b 100644 --- a/client/Makefile +++ b/client/Makefile @@ -122,6 +122,7 @@ CMDSRCS = mifarehost.c \ cmdhfmfhard.c \ cmdhfmfdes.c \ cmdhftopaz.c \ + cmdhfemv.c \ cmdhw.c \ cmdlf.c \ cmdlfio.c \ diff --git a/client/cmdhf.c b/client/cmdhf.c index 031f065e..e41013b5 100644 --- a/client/cmdhf.c +++ b/client/cmdhf.c @@ -19,12 +19,13 @@ #include "cmdhf14b.h" #include "cmdhf15.h" #include "cmdhfepa.h" -#include "cmdhflegic.h" -#include "cmdhficlass.h" -#include "cmdhfmf.h" -#include "cmdhfmfu.h" -#include "cmdhfmfdes.h" -#include "cmdhftopaz.h" +#include "cmdhflegic.h" // LEGIC +#include "cmdhficlass.h" // ICLASS +#include "cmdhfmf.h" // CLASSIC +#include "cmdhfmfu.h" // ULTRALIGHT/NTAG etc +#include "cmdhfmfdes.h" // DESFIRE +#include "cmdhftopaz.h" // TOPAZ +#include "cmdhfemv.h" // EMV #include "protocols.h" static int CmdHelp(const char *Cmd); @@ -927,6 +928,7 @@ static command_t CommandTable[] = { {"14b", CmdHF14B, 1, "{ ISO14443B RFIDs... }"}, {"15", CmdHF15, 1, "{ ISO15693 RFIDs... }"}, {"epa", CmdHFEPA, 1, "{ German Identification Card... }"}, + {"emv", CmdHFEmv, 1, "{ EMV RFIDs... }"}, {"legic", CmdHFLegic, 1, "{ LEGIC RFIDs... }"}, {"iclass", CmdHFiClass, 1, "{ ICLASS RFIDs... }"}, {"mf", CmdHFMF, 1, "{ MIFARE RFIDs... }"}, diff --git a/client/cmdhf14a.c b/client/cmdhf14a.c index 2600d937..6d338d0d 100644 --- a/client/cmdhf14a.c +++ b/client/cmdhf14a.c @@ -1,5 +1,6 @@ //----------------------------------------------------------------------------- // 2011, Merlok +// 2014, Peter Fillmore // Copyright (C) 2010 iZsh , Hagen Fritsch // // This code is licensed to you under the terms of the GNU GPL, version 2 or, @@ -700,7 +701,8 @@ int CmdHF14ACmdRaw(const char *cmd) { return 0; } -static void waitCmd(uint8_t iSelect) { +static void waitCmd(uint8_t iSelect) +{ UsbCommand resp; uint16_t len = 0; diff --git a/client/cmdhf14a.h b/client/cmdhf14a.h index 93cbfd8f..82fa5197 100644 --- a/client/cmdhf14a.h +++ b/client/cmdhf14a.h @@ -18,6 +18,7 @@ int CmdHF14AMifare(const char *Cmd); int CmdHF14AReader(const char *Cmd); int CmdHF14ASim(const char *Cmd); int CmdHF14ASniff(const char *Cmd); +int CmdHF14AEMVTransaction(const char *Cmd); char* getTagInfo(uint8_t uid); -- 2.39.5