Add support for: proxmark3 -c "hw ping;hw version;hw ping"
This commit is contained in:
@@ -62,6 +62,9 @@ main_loop(char *script_cmds_file, char *script_cmd, bool pm3_present) {
|
||||
|
||||
char *cmd = NULL;
|
||||
bool execCommand = (script_cmd != NULL);
|
||||
uint16_t script_cmd_len = strlen(script_cmd);
|
||||
if (execCommand)
|
||||
strcreplace(script_cmd, script_cmd_len, ';', '\0');
|
||||
bool stdinOnPipe = !isatty(STDIN_FILENO);
|
||||
FILE *sf = NULL;
|
||||
char script_cmd_buf[256] = {0x00}; // iceman, needs lua script the same file_path_buffer as the rest
|
||||
@@ -134,11 +137,13 @@ main_loop(char *script_cmds_file, char *script_cmd, bool pm3_present) {
|
||||
} else {
|
||||
// If there is a script command
|
||||
if (execCommand) {
|
||||
|
||||
if ((cmd = strmcopy(script_cmd)) != NULL)
|
||||
PrintAndLogEx(NORMAL, PROXPROMPT"%s", cmd);
|
||||
|
||||
execCommand = false;
|
||||
uint16_t len = strlen(script_cmd) + 1;
|
||||
script_cmd += len;
|
||||
if (script_cmd_len == len - 1)
|
||||
execCommand = false;
|
||||
script_cmd_len -= len;
|
||||
} else {
|
||||
// exit after exec command
|
||||
if (script_cmd)
|
||||
|
||||
Reference in New Issue
Block a user