]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/emv/cmdemv.c
modify argtable parser to parse ints with spaces (#683)
[proxmark3-svn] / client / emv / cmdemv.c
index 93635f858abe0c2759972db1cc7f88c3642c7eb1..544632ef261d57375d521910d4eb216e352b6e2b 100644 (file)
@@ -49,7 +49,7 @@ int CmdHFEMVSelect(const char *cmd) {
                arg_lit0("kK",  "keep",    "keep field for next command"),
                arg_lit0("aA",  "apdu",    "show APDU reqests and responses"),
                arg_lit0("tT",  "tlv",     "TLV decode results"),
-               arg_str0(NULL,  NULL,      "<HEX applet AID>", NULL),
+               arg_strx0(NULL,  NULL,     "<HEX applet AID>", NULL),
                arg_param_end
        };
        CLIExecWithReturn(cmd, argtable, true);
@@ -183,7 +183,7 @@ int CmdHFEMVGPO(const char *cmd) {
        CLIParserInit("hf emv gpo", 
                "Executes Get Processing Options command. It returns data in TLV format (0x77 - format2) or plain format (0x80 - format1).\nNeeds a EMV applet to be selected.", 
                "Usage:\n\thf emv gpo -k -> execute GPO\n"
-                       "\thf emv gpo -st 01020304 -> execute GPO with 4-byte PDOL data, show result in TLV\n"); 
+                       "\thf emv gpo -t 01020304 -> execute GPO with 4-byte PDOL data, show result in TLV\n"); 
                        // here need to add load params from file and gen pdol
 
        void* argtable[] = {
@@ -193,7 +193,7 @@ int CmdHFEMVGPO(const char *cmd) {
                arg_lit0("mM",  "make",    "make PDOLdata from PDOL (tag 9F38) and parameters (NOT WORK!!!)"),
                arg_lit0("aA",  "apdu",    "show APDU reqests and responses"),
                arg_lit0("tT",  "tlv",     "TLV decode results of selected applets"),
-               arg_str0(NULL,  NULL,      "<HEX PDOLdata/PDOL>", NULL),
+               arg_strx0(NULL,  NULL,     "<HEX PDOLdata/PDOL>", NULL),
                arg_param_end
        };
        CLIExecWithReturn(cmd, argtable, true);
@@ -215,7 +215,7 @@ int CmdHFEMVGPO(const char *cmd) {
        // calc PDOL
        struct tlv *pdol_data_tlv = NULL;
        struct tlv data_tlv = {
-               .tag = 0x01,
+               .tag = 0x83,
                .len = datalen,
                .value = (uint8_t *)data,
        };
@@ -281,7 +281,7 @@ int CmdHFEMVReadRecord(const char *cmd) {
                arg_lit0("kK",  "keep",    "keep field ON for next command"),
                arg_lit0("aA",  "apdu",    "show APDU reqests and responses"),
                arg_lit0("tT",  "tlv",     "TLV decode results of selected applets"),
-               arg_str1(NULL,  NULL,      "<SFI 1byte HEX><SFIrec 1byte HEX>", NULL),
+               arg_strx1(NULL,  NULL,     "<SFI 1byte HEX><SFIrec 1byte HEX>", NULL),
                arg_param_end
        };
        CLIExecWithReturn(cmd, argtable, true);
@@ -335,7 +335,7 @@ int CmdHFEMVAC(const char *cmd) {
                arg_str0("dD",  "decision", "<aac|tc|arqc>", "Terminal decision. aac - declined, tc - approved, arqc - online authorisation requested"),
                arg_lit0("aA",  "apdu",     "show APDU reqests and responses"),
                arg_lit0("tT",  "tlv",      "TLV decode results of selected applets"),
-               arg_str1(NULL,  NULL,       "<HEX CDOLdata>", NULL),
+               arg_strx1(NULL,  NULL,      "<HEX CDOLdata>", NULL),
                arg_param_end
        };
        CLIExecWithReturn(cmd, argtable, false);
@@ -457,7 +457,7 @@ int CmdHFEMVInternalAuthenticate(const char *cmd) {
                arg_lit0("kK",  "keep",    "keep field ON for next command"),
                arg_lit0("aA",  "apdu",    "show APDU reqests and responses"),
                arg_lit0("tT",  "tlv",     "TLV decode results of selected applets"),
-               arg_str1(NULL,  NULL,      "<HEX DDOLdata>", NULL),
+               arg_strx1(NULL,  NULL,     "<HEX DDOLdata>", NULL),
                arg_param_end
        };
        CLIExecWithReturn(cmd, argtable, false);
Impressum, Datenschutz