- uint32_t password = 0; //default to blank Block 7\r
-\r
- char cmdp = param_getchar(Cmd, 0);\r
- if (strlen(Cmd) > 1 || cmdp == 'h' || cmdp == 'H') return usage_t55xx_detect();\r
-\r
- bool usepwd = ( strlen(Cmd) > 0); \r
- if ( usepwd ){\r
- password = param_get32ex(Cmd, 0, 0, 16);\r
- // if (param_getchar(Cmd, 1) =='o' )\r
- // override = true;\r
+ while(param_getchar(Cmd, cmdp) != 0x00 && !errors) {\r
+ switch(param_getchar(Cmd, cmdp)) {\r
+ case 'h':\r
+ case 'H':\r
+ return usage_t55xx_detect();\r
+ case 'p':\r
+ case 'P':\r
+ password = param_get32ex(Cmd, cmdp+1, 0, 16);\r
+ usepwd = TRUE;\r
+ cmdp += 2;\r
+ break;\r
+ case '1':\r
+ // use Graphbuffer data\r
+ useGB = TRUE;\r
+ cmdp++;\r
+ break;\r
+ default:\r
+ PrintAndLog("Unknown parameter '%c'", param_getchar(Cmd, cmdp));\r
+ errors = true;\r
+ break;\r
+ }\r