Smart color handling:

* if on Windows, no color, as usual
* if on Linux, color only on real term
  * no color when > foo
  * no color in the logfile
This commit is contained in:
Philippe Teuwen 2019-04-30 00:41:52 +02:00
commit a91d0a7b19
10 changed files with 101 additions and 112 deletions

View file

@ -30,25 +30,25 @@
#include "usart.h"
static void showBanner(void) {
printf("\n\n");
PrintAndLogEx(NORMAL, "\n");
#if defined(__linux__) || (__APPLE__)
printf(_BLUE_("██████╗ ███╗ ███╗ ████╗ ") " ...iceman fork\n");
printf(_BLUE_("██╔══██╗████╗ ████║ ══█║") " ...dedicated to " _BLUE_("RDV40") "\n");
printf(_BLUE_("██████╔╝██╔████╔██║ ████╔╝") "\n");
printf(_BLUE_("██╔═══╝ ██║╚██╔╝██║ ══█║") " iceman@icesql.net\n");
printf(_BLUE_("██║ ██║ ╚═╝ ██║ ████╔╝") " https://github.com/rfidresearchgroup/proxmark3/\n");
printf(_BLUE_("╚═╝ ╚═╝ ╚═╝ ╚═══╝ ") "pre-release v4.0\n");
PrintAndLogEx(NORMAL, _BLUE_("██████╗ ███╗ ███╗ ████╗ ") " ...iceman fork");
PrintAndLogEx(NORMAL, _BLUE_("██╔══██╗████╗ ████║ ══█║") " ...dedicated to " _BLUE_("RDV40"));
PrintAndLogEx(NORMAL, _BLUE_("██████╔╝██╔████╔██║ ████╔╝"));
PrintAndLogEx(NORMAL, _BLUE_("██╔═══╝ ██║╚██╔╝██║ ══█║") " iceman@icesql.net");
PrintAndLogEx(NORMAL, _BLUE_("██║ ██║ ╚═╝ ██║ ████╔╝") " https://github.com/rfidresearchgroup/proxmark3/");
PrintAndLogEx(NORMAL, _BLUE_("╚═╝ ╚═╝ ╚═╝ ╚═══╝ ") "pre-release v4.0");
#else
printf("======. ===. ===. ====. ...iceman fork\n");
printf("==...==.====. ====. ..=. ...dedicated to RDV40\n");
printf("======..==.====.==. ====..\n");
printf("==..... ==..==..==. ..=. iceman@icesql.net\n");
printf("==. ==. ... ==. ====.. https://github.com/rfidresearchgroup/proxmark3/\n");
printf("... ... ... ..... pre-release v4.0\n");
PrintAndLogEx(NORMAL, "======. ===. ===. ====. ...iceman fork");
PrintAndLogEx(NORMAL, "==...==.====. ====. ..=. ...dedicated to RDV40");
PrintAndLogEx(NORMAL, "======..==.====.==. ====..");
PrintAndLogEx(NORMAL, "==..... ==..==..==. ..=. iceman@icesql.net");
PrintAndLogEx(NORMAL, "==. ==. ... ==. ====.. https://github.com/rfidresearchgroup/proxmark3/");
PrintAndLogEx(NORMAL, "... ... ... ..... pre-release v4.0");
#endif
printf("\nSupport iceman on patreon, https://www.patreon.com/iceman1001/");
PrintAndLogEx(NORMAL, "\nSupport iceman on patreon, https://www.patreon.com/iceman1001/");
// printf("\nMonero: 43mNJLpgBVaTvyZmX9ajcohpvVkaRy1kbZPm8tqAb7itZgfuYecgkRF36rXrKFUkwEGeZedPsASRxgv4HPBHvJwyJdyvQuP");
printf("\n\n\n");
PrintAndLogEx(NORMAL, "\n");
fflush(stdout);
}