mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
nameing stuff
This commit is contained in:
parent
d54f4bd46f
commit
3e26b564cd
2 changed files with 22 additions and 22 deletions
|
@ -1132,7 +1132,7 @@ int ExchangeAPDU14a(uint8_t *datain, int datainlen, bool activateField, bool lea
|
||||||
}
|
}
|
||||||
|
|
||||||
// ISO14443-4. 7. Half-duplex block transmission protocol
|
// 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];
|
uint8_t data[USB_CMD_DATA_SIZE];
|
||||||
int datalen = 0;
|
int datalen = 0;
|
||||||
bool activateField = false;
|
bool activateField = false;
|
||||||
|
@ -1151,7 +1151,7 @@ int CmdHF14AAPDU(const char *cmd) {
|
||||||
arg_strx1(NULL, NULL, "<APDU (hex)>", NULL),
|
arg_strx1(NULL, NULL, "<APDU (hex)>", NULL),
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(cmd, argtable, false);
|
CLIExecWithReturn(Cmd, argtable, false);
|
||||||
|
|
||||||
activateField = arg_get_lit(1);
|
activateField = arg_get_lit(1);
|
||||||
leaveSignalON = arg_get_lit(2);
|
leaveSignalON = arg_get_lit(2);
|
||||||
|
@ -1179,7 +1179,7 @@ int CmdHF14AAPDU(const char *cmd) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdHF14ACmdRaw(const char *cmd) {
|
int CmdHF14ACmdRaw(const char *Cmd) {
|
||||||
UsbCommand c = {CMD_READER_ISO_14443a, {0, 0, 0}};
|
UsbCommand c = {CMD_READER_ISO_14443a, {0, 0, 0}};
|
||||||
bool reply = 1;
|
bool reply = 1;
|
||||||
bool crc = false;
|
bool crc = false;
|
||||||
|
@ -1197,15 +1197,15 @@ int CmdHF14ACmdRaw(const char *cmd) {
|
||||||
uint16_t datalen = 0;
|
uint16_t datalen = 0;
|
||||||
uint32_t temp;
|
uint32_t temp;
|
||||||
|
|
||||||
if (strlen(cmd) < 2) return usage_hf_14a_raw();
|
if (strlen(Cmd) < 2) return usage_hf_14a_raw();
|
||||||
|
|
||||||
// strip
|
// strip
|
||||||
while (*cmd == ' ' || *cmd == '\t') cmd++;
|
while (*Cmd == ' ' || *Cmd == '\t') Cmd++;
|
||||||
|
|
||||||
while (cmd[i] != '\0') {
|
while (Cmd[i] != '\0') {
|
||||||
if (cmd[i] == ' ' || cmd[i] == '\t') { i++; continue; }
|
if (Cmd[i] == ' ' || Cmd[i] == '\t') { i++; continue; }
|
||||||
if (cmd[i] == '-') {
|
if (Cmd[i] == '-') {
|
||||||
switch (cmd[i + 1]) {
|
switch (Cmd[i + 1]) {
|
||||||
case 'H':
|
case 'H':
|
||||||
case 'h':
|
case 'h':
|
||||||
return usage_hf_14a_raw();
|
return usage_hf_14a_raw();
|
||||||
|
@ -1225,18 +1225,18 @@ int CmdHF14ACmdRaw(const char *cmd) {
|
||||||
active_select = true;
|
active_select = true;
|
||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
sscanf(cmd + i + 2, "%d", &temp);
|
sscanf(Cmd + i + 2, "%d", &temp);
|
||||||
numbits = temp & 0xFFFF;
|
numbits = temp & 0xFFFF;
|
||||||
i += 3;
|
i += 3;
|
||||||
while (cmd[i] != ' ' && cmd[i] != '\0') { i++; }
|
while (Cmd[i] != ' ' && Cmd[i] != '\0') { i++; }
|
||||||
i -= 2;
|
i -= 2;
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
bTimeout = true;
|
bTimeout = true;
|
||||||
sscanf(cmd + i + 2, "%d", &temp);
|
sscanf(Cmd + i + 2, "%d", &temp);
|
||||||
timeout = temp;
|
timeout = temp;
|
||||||
i += 3;
|
i += 3;
|
||||||
while (cmd[i] != ' ' && cmd[i] != '\0') { i++; }
|
while (Cmd[i] != ' ' && Cmd[i] != '\0') { i++; }
|
||||||
i -= 2;
|
i -= 2;
|
||||||
break;
|
break;
|
||||||
case 'T':
|
case 'T':
|
||||||
|
@ -1251,11 +1251,11 @@ int CmdHF14ACmdRaw(const char *cmd) {
|
||||||
i += 2;
|
i += 2;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((cmd[i] >= '0' && cmd[i] <= '9') ||
|
if ((Cmd[i] >= '0' && Cmd[i] <= '9') ||
|
||||||
(cmd[i] >= 'a' && cmd[i] <= 'f') ||
|
(Cmd[i] >= 'a' && Cmd[i] <= 'f') ||
|
||||||
(cmd[i] >= 'A' && cmd[i] <= 'F')) {
|
(Cmd[i] >= 'A' && Cmd[i] <= 'F')) {
|
||||||
buf[strlen(buf) + 1] = 0;
|
buf[strlen(buf) + 1] = 0;
|
||||||
buf[strlen(buf)] = cmd[i];
|
buf[strlen(buf)] = Cmd[i];
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
if (strlen(buf) >= 2) {
|
if (strlen(buf) >= 2) {
|
||||||
|
@ -1363,7 +1363,7 @@ static int waitCmd(uint8_t iSelect) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdHF14AAntiFuzz(const char *cmd) {
|
int CmdHF14AAntiFuzz(const char *Cmd) {
|
||||||
|
|
||||||
CLIParserInit("hf 14a antifuzz",
|
CLIParserInit("hf 14a antifuzz",
|
||||||
"Tries to fuzz the ISO14443a anticollision phase",
|
"Tries to fuzz the ISO14443a anticollision phase",
|
||||||
|
@ -1377,7 +1377,7 @@ int CmdHF14AAntiFuzz(const char *cmd) {
|
||||||
arg_lit0(NULL, "10", "10 byte uid"),
|
arg_lit0(NULL, "10", "10 byte uid"),
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(cmd, argtable, false);
|
CLIExecWithReturn(Cmd, argtable, false);
|
||||||
|
|
||||||
uint8_t arg0 = FLAG_4B_UID_IN_DATA;
|
uint8_t arg0 = FLAG_4B_UID_IN_DATA;
|
||||||
if (arg_get_lit(2))
|
if (arg_get_lit(2))
|
||||||
|
@ -1392,7 +1392,7 @@ int CmdHF14AAntiFuzz(const char *cmd) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdHF14AChaining(const char *cmd) {
|
int CmdHF14AChaining(const char *Cmd) {
|
||||||
|
|
||||||
CLIParserInit("hf 14a chaining",
|
CLIParserInit("hf 14a chaining",
|
||||||
"Enable/Disable ISO14443a input chaining. Maximum input length goes from ATS.",
|
"Enable/Disable ISO14443a input chaining. Maximum input length goes from ATS.",
|
||||||
|
@ -1405,7 +1405,7 @@ int CmdHF14AChaining(const char *cmd) {
|
||||||
arg_str0(NULL, NULL, "<enable/disable or 0/1>", NULL),
|
arg_str0(NULL, NULL, "<enable/disable or 0/1>", NULL),
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(cmd, argtable, true);
|
CLIExecWithReturn(Cmd, argtable, true);
|
||||||
|
|
||||||
struct arg_str *str = arg_get_str(1);
|
struct arg_str *str = arg_get_str(1);
|
||||||
int len = arg_get_str_len(1);
|
int len = arg_get_str_len(1);
|
||||||
|
|
|
@ -47,7 +47,7 @@ extern int CmdHF14ASim(const char *Cmd);
|
||||||
extern int CmdHF14ASniff(const char *Cmd);
|
extern int CmdHF14ASniff(const char *Cmd);
|
||||||
extern int CmdHF14ACmdRaw(const char *Cmd);
|
extern int CmdHF14ACmdRaw(const char *Cmd);
|
||||||
extern int CmdHF14ACUIDs(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 char *getTagInfo(uint8_t uid);
|
||||||
extern int Hf14443_4aGetCardData(iso14a_card_select_t *card);
|
extern int Hf14443_4aGetCardData(iso14a_card_select_t *card);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue