mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
style
This commit is contained in:
parent
41ff9191d6
commit
b446c36da6
1 changed files with 15 additions and 11 deletions
|
@ -282,19 +282,22 @@ check_script:
|
||||||
|
|
||||||
// read script file
|
// read script file
|
||||||
if (fgets(script_cmd_buf, sizeof(script_cmd_buf), current_cmdscriptfile()) == NULL) {
|
if (fgets(script_cmd_buf, sizeof(script_cmd_buf), current_cmdscriptfile()) == NULL) {
|
||||||
if (!pop_cmdscriptfile())
|
if (pop_cmdscriptfile() == false) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
goto check_script;
|
goto check_script;
|
||||||
} else {
|
|
||||||
prompt_ctx = PROXPROMPT_CTX_SCRIPTFILE;
|
|
||||||
// remove linebreaks
|
|
||||||
strcleanrn(script_cmd_buf, sizeof(script_cmd_buf));
|
|
||||||
|
|
||||||
cmd = str_dup(script_cmd_buf);
|
|
||||||
if (cmd != NULL)
|
|
||||||
printprompt = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prompt_ctx = PROXPROMPT_CTX_SCRIPTFILE;
|
||||||
|
|
||||||
|
// remove linebreaks
|
||||||
|
strcleanrn(script_cmd_buf, sizeof(script_cmd_buf));
|
||||||
|
|
||||||
|
cmd = str_dup(script_cmd_buf);
|
||||||
|
if (cmd != NULL) {
|
||||||
|
printprompt = true;
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// If there is a script command
|
// If there is a script command
|
||||||
if (execCommand) {
|
if (execCommand) {
|
||||||
|
@ -429,8 +432,9 @@ check_script:
|
||||||
msleep(100); // Make sure command is sent before killing client
|
msleep(100); // Make sure command is sent before killing client
|
||||||
}
|
}
|
||||||
|
|
||||||
while (current_cmdscriptfile())
|
while (current_cmdscriptfile()) {
|
||||||
pop_cmdscriptfile();
|
pop_cmdscriptfile();
|
||||||
|
}
|
||||||
|
|
||||||
pm3line_flush_history();
|
pm3line_flush_history();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue