mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-12 08:16:09 -07:00
hf emv select
some refactoring
This commit is contained in:
parent
3668df05ec
commit
7d4ba60e8e
2 changed files with 5 additions and 2 deletions
|
@ -148,6 +148,10 @@ void CLIParserFree() {
|
||||||
|
|
||||||
// convertors
|
// convertors
|
||||||
int CLIParamHexToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int *datalen) {
|
int CLIParamHexToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int *datalen) {
|
||||||
|
*datalen = 0;
|
||||||
|
if (!strlen(argstr->sval[0]))
|
||||||
|
return 0;
|
||||||
|
|
||||||
switch(param_gethex_to_eol(argstr->sval[0], 0, data, maxdatalen, datalen)) {
|
switch(param_gethex_to_eol(argstr->sval[0], 0, data, maxdatalen, datalen)) {
|
||||||
case 1:
|
case 1:
|
||||||
printf("Parameter error: Invalid HEX value.\n");
|
printf("Parameter error: Invalid HEX value.\n");
|
||||||
|
|
|
@ -51,8 +51,7 @@ int CmdHFEMVSelect(const char *cmd) {
|
||||||
bool leaveSignalON = arg_get_lit(2);
|
bool leaveSignalON = arg_get_lit(2);
|
||||||
bool APDULogging = arg_get_lit(3);
|
bool APDULogging = arg_get_lit(3);
|
||||||
bool decodeTLV = arg_get_lit(4);
|
bool decodeTLV = arg_get_lit(4);
|
||||||
if (arg_get_str_len(5))
|
CLIGetStrBLessWithReturn(5, data, &datalen, 0);
|
||||||
CLIGetStrBLessWithReturn(5, data, &datalen, 0);
|
|
||||||
CLIParserFree();
|
CLIParserFree();
|
||||||
|
|
||||||
SetAPDULogging(APDULogging);
|
SetAPDULogging(APDULogging);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue