From 08958d36efa9be037e9b1a31b3432c5e892b4b31 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 9 Jul 2023 12:55:37 +0200 Subject: [PATCH] moving VAS to HF command category. Added missing Makefile and CMakefile --- CHANGELOG.md | 1 + client/CMakeLists.txt | 2 +- client/Makefile | 1 + client/experimental_lib/CMakeLists.txt | 1 + client/src/cmdhf.c | 12 +++++++----- client/src/{cmdvas.c => cmdhfvas.c} | 8 ++++---- client/src/{cmdvas.h => cmdhfvas.h} | 6 +++--- client/src/cmdnfc.c | 2 -- 8 files changed, 18 insertions(+), 15 deletions(-) rename client/src/{cmdvas.c => cmdhfvas.c} (99%) rename client/src/{cmdvas.h => cmdhfvas.h} (92%) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef8fd7e32..21b463b28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac ## [unreleased][unreleased] - Added support for Apple Wallet NFC Passes with the Value Added Services protocol implementation (@gm3197) - Fix compiling liblua on iOS (@The-SamminAter) + - Changed `hf_mf_luxeo_dump.lua` - now have list of keys to iterate (@iceman1001) - Fixed the timeout of TCP connections (@wh201906) - Made the connection timeout configurable (@wh201906) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 6252393e8..91742b711 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -298,6 +298,7 @@ set (TARGET_SOURCES ${PM3_ROOT}/client/src/cmdhftexkom.c ${PM3_ROOT}/client/src/cmdhfthinfilm.c ${PM3_ROOT}/client/src/cmdhftopaz.c + ${PM3_ROOT}/client/src/cmdhfvas.c ${PM3_ROOT}/client/src/cmdhfwaveshare.c ${PM3_ROOT}/client/src/cmdhfxerox.c ${PM3_ROOT}/client/src/cmdhw.c @@ -337,7 +338,6 @@ set (TARGET_SOURCES ${PM3_ROOT}/client/src/cmdlfzx8211.c ${PM3_ROOT}/client/src/cmdmain.c ${PM3_ROOT}/client/src/cmdnfc.c - ${PM3_ROOT}/client/src/cmdvas.c ${PM3_ROOT}/client/src/cmdparser.c ${PM3_ROOT}/client/src/cmdpiv.c ${PM3_ROOT}/client/src/cmdscript.c diff --git a/client/Makefile b/client/Makefile index d44e67011..8b9e469ba 100644 --- a/client/Makefile +++ b/client/Makefile @@ -597,6 +597,7 @@ SRCS = mifare/aiddesfire.c \ cmdhfthinfilm.c \ cmdhftopaz.c \ cmdhftexkom.c \ + cmdhfvas.c \ cmdhfwaveshare.c \ cmdhfxerox.c \ cmdhw.c \ diff --git a/client/experimental_lib/CMakeLists.txt b/client/experimental_lib/CMakeLists.txt index 60e7b4004..ca8243dbb 100644 --- a/client/experimental_lib/CMakeLists.txt +++ b/client/experimental_lib/CMakeLists.txt @@ -298,6 +298,7 @@ set (TARGET_SOURCES ${PM3_ROOT}/client/src/cmdhftexkom.c ${PM3_ROOT}/client/src/cmdhfthinfilm.c ${PM3_ROOT}/client/src/cmdhftopaz.c + ${PM3_ROOT}/client/src/cmdhfvas.c ${PM3_ROOT}/client/src/cmdhfwaveshare.c ${PM3_ROOT}/client/src/cmdhfxerox.c ${PM3_ROOT}/client/src/cmdhw.c diff --git a/client/src/cmdhf.c b/client/src/cmdhf.c index 97f7df3c7..b15671272 100644 --- a/client/src/cmdhf.c +++ b/client/src/cmdhf.c @@ -38,6 +38,7 @@ #include "cmdhftopaz.h" // TOPAZ #include "cmdhffelica.h" // ISO18092 / FeliCa #include "cmdhffido.h" // FIDO authenticators +#include "cmdhffudan.h" // Fudan cards #include "cmdhfgallagher.h" // Gallagher DESFire cards #include "cmdhfksx6924.h" // KS X 6924 #include "cmdhfcipurse.h" // CIPURSE transport cards @@ -46,11 +47,11 @@ #include "cmdhfcryptorf.h" // CryptoRF #include "cmdhfseos.h" // SEOS #include "cmdhfst25ta.h" // ST25TA -#include "cmdhfwaveshare.h" // Waveshare -#include "cmdhftexkom.h" // Texkom -#include "cmdhfxerox.h" // Xerox -#include "cmdhffudan.h" // Fudan cards #include "cmdhftesla.h" // Tesla +#include "cmdhftexkom.h" // Texkom +#include "cmdhfvas.h" // Value added services +#include "cmdhfwaveshare.h" // Waveshare +#include "cmdhfxerox.h" // Xerox #include "cmdtrace.h" // trace list #include "ui.h" #include "proxgui.h" @@ -498,8 +499,9 @@ static command_t CommandTable[] = { {"texkom", CmdHFTexkom, AlwaysAvailable, "{ Texkom RFIDs... }"}, {"thinfilm", CmdHFThinfilm, AlwaysAvailable, "{ Thinfilm RFIDs... }"}, {"topaz", CmdHFTopaz, AlwaysAvailable, "{ TOPAZ (NFC Type 1) RFIDs... }"}, - {"xerox", CmdHFXerox, AlwaysAvailable, "{ Fuji/Xerox cartridge RFIDs... }"}, + {"vas", CmdHFVAS, AlwaysAvailable, "{ Apple Value Added Service }"}, {"waveshare", CmdHFWaveshare, AlwaysAvailable, "{ Waveshare NFC ePaper... }"}, + {"xerox", CmdHFXerox, AlwaysAvailable, "{ Fuji/Xerox cartridge RFIDs... }"}, {"-----------", CmdHelp, AlwaysAvailable, "--------------------- " _CYAN_("General") " ---------------------"}, {"help", CmdHelp, AlwaysAvailable, "This help"}, {"list", CmdHFList, AlwaysAvailable, "List protocol data in trace buffer"}, diff --git a/client/src/cmdvas.c b/client/src/cmdhfvas.c similarity index 99% rename from client/src/cmdvas.c rename to client/src/cmdhfvas.c index dfee9dbc3..3e5f9cdf9 100644 --- a/client/src/cmdvas.c +++ b/client/src/cmdhfvas.c @@ -16,7 +16,7 @@ // An implementation of the Value Added Service protocol //----------------------------------------------------------------------------- -#include "cmdvas.h" +#include "cmdhfvas.h" #include "cliparser.h" #include "cmdparser.h" #include "comms.h" @@ -561,14 +561,14 @@ static int CmdHelp(const char *Cmd); static command_t CommandTable[] = { {"--------", CmdHelp, AlwaysAvailable, "----------- " _CYAN_("Value Added Service") " -----------"}, + {"help", CmdHelp, AlwaysAvailable, "This help"}, + {"--------", CmdHelp, AlwaysAvailable, "----------------- " _CYAN_("General") " -----------------"}, {"reader", CmdVASReader, IfPm3Iso14443a, "Read and decrypt VAS message"}, {"decrypt", CmdVASDecrypt, AlwaysAvailable, "Decrypt a previously captured VAS cryptogram"}, - {"--------", CmdHelp, AlwaysAvailable, "----------------- " _CYAN_("General") " -----------------"}, - {"help", CmdHelp, AlwaysAvailable, "This help"}, {NULL, NULL, NULL, NULL} }; -int CmdVAS(const char *Cmd) { +int CmdHFVAS(const char *Cmd) { clearCommandBuffer(); return CmdsParse(CommandTable, Cmd); }; diff --git a/client/src/cmdvas.h b/client/src/cmdhfvas.h similarity index 92% rename from client/src/cmdvas.h rename to client/src/cmdhfvas.h index 59a53f50d..50189e227 100644 --- a/client/src/cmdvas.h +++ b/client/src/cmdhfvas.h @@ -16,11 +16,11 @@ // An implementation of the Value Added Service protocol //----------------------------------------------------------------------------- -#ifndef CMDVAS_H__ -#define CMDVAS_H__ +#ifndef CMDHFVAS_H__ +#define CMDHFVAS_H__ #include "common.h" -int CmdVAS(const char *Cmd); +int CmdHFVAS(const char *Cmd); #endif diff --git a/client/src/cmdnfc.c b/client/src/cmdnfc.c index 45b01b874..eadfa7161 100644 --- a/client/src/cmdnfc.c +++ b/client/src/cmdnfc.c @@ -28,7 +28,6 @@ #include "cmdhfst25ta.h" #include "cmdhfthinfilm.h" #include "cmdhftopaz.h" -#include "cmdvas.h" #include "cmdnfc.h" #include "fileutils.h" #include "mifare/mifaredefault.h" @@ -422,7 +421,6 @@ static command_t CommandTable[] = { // {"type5", CmdNFCType5, AlwaysAvailable, "{ NFC Forum Tag Type 5... }"}, {"mf", CmdNFCMF, AlwaysAvailable, "{ NFC Type MIFARE Classic/Plus Tag... }"}, {"barcode", CmdNFCBarcode, AlwaysAvailable, "{ NFC Barcode Tag... }"}, - {"vas", CmdVAS, AlwaysAvailable, "{ Apple Value Added Service }"}, // {"--------", CmdHelp, AlwaysAvailable, "--------------------- " _CYAN_("NFC peer-to-peer") " ------------"}, // {"isodep", CmdISODEP, AlwaysAvailable, "{ ISO-DEP protocol... }"}, // {"llcp", CmdNFCLLCP, AlwaysAvailable, "{ Logical Link Control Protocol... }"},