mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
Merge branch 'master' of https://github.com/RfidResearchGroup/proxmark3
This commit is contained in:
commit
8341309754
1 changed files with 9 additions and 18 deletions
21
client/ui.c
21
client/ui.c
|
@ -146,40 +146,30 @@ void PrintAndLogEx(logLevel_t level, const char *fmt, ...) {
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case ERR:
|
case ERR:
|
||||||
if (session.emoji_mode == EMOJI)
|
if (session.emoji_mode == EMOJI)
|
||||||
strncpy(prefix, " :rotating_light: ", sizeof(prefix) - 1);
|
strncpy(prefix, _RED_("[!!]") " :rotating_light: ", sizeof(prefix) - 1);
|
||||||
else
|
else
|
||||||
strncpy(prefix, _RED_("[!!]"), sizeof(prefix) - 1);
|
strncpy(prefix, _RED_("[!!]"), sizeof(prefix) - 1);
|
||||||
stream = stderr;
|
stream = stderr;
|
||||||
break;
|
break;
|
||||||
case FAILED:
|
case FAILED:
|
||||||
if (session.emoji_mode == EMOJI)
|
if (session.emoji_mode == EMOJI)
|
||||||
strncpy(prefix, " :no_entry: ", sizeof(prefix) - 1);
|
strncpy(prefix, _RED_("[-]") " :no_entry: ", sizeof(prefix) - 1);
|
||||||
else
|
else
|
||||||
strncpy(prefix, _RED_("[-]"), sizeof(prefix) - 1);
|
strncpy(prefix, _RED_("[-]"), sizeof(prefix) - 1);
|
||||||
break;
|
break;
|
||||||
case DEBUG:
|
case DEBUG:
|
||||||
if (session.emoji_mode == EMOJI)
|
|
||||||
strncpy(prefix, " :speech_balloon: ", sizeof(prefix) - 1);
|
|
||||||
else
|
|
||||||
strncpy(prefix, _BLUE_("[#]"), sizeof(prefix) - 1);
|
strncpy(prefix, _BLUE_("[#]"), sizeof(prefix) - 1);
|
||||||
break;
|
|
||||||
case HINT:
|
case HINT:
|
||||||
case SUCCESS:
|
case SUCCESS:
|
||||||
if (session.emoji_mode == EMOJI)
|
|
||||||
strncpy(prefix, " :star: ", sizeof(prefix) - 1);
|
|
||||||
else
|
|
||||||
strncpy(prefix, _GREEN_("[+]"), sizeof(prefix) - 1);
|
strncpy(prefix, _GREEN_("[+]"), sizeof(prefix) - 1);
|
||||||
break;
|
break;
|
||||||
case WARNING:
|
case WARNING:
|
||||||
if (session.emoji_mode == EMOJI)
|
if (session.emoji_mode == EMOJI)
|
||||||
strncpy(prefix, " :warning: ", sizeof(prefix) - 1);
|
strncpy(prefix, _CYAN_("[!]") " :warning: ", sizeof(prefix) - 1);
|
||||||
else
|
else
|
||||||
strncpy(prefix, _CYAN_("[!]"), sizeof(prefix) - 1);
|
strncpy(prefix, _CYAN_("[!]"), sizeof(prefix) - 1);
|
||||||
break;
|
break;
|
||||||
case INFO:
|
case INFO:
|
||||||
if (session.emoji_mode == EMOJI)
|
|
||||||
strncpy(prefix, " :information_source: ", sizeof(prefix) - 1);
|
|
||||||
else
|
|
||||||
strncpy(prefix, _YELLOW_("[=]"), sizeof(prefix) - 1);
|
strncpy(prefix, _YELLOW_("[=]"), sizeof(prefix) - 1);
|
||||||
break;
|
break;
|
||||||
case INPLACE:
|
case INPLACE:
|
||||||
|
@ -331,10 +321,11 @@ static void fPrintAndLog(FILE *stream, const char *fmt, ...) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((g_printAndLog & PRINTANDLOG_LOG) && logging && logfile) {
|
if ((g_printAndLog & PRINTANDLOG_LOG) && logging && logfile) {
|
||||||
|
memcpy_filter_emoji(buffer3, buffer2, sizeof(buffer2), ALTTEXT);
|
||||||
if (filter_ansi) { // already done
|
if (filter_ansi) { // already done
|
||||||
fprintf(logfile, "%s\n", buffer2);
|
fprintf(logfile, "%s\n", buffer3);
|
||||||
} else {
|
} else {
|
||||||
memcpy_filter_ansi(buffer, buffer2, sizeof(buffer2), true);
|
memcpy_filter_ansi(buffer, buffer3, sizeof(buffer3), true);
|
||||||
fprintf(logfile, "%s\n", buffer);
|
fprintf(logfile, "%s\n", buffer);
|
||||||
}
|
}
|
||||||
fflush(logfile);
|
fflush(logfile);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue