From 7028944ee03e5091dda48e2a2e1464623b7500ae Mon Sep 17 00:00:00 2001 From: Grayson Martin Date: Tue, 11 Jul 2023 10:55:43 -0500 Subject: [PATCH] Begin cmd --- client/src/cmdsmartcard.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/client/src/cmdsmartcard.c b/client/src/cmdsmartcard.c index 9c273739d..e14bb35e5 100644 --- a/client/src/cmdsmartcard.c +++ b/client/src/cmdsmartcard.c @@ -1145,10 +1145,28 @@ static int CmdSmartBruteforceSFI(const char *Cmd) { return PM3_SUCCESS; } +static int CmdRelay(const char *Cmd) { + CLIParserContext *ctx; + CLIParserInit(&ctx, "smart relay", + "Turn pm3 into pcsc reader and relay to host OS via vpcd", + "smart relay" + ); + + void *argtable[] = { + arg_param_begin, + arg_str1("p", "port", "", "vpcd socket port (default: 35963)"), + arg_param_end + }; + CLIExecWithReturn(ctx, Cmd, argtable, true); + + CLIParserFree(ctx); +} + static command_t CommandTable[] = { {"help", CmdHelp, AlwaysAvailable, "This help"}, {"list", CmdSmartList, AlwaysAvailable, "List ISO 7816 history"}, {"info", CmdSmartInfo, IfPm3Smartcard, "Tag information"}, + {"relay", CmdRelay, IfPm3Iso14443a, "Turn pm3 into pcsc reader and relay to host OS via vpcd"}, {"reader", CmdSmartReader, IfPm3Smartcard, "Act like an IS07816 reader"}, {"raw", CmdSmartRaw, IfPm3Smartcard, "Send raw hex data to tag"}, {"upgrade", CmdSmartUpgrade, AlwaysAvailable, "Upgrade sim module firmware"},