From 3e26b564cdf790010504a80f0a0cfd9ac51f1e92 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 18 Mar 2019 17:42:49 +0100 Subject: [PATCH] nameing stuff --- client/cmdhf14a.c | 42 +++++++++++++++++++++--------------------- client/cmdhf14a.h | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/client/cmdhf14a.c b/client/cmdhf14a.c index 6dd7149f2..83e1673ef 100644 --- a/client/cmdhf14a.c +++ b/client/cmdhf14a.c @@ -1132,7 +1132,7 @@ int ExchangeAPDU14a(uint8_t *datain, int datainlen, bool activateField, bool lea } // ISO14443-4. 7. Half-duplex block transmission protocol -int CmdHF14AAPDU(const char *cmd) { +int CmdHF14AAPDU(const char *Cmd) { uint8_t data[USB_CMD_DATA_SIZE]; int datalen = 0; bool activateField = false; @@ -1151,7 +1151,7 @@ int CmdHF14AAPDU(const char *cmd) { arg_strx1(NULL, NULL, "", NULL), arg_param_end }; - CLIExecWithReturn(cmd, argtable, false); + CLIExecWithReturn(Cmd, argtable, false); activateField = arg_get_lit(1); leaveSignalON = arg_get_lit(2); @@ -1179,7 +1179,7 @@ int CmdHF14AAPDU(const char *cmd) { return 0; } -int CmdHF14ACmdRaw(const char *cmd) { +int CmdHF14ACmdRaw(const char *Cmd) { UsbCommand c = {CMD_READER_ISO_14443a, {0, 0, 0}}; bool reply = 1; bool crc = false; @@ -1197,15 +1197,15 @@ int CmdHF14ACmdRaw(const char *cmd) { uint16_t datalen = 0; uint32_t temp; - if (strlen(cmd) < 2) return usage_hf_14a_raw(); + if (strlen(Cmd) < 2) return usage_hf_14a_raw(); // strip - while (*cmd == ' ' || *cmd == '\t') cmd++; + while (*Cmd == ' ' || *Cmd == '\t') Cmd++; - while (cmd[i] != '\0') { - if (cmd[i] == ' ' || cmd[i] == '\t') { i++; continue; } - if (cmd[i] == '-') { - switch (cmd[i + 1]) { + while (Cmd[i] != '\0') { + if (Cmd[i] == ' ' || Cmd[i] == '\t') { i++; continue; } + if (Cmd[i] == '-') { + switch (Cmd[i + 1]) { case 'H': case 'h': return usage_hf_14a_raw(); @@ -1225,18 +1225,18 @@ int CmdHF14ACmdRaw(const char *cmd) { active_select = true; break; case 'b': - sscanf(cmd + i + 2, "%d", &temp); + sscanf(Cmd + i + 2, "%d", &temp); numbits = temp & 0xFFFF; i += 3; - while (cmd[i] != ' ' && cmd[i] != '\0') { i++; } + while (Cmd[i] != ' ' && Cmd[i] != '\0') { i++; } i -= 2; break; case 't': bTimeout = true; - sscanf(cmd + i + 2, "%d", &temp); + sscanf(Cmd + i + 2, "%d", &temp); timeout = temp; i += 3; - while (cmd[i] != ' ' && cmd[i] != '\0') { i++; } + while (Cmd[i] != ' ' && Cmd[i] != '\0') { i++; } i -= 2; break; case 'T': @@ -1251,11 +1251,11 @@ int CmdHF14ACmdRaw(const char *cmd) { i += 2; continue; } - if ((cmd[i] >= '0' && cmd[i] <= '9') || - (cmd[i] >= 'a' && cmd[i] <= 'f') || - (cmd[i] >= 'A' && cmd[i] <= 'F')) { + if ((Cmd[i] >= '0' && Cmd[i] <= '9') || + (Cmd[i] >= 'a' && Cmd[i] <= 'f') || + (Cmd[i] >= 'A' && Cmd[i] <= 'F')) { buf[strlen(buf) + 1] = 0; - buf[strlen(buf)] = cmd[i]; + buf[strlen(buf)] = Cmd[i]; i++; if (strlen(buf) >= 2) { @@ -1363,7 +1363,7 @@ static int waitCmd(uint8_t iSelect) { return 0; } -int CmdHF14AAntiFuzz(const char *cmd) { +int CmdHF14AAntiFuzz(const char *Cmd) { CLIParserInit("hf 14a antifuzz", "Tries to fuzz the ISO14443a anticollision phase", @@ -1377,7 +1377,7 @@ int CmdHF14AAntiFuzz(const char *cmd) { arg_lit0(NULL, "10", "10 byte uid"), arg_param_end }; - CLIExecWithReturn(cmd, argtable, false); + CLIExecWithReturn(Cmd, argtable, false); uint8_t arg0 = FLAG_4B_UID_IN_DATA; if (arg_get_lit(2)) @@ -1392,7 +1392,7 @@ int CmdHF14AAntiFuzz(const char *cmd) { return 0; } -int CmdHF14AChaining(const char *cmd) { +int CmdHF14AChaining(const char *Cmd) { CLIParserInit("hf 14a chaining", "Enable/Disable ISO14443a input chaining. Maximum input length goes from ATS.", @@ -1405,7 +1405,7 @@ int CmdHF14AChaining(const char *cmd) { arg_str0(NULL, NULL, "", NULL), arg_param_end }; - CLIExecWithReturn(cmd, argtable, true); + CLIExecWithReturn(Cmd, argtable, true); struct arg_str *str = arg_get_str(1); int len = arg_get_str_len(1); diff --git a/client/cmdhf14a.h b/client/cmdhf14a.h index 55b94bb08..6020b6f8b 100644 --- a/client/cmdhf14a.h +++ b/client/cmdhf14a.h @@ -47,7 +47,7 @@ extern int CmdHF14ASim(const char *Cmd); extern int CmdHF14ASniff(const char *Cmd); extern int CmdHF14ACmdRaw(const char *Cmd); extern int CmdHF14ACUIDs(const char *Cmd); -extern int CmdHF14AAntiFuzz(const char *cmd); +extern int CmdHF14AAntiFuzz(const char *Cmd); extern char *getTagInfo(uint8_t uid); extern int Hf14443_4aGetCardData(iso14a_card_select_t *card);