mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-24 07:05:40 -07:00
prompt: filter ansi before calling readline
This commit is contained in:
parent
8bdda55115
commit
1f5544330c
2 changed files with 5 additions and 1 deletions
|
@ -280,7 +280,9 @@ check_script:
|
|||
} else {
|
||||
prompt = PROXPROMPT_OFFLINE;
|
||||
}
|
||||
cmd = readline(prompt);
|
||||
char prompt_filtered[PROXPROMPT_MAX_SIZE] = {0};
|
||||
memcpy_filter_ansi(prompt_filtered, prompt, sizeof(prompt_filtered), !session.supports_colors);
|
||||
cmd = readline(prompt_filtered);
|
||||
fflush(NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#define PROXPROMPT_OFFLINE "[" _BOLD_RED_("offline") "] pm3 --> "
|
||||
|
||||
#define PROXPROMPT_MAX_SIZE sizeof(PROXPROMPT_OFFLINE)
|
||||
|
||||
#define PROXHISTORY "history.txt"
|
||||
#define PROXLOG "log_%Y%m%d.txt"
|
||||
#define MAX_NESTED_CMDSCRIPT 10
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue