Use CmdTraceListAlias everywhere

This commit is contained in:
Philippe Teuwen
2021-04-19 21:43:32 +02:00
parent 2e925d5da3
commit dc54dd305b
18 changed files with 25 additions and 116 deletions

View File

@@ -826,13 +826,7 @@ static int CmdSmartSetClock(const char *Cmd) {
}
static int CmdSmartList(const char *Cmd) {
char args[128] = {0};
if (strlen(Cmd) == 0) {
snprintf(args, sizeof(args), "-t 7816");
} else {
strncpy(args, Cmd, sizeof(args) - 1);
}
return CmdTraceList(args);
return CmdTraceListAlias(Cmd, "smart", "7816");
}
static void smart_brute_prim(void) {
@@ -1104,7 +1098,7 @@ static int CmdSmartBruteforceSFI(const char *Cmd) {
static command_t CommandTable[] = {
{"help", CmdHelp, AlwaysAvailable, "This help"},
{"list", CmdSmartList, IfPm3Smartcard, "List ISO 7816 history"},
{"list", CmdSmartList, AlwaysAvailable, "List ISO 7816 history"},
{"info", CmdSmartInfo, IfPm3Smartcard, "Tag information"},
{"reader", CmdSmartReader, IfPm3Smartcard, "Act like an IS07816 reader"},
{"raw", CmdSmartRaw, IfPm3Smartcard, "Send raw hex data to tag"},