chg: colors

This commit is contained in:
iceman1001 2019-02-24 14:51:21 +01:00
commit cea5b5214d
4 changed files with 18 additions and 17 deletions

View file

@ -626,7 +626,7 @@ int CmdHFiClassELoad(const char *Cmd) {
f = fopen(filename, "rb"); f = fopen(filename, "rb");
if ( !f ){ if ( !f ){
PrintAndLogEx(FAILED, "File: %s: not found or locked.", filename); PrintAndLogEx(FAILED, "File: " _YELLOW_(%s) ": not found or locked.", filename);
return 1; return 1;
} }
@ -2304,7 +2304,7 @@ int LoadDictionaryKeyFile( char* filename, uint8_t **keys, int *keycnt) {
int keyitems = 0; int keyitems = 0;
if ( !(f = fopen( filename , "r")) ) { if ( !(f = fopen( filename , "r")) ) {
PrintAndLogEx(ERR, "file: %s: not found or locked.", filename); PrintAndLogEx(FAILED, "File: " _YELLOW_(%s) ": not found or locked.", filename);
return 1; return 1;
} }

View file

@ -691,7 +691,7 @@ bool tryDetectModulation(){
bool retval = false; bool retval = false;
if ( hits > 1) { if ( hits > 1) {
PrintAndLogEx(NORMAL, "Found [%d] possible matches for modulation.",hits); PrintAndLogEx(SUCCESS, "Found [%d] possible matches for modulation.", hits);
for(int i=0; i<hits; ++i){ for(int i=0; i<hits; ++i){
retval = testKnownConfigBlock(tests[i].block0); retval = testKnownConfigBlock(tests[i].block0);
if ( retval ) { if ( retval ) {
@ -942,9 +942,9 @@ int printConfiguration( t55xx_conf_block_t b){
PrintAndLogEx(NORMAL, "Chip Type : %s", (b.Q5) ? "T5555(Q5)" : "T55x7"); PrintAndLogEx(NORMAL, "Chip Type : %s", (b.Q5) ? "T5555(Q5)" : "T55x7");
PrintAndLogEx(NORMAL, "Modulation : %s", GetSelectedModulationStr(b.modulation) ); PrintAndLogEx(NORMAL, "Modulation : %s", GetSelectedModulationStr(b.modulation) );
PrintAndLogEx(NORMAL, "Bit Rate : %s", GetBitRateStr(b.bitrate, (b.block0 & T55x7_X_MODE && (b.block0>>28==6 || b.block0>>28==9))) ); PrintAndLogEx(NORMAL, "Bit Rate : %s", GetBitRateStr(b.bitrate, (b.block0 & T55x7_X_MODE && (b.block0>>28==6 || b.block0>>28==9))) );
PrintAndLogEx(NORMAL, "Inverted : %s", (b.inverted) ? "Yes" : "No" ); PrintAndLogEx(NORMAL, "Inverted : %s", (b.inverted) ? _GREEN_(Yes) : "No" );
PrintAndLogEx(NORMAL, "Offset : %d", b.offset); PrintAndLogEx(NORMAL, "Offset : %d", b.offset);
PrintAndLogEx(NORMAL, "Seq. Term. : %s", (b.ST) ? "Yes" : "No" ); PrintAndLogEx(NORMAL, "Seq. Term. : %s", (b.ST) ? _GREEN_(Yes) : "No" );
PrintAndLogEx(NORMAL, "Block0 : 0x%08X", b.block0); PrintAndLogEx(NORMAL, "Block0 : 0x%08X", b.block0);
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
return 0; return 0;
@ -1264,24 +1264,25 @@ int CmdT55xxInfo(const char *Cmd){
uint32_t inv = PackBits(si, 1, DemodBuffer); si += 1; uint32_t inv = PackBits(si, 1, DemodBuffer); si += 1;
uint32_t por = PackBits(si, 1, DemodBuffer); si += 1; uint32_t por = PackBits(si, 1, DemodBuffer); si += 1;
if (config.Q5) PrintAndLogEx(NORMAL, "*** Warning *** Config Info read off a Q5 will not display as expected"); if (config.Q5) PrintAndLogEx(NORMAL, _RED_(*** Warning ***) " Config Info read off a Q5 will not display as expected");
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(NORMAL, "-- T55x7 Configuration & Tag Information --------------------"); PrintAndLogEx(NORMAL, "-- T55x7 Configuration & Tag Information --------------------");
PrintAndLogEx(NORMAL, "-------------------------------------------------------------"); PrintAndLogEx(NORMAL, "-------------------------------------------------------------");
PrintAndLogEx(NORMAL, " Safer key : %s", GetSaferStr(safer)); PrintAndLogEx(NORMAL, " Safer key : %s", GetSaferStr(safer));
PrintAndLogEx(NORMAL, " reserved : %d", resv); PrintAndLogEx(NORMAL, " reserved : %d", resv);
PrintAndLogEx(NORMAL, " Data bit rate : %s", GetBitRateStr(dbr, extend)); PrintAndLogEx(NORMAL, " Data bit rate : %s", GetBitRateStr(dbr, extend));
PrintAndLogEx(NORMAL, " eXtended mode : %s", (extend) ? "Yes - Warning":"No"); PrintAndLogEx(NORMAL, " eXtended mode : %s", (extend) ? _YELLOW_("Yes - Warning") : "No");
PrintAndLogEx(NORMAL, " Modulation : %s", GetModulationStr(datamod)); PrintAndLogEx(NORMAL, " Modulation : %s", GetModulationStr(datamod));
PrintAndLogEx(NORMAL, " PSK clock frequency : %d", pskcf); PrintAndLogEx(NORMAL, " PSK clock frequency : %d", pskcf);
PrintAndLogEx(NORMAL, " AOR - Answer on Request : %s", (aor) ? "Yes":"No"); PrintAndLogEx(NORMAL, " AOR - Answer on Request : %s", (aor) ? _GREEN_(Yes) : "No");
PrintAndLogEx(NORMAL, " OTP - One Time Pad : %s", (otp) ? "Yes - Warning":"No" ); PrintAndLogEx(NORMAL, " OTP - One Time Pad : %s", (otp) ? _YELLOW_(Yes - Warning) : "No" );
PrintAndLogEx(NORMAL, " Max block : %d", maxblk); PrintAndLogEx(NORMAL, " Max block : %d", maxblk);
PrintAndLogEx(NORMAL, " Password mode : %s", (pwd) ? "Yes":"No"); PrintAndLogEx(NORMAL, " Password mode : %s", (pwd) ? _GREEN_(Yes) : "No");
PrintAndLogEx(NORMAL, " Sequence Start Terminator : %s", (sst) ? "Yes":"No"); PrintAndLogEx(NORMAL, " Sequence Start Terminator : %s", (sst) ? _GREEN_(Yes) : "No");
PrintAndLogEx(NORMAL, " Fast Write : %s", (fw) ? "Yes":"No"); PrintAndLogEx(NORMAL, " Fast Write : %s", (fw) ? _GREEN_(Yes) : "No");
PrintAndLogEx(NORMAL, " Inverse data : %s", (inv) ? "Yes":"No"); PrintAndLogEx(NORMAL, " Inverse data : %s", (inv) ? _GREEN_(Yes) : "No");
PrintAndLogEx(NORMAL, " POR-Delay : %s", (por) ? "Yes":"No"); PrintAndLogEx(NORMAL, " POR-Delay : %s", (por) ? _GREEN_(Yes) : "No");
PrintAndLogEx(NORMAL, "-------------------------------------------------------------"); PrintAndLogEx(NORMAL, "-------------------------------------------------------------");
PrintAndLogEx(NORMAL, " Raw Data - Page 0"); PrintAndLogEx(NORMAL, " Raw Data - Page 0");
PrintAndLogEx(NORMAL, " Block 0 : 0x%08X %s", block0, sprint_bin(DemodBuffer + config.offset, 32) ); PrintAndLogEx(NORMAL, " Block 0 : 0x%08X %s", block0, sprint_bin(DemodBuffer + config.offset, 32) );
@ -1581,7 +1582,7 @@ int CmdT55xxChkPwds(const char *Cmd) {
FILE * f = fopen( filename , "r"); FILE * f = fopen( filename , "r");
if ( !f ) { if ( !f ) {
PrintAndLogEx(WARNING, "File: %s: not found or locked.", filename); PrintAndLogEx(FAILED, "File: " _YELLOW_(%s) ": not found or locked.", filename);
free(keyBlock); free(keyBlock);
return 1; return 1;
} }

View file

@ -595,7 +595,7 @@ int CmdSmartUpgrade(const char *Cmd) {
// load file // load file
f = fopen(filename, "rb"); f = fopen(filename, "rb");
if ( !f ){ if ( !f ){
PrintAndLogEx(FAILED, "File: %s: not found or locked.", filename); PrintAndLogEx(FAILED, "File: " _YELLOW_(%s) ": not found or locked.", filename);
return 1; return 1;
} }