Closed iceman1001 closed 5 years ago
It the same for me. I dont know why.
It might have to do with readline6. Readline7 might work. I'll check it out.
Is there an existing command that should have a colored output?
you can modify "showBanner" function in client/proxmark.c (for RRG or iceman based repo) It has colors
MinGW is a toolchain to compile on Windows natively with no POSIX emulation layer. That means if you want colored output, you need to do it the Windows way. Prior to Windows 10 there were no ansi sequences. The only way is:
SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_RED );
printf("Hello World!");
SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 0x0f);
The reason why there is colored output when you start Proxspace is that the MinGW packages are compiled with msys2 as POSIX emulation layer. Here is a pretty good summery MSYS2 Shell or MinGW-w64 Shell
There are some possibilities to enable colored output:
Does that setconsoletextattribute work? I tried a somewhat similar techneque with enableing vt escapes but it didn't work.
and yes, that did work, to answer my own question.
mingw is compiled with msys2 and proxmark3 client is compiled with mingw-toolchain (which doesn't have that ansi stuff).. It makes more sense now. However I have a hard time seeing the SetConsoleTextAttribute in a simple define macro way like on linux/apple.
I tried to compile the Proxmark client with msys2 to see what would happen. The problem is that every Makefile and .c/.h file that differentiate between mingw and linux/macOS need to be changed as msys does set other variables that mingw does. I might look into it again when I have more time available.
how about we drop this one?
One thing that has been on my mind is the strangeness with ansi colors in the mingw based proxspace environment. Since there is color when we start the mingw env but once we start the proxmark3 client the output stops being able to translate the escape sequences correct.
Does someone have a solution for this?