Add colour to hf 14a and hf mfu commands

This commit is contained in:
Daniel Underhay 2020-03-15 19:57:47 +11:00
commit 132bd6c1f7
5 changed files with 124 additions and 114 deletions

View file

@ -53,9 +53,10 @@ static int usage_hf_mfu_info(void) {
PrintAndLogEx(NORMAL, " l : (optional) swap entered key's endianness");
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, " hf mfu info");
PrintAndLogEx(NORMAL, " hf mfu info k 00112233445566778899AABBCCDDEEFF");
PrintAndLogEx(NORMAL, " hf mfu info k AABBCCDD");
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu info"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu info k 00112233445566778899AABBCCDDEEFF"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu info k AABBCCDD"));
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;
}
@ -73,10 +74,11 @@ static int usage_hf_mfu_dump(void) {
PrintAndLogEx(NORMAL, " q <qty> : number of Pages to manually set how many pages to dump");
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, " hf mfu dump");
PrintAndLogEx(NORMAL, " hf mfu dump f myfile");
PrintAndLogEx(NORMAL, " hf mfu dump k 00112233445566778899AABBCCDDEEFF");
PrintAndLogEx(NORMAL, " hf mfu dump k AABBCCDD\n");
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu dump"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu dump f myfile"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu dump k 00112233445566778899AABBCCDDEEFF"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu dump k AABBCCDD"));
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;
}
@ -92,9 +94,10 @@ static int usage_hf_mfu_restore(void) {
PrintAndLogEx(NORMAL, " f <fn> : " _YELLOW_("filename w .bin") "to restore");
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, " hf mfu restore s f myfile");
PrintAndLogEx(NORMAL, " hf mfu restore k AABBCCDD s f myfile\n");
PrintAndLogEx(NORMAL, " hf mfu restore k AABBCCDD s e r f myfile\n");
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu restore s f myfile"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu restore k AABBCCDD s f myfile"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu restore k AABBCCDD s e r f myfile"));
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;
}
@ -107,9 +110,10 @@ static int usage_hf_mfu_rdbl(void) {
PrintAndLogEx(NORMAL, " l : (optional) swap entered key's endianness");
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, " hf mfu rdbl b 0");
PrintAndLogEx(NORMAL, " hf mfu rdbl b 0 k 00112233445566778899AABBCCDDEEFF");
PrintAndLogEx(NORMAL, " hf mfu rdbl b 0 k AABBCCDD\n");
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu rdbl b 0"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu rdbl b 0 k 00112233445566778899AABBCCDDEEFF"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu rdbl b 0 k AABBCCDD"));
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;
}
@ -123,8 +127,9 @@ static int usage_hf_mfu_wrbl(void) {
PrintAndLogEx(NORMAL, " l : (optional) swap entered key's endianness");
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, " hf mfu wrbl b 0 d 01234567");
PrintAndLogEx(NORMAL, " hf mfu wrbl b 0 d 01234567 k AABBCCDD\n");
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu wrbl b 0 d 01234567"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu wrbl b 0 d 01234567 k AABBCCDD"));
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;
}
@ -138,8 +143,10 @@ static int usage_hf_mfu_eload(void) {
PrintAndLogEx(NORMAL, " [filename] : without `.eml` (required)");
PrintAndLogEx(NORMAL, " numblocks : number of blocks to load from eml file (optional)");
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(NORMAL, " sample: hf mfu eload u filename");
PrintAndLogEx(NORMAL, " hf mfu eload u filename 57");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu eload u filename"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu eload u filename 57"));
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;
}
@ -153,8 +160,9 @@ static int usage_hf_mfu_sim(void) {
PrintAndLogEx(NORMAL, " u <uid> : 4 or 7 byte UID (optional)");
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, " hf mfu sim t 7");
PrintAndLogEx(NORMAL, " hf mfu sim t 7 u 1122344556677\n");
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu sim t 7"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu sim t 7 u 1122344556677"));
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;
}
@ -168,8 +176,9 @@ static int usage_hf_mfu_ucauth(void) {
PrintAndLogEx(NORMAL, " 5 : all 0xff key");
PrintAndLogEx(NORMAL, " 6 : 0x00-0xFF key");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, " hf mfu cauth k");
PrintAndLogEx(NORMAL, " hf mfu cauth k 3");
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu cauth k"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu cauth k 3"));
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;
}
@ -179,7 +188,7 @@ static int usage_hf_mfu_ucsetpwd(void) {
PrintAndLogEx(NORMAL, " [password] - (32 hex symbols)");
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, " hf mfu setpwd 000102030405060708090a0b0c0d0e0f");
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu setpwd 000102030405060708090a0b0c0d0e0f"));
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;
}
@ -191,7 +200,7 @@ static int usage_hf_mfu_ucsetuid(void) {
PrintAndLogEx(NORMAL, "This only works for " _BLUE_("Magic Ultralight") "tags.");
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, " hf mfu setuid 11223344556677");
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu setuid 11223344556677"));
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;
}
@ -203,8 +212,8 @@ static int usage_hf_mfu_gendiverse(void) {
PrintAndLogEx(NORMAL, " r : read uid from tag");
PrintAndLogEx(NORMAL, " <uid> : 4 byte UID (optional)");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, " hf mfu gen r");
PrintAndLogEx(NORMAL, " hf mfu gen 11223344");
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu gen r"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu gen 11223344"));
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;
}
@ -217,9 +226,9 @@ static int usage_hf_mfu_pwdgen(void) {
PrintAndLogEx(NORMAL, " r : read uid from tag");
PrintAndLogEx(NORMAL, " <uid> : 7 byte UID (optional)");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, " hf mfu pwdgen r");
PrintAndLogEx(NORMAL, " hf mfu pwdgen 11223344556677");
PrintAndLogEx(NORMAL, " hf mfu pwdgen t");
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu pwdgen r"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu pwdgen 11223344556677"));
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu pwdgen t"));
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;
}
@ -230,7 +239,8 @@ static int usage_hf_mfu_otp_tearoff(void) {
PrintAndLogEx(NORMAL, "Options:");
PrintAndLogEx(NORMAL, " h : this help");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, " hf mfu otptear");
PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu otptear"));
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;
}
@ -529,43 +539,43 @@ static int ul_print_default(uint8_t *data) {
uid[5] = data[6];
uid[6] = data[7];
PrintAndLogEx(NORMAL, " UID : " _YELLOW_("%s"), sprint_hex(uid, 7));
PrintAndLogEx(NORMAL, " UID[0] : %02X, %s", uid[0], getTagInfo(uid[0]));
PrintAndLogEx(SUCCESS, " UID: " _GREEN_("%s"), sprint_hex(uid, 7));
PrintAndLogEx(SUCCESS, " UID[0]: %02X, %s", uid[0], getTagInfo(uid[0]));
if (uid[0] == 0x05 && ((uid[1] & 0xf0) >> 4) == 2) { // is infineon and 66RxxP
uint8_t chip = (data[8] & 0xC7); // 11000111 mask, bit 3,4,5 RFU
switch (chip) {
case 0xC2:
PrintAndLogEx(NORMAL, " IC type : SLE 66R04P 770 Bytes");
PrintAndLogEx(SUCCESS, " IC type: SLE 66R04P 770 Bytes");
break; //77 pages
case 0xC4:
PrintAndLogEx(NORMAL, " IC type : SLE 66R16P 2560 Bytes");
PrintAndLogEx(SUCCESS, " IC type: SLE 66R16P 2560 Bytes");
break; //256 pages
case 0xC6:
PrintAndLogEx(NORMAL, " IC type : SLE 66R32P 5120 Bytes");
PrintAndLogEx(SUCCESS, " IC type: SLE 66R32P 5120 Bytes");
break; //512 pages /2 sectors
}
}
// CT (cascade tag byte) 0x88 xor SN0 xor SN1 xor SN2
int crc0 = 0x88 ^ uid[0] ^ uid[1] ^ uid[2];
if (data[3] == crc0)
PrintAndLogEx(NORMAL, " BCC0 : %02X ( " _GREEN_("ok") ")", data[3]);
PrintAndLogEx(SUCCESS, " BCC0: %02X ( " _GREEN_("ok") ")", data[3]);
else
PrintAndLogEx(NORMAL, " BCC0 : %02X, crc should be %02X", data[3], crc0);
PrintAndLogEx(NORMAL, " BCC0: %02X, crc should be %02X", data[3], crc0);
int crc1 = uid[3] ^ uid[4] ^ uid[5] ^ uid[6];
if (data[8] == crc1)
PrintAndLogEx(NORMAL, " BCC1 : %02X ( " _GREEN_("ok") ")", data[8]);
PrintAndLogEx(SUCCESS, " BCC1: %02X ( " _GREEN_("ok") ")", data[8]);
else
PrintAndLogEx(NORMAL, " BCC1 : %02X, crc should be %02X", data[8], crc1);
PrintAndLogEx(NORMAL, " BCC1: %02X, crc should be %02X", data[8], crc1);
PrintAndLogEx(NORMAL, " Internal : %02X ( %s)", data[9], (data[9] == 0x48) ? _GREEN_("default") : _RED_("not default") );
PrintAndLogEx(SUCCESS, " Internal: %02X ( %s)", data[9], (data[9] == 0x48) ? _GREEN_("default") : _RED_("not default") );
PrintAndLogEx(NORMAL, " Lock : %s - %s",
PrintAndLogEx(SUCCESS, " Lock: %s - %s",
sprint_hex(data + 10, 2),
sprint_bin(data + 10, 2)
);
PrintAndLogEx(NORMAL, "OneTimePad : %s - %s\n",
PrintAndLogEx(SUCCESS, "OneTimePad : %s - %s\n",
sprint_hex(data + 12, 4),
sprint_bin(data + 12, 4)
);
@ -669,57 +679,57 @@ int ul_print_type(uint32_t tagtype, uint8_t spaces) {
char *spacer = spc + (10 - spaces);
if (tagtype & UL)
PrintAndLogEx(NORMAL, "%sTYPE : MIFARE Ultralight (MF0ICU1) %s", spacer, (tagtype & MAGIC) ? "<magic>" : "");
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("MIFARE Ultralight (MF0ICU1) %s"), spacer, (tagtype & MAGIC) ? "<magic>" : "");
else if (tagtype & UL_C)
PrintAndLogEx(NORMAL, "%sTYPE : MIFARE Ultralight C (MF0ULC) %s", spacer, (tagtype & MAGIC) ? "<magic>" : "");
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("MIFARE Ultralight C (MF0ULC) %s"), spacer, (tagtype & MAGIC) ? "<magic>" : "");
else if (tagtype & UL_NANO_40)
PrintAndLogEx(NORMAL, "%sTYPE : MIFARE Ultralight Nano 40bytes (MF0UNH00)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("MIFARE Ultralight Nano 40bytes (MF0UNH00)"), spacer);
else if (tagtype & UL_EV1_48)
PrintAndLogEx(NORMAL, "%sTYPE : MIFARE Ultralight EV1 48bytes (MF0UL1101)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("MIFARE Ultralight EV1 48bytes (MF0UL1101)"), spacer);
else if (tagtype & UL_EV1_128)
PrintAndLogEx(NORMAL, "%sTYPE : MIFARE Ultralight EV1 128bytes (MF0UL2101)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("MIFARE Ultralight EV1 128bytes (MF0UL2101)"), spacer);
else if (tagtype & UL_EV1)
PrintAndLogEx(NORMAL, "%sTYPE : MIFARE Ultralight EV1 UNKNOWN", spacer);
PrintAndLogEx(NORMAL, "%sTYPE: " _YELLOW_("MIFARE Ultralight EV1 UNKNOWN"), spacer);
else if (tagtype & NTAG)
PrintAndLogEx(NORMAL, "%sTYPE : NTAG UNKNOWN", spacer);
PrintAndLogEx(NORMAL, "%sTYPE: " _YELLOW_("NTAG UNKNOWN"), spacer);
else if (tagtype & NTAG_203)
PrintAndLogEx(NORMAL, "%sTYPE : NTAG 203 144bytes (NT2H0301F0DT)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("NTAG 203 144bytes (NT2H0301F0DT)"), spacer);
else if (tagtype & NTAG_210)
PrintAndLogEx(NORMAL, "%sTYPE : NTAG 210 48bytes (NT2L1011G0DU)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("NTAG 210 48bytes (NT2L1011G0DU)"), spacer);
else if (tagtype & NTAG_212)
PrintAndLogEx(NORMAL, "%sTYPE : NTAG 212 128bytes (NT2L1211G0DU)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("NTAG 212 128bytes (NT2L1211G0DU)"), spacer);
else if (tagtype & NTAG_213)
PrintAndLogEx(NORMAL, "%sTYPE : NTAG 213 144bytes (NT2H1311G0DU)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("NTAG 213 144bytes (NT2H1311G0DU)"), spacer);
else if (tagtype & NTAG_213_F)
PrintAndLogEx(NORMAL, "%sTYPE : NTAG 213F 144bytes (NT2H1311F0DTL)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("NTAG 213F 144bytes (NT2H1311F0DTL)"), spacer);
else if (tagtype & NTAG_215)
PrintAndLogEx(NORMAL, "%sTYPE : NTAG 215 504bytes (NT2H1511G0DU)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("NTAG 215 504bytes (NT2H1511G0DU)"), spacer);
else if (tagtype & NTAG_216)
PrintAndLogEx(NORMAL, "%sTYPE : NTAG 216 888bytes (NT2H1611G0DU)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("NTAG 216 888bytes (NT2H1611G0DU)"), spacer);
else if (tagtype & NTAG_216_F)
PrintAndLogEx(NORMAL, "%sTYPE : NTAG 216F 888bytes (NT2H1611F0DTL)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("NTAG 216F 888bytes (NT2H1611F0DTL)"), spacer);
else if (tagtype & NTAG_I2C_1K)
PrintAndLogEx(NORMAL, "%sTYPE : NTAG I2C 888bytes (NT3H1101FHK)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("NTAG I2C 888bytes (NT3H1101FHK)"), spacer);
else if (tagtype & NTAG_I2C_2K)
PrintAndLogEx(NORMAL, "%sTYPE : NTAG I2C 1904bytes (NT3H1201FHK)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("NTAG I2C 1904bytes (NT3H1201FHK)"), spacer);
else if (tagtype & NTAG_I2C_1K_PLUS)
PrintAndLogEx(NORMAL, "%sTYPE : NTAG I2C plus 888bytes (NT3H2111FHK)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("NTAG I2C plus 888bytes (NT3H2111FHK)"), spacer);
else if (tagtype & NTAG_I2C_2K_PLUS)
PrintAndLogEx(NORMAL, "%sTYPE : NTAG I2C plus 1912bytes (NT3H2211FHK)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("NTAG I2C plus 1912bytes (NT3H2211FHK)"), spacer);
else if (tagtype & MY_D)
PrintAndLogEx(NORMAL, "%sTYPE : INFINEON my-d\x99 (SLE 66RxxS)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("INFINEON my-d\x99 (SLE 66RxxS)"), spacer);
else if (tagtype & MY_D_NFC)
PrintAndLogEx(NORMAL, "%sTYPE : INFINEON my-d\x99 NFC (SLE 66RxxP)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("INFINEON my-d\x99 NFC (SLE 66RxxP)"), spacer);
else if (tagtype & MY_D_MOVE)
PrintAndLogEx(NORMAL, "%sTYPE : INFINEON my-d\x99 move (SLE 66R01P)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("INFINEON my-d\x99 move (SLE 66R01P)"), spacer);
else if (tagtype & MY_D_MOVE_NFC)
PrintAndLogEx(NORMAL, "%sTYPE : INFINEON my-d\x99 move NFC (SLE 66R01P)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("INFINEON my-d\x99 move NFC (SLE 66R01P)"), spacer);
else if (tagtype & MY_D_MOVE_LEAN)
PrintAndLogEx(NORMAL, "%sTYPE : INFINEON my-d\x99 move lean (SLE 66R01L)", spacer);
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("INFINEON my-d\x99 move lean (SLE 66R01L)"), spacer);
else if (tagtype & FUDAN_UL)
PrintAndLogEx(NORMAL, "%sTYPE : FUDAN Ultralight Compatible (or other compatible) %s", spacer, (tagtype & MAGIC) ? "<magic>" : "");
PrintAndLogEx(SUCCESS, "%sTYPE: " _GREEN_("FUDAN Ultralight Compatible (or other compatible) %s"), spacer, (tagtype & MAGIC) ? "<magic>" : "");
else
PrintAndLogEx(NORMAL, "%sTYPE : Unknown %06x", spacer, tagtype);
PrintAndLogEx(NORMAL, "%sTYPE: " _YELLOW_("Unknown %06x"), spacer, tagtype);
return PM3_SUCCESS;
}
@ -896,14 +906,14 @@ static int ulev1_print_signature(TagTypeUL_t tagtype, uint8_t *uid, uint8_t *sig
static int ulev1_print_version(uint8_t *data) {
PrintAndLogEx(NORMAL, "\n--- Tag Version");
PrintAndLogEx(NORMAL, " Raw bytes : %s", sprint_hex(data, 8));
PrintAndLogEx(NORMAL, " Vendor ID : %02X, %s", data[1], getTagInfo(data[1]));
PrintAndLogEx(NORMAL, " Product type : %s", getProductTypeStr(data[2]));
PrintAndLogEx(NORMAL, " Product subtype : %02X, %s", data[3], (data[3] == 1) ? "17 pF" : "50pF");
PrintAndLogEx(NORMAL, " Major version : %02X", data[4]);
PrintAndLogEx(NORMAL, " Minor version : %02X", data[5]);
PrintAndLogEx(NORMAL, " Size : %s", getUlev1CardSizeStr(data[6]));
PrintAndLogEx(NORMAL, " Protocol type : %02X %s", data[7], (data[7] == 0x3) ? "(ISO14443-3 Compliant)" : "");
PrintAndLogEx(NORMAL, " Raw bytes: %s", sprint_hex(data, 8));
PrintAndLogEx(NORMAL, " Vendor ID: %02X, %s", data[1], getTagInfo(data[1]));
PrintAndLogEx(NORMAL, " Product type: %s", getProductTypeStr(data[2]));
PrintAndLogEx(NORMAL, " Product subtype: %02X, %s", data[3], (data[3] == 1) ? "17 pF" : "50pF");
PrintAndLogEx(NORMAL, " Major version: %02X", data[4]);
PrintAndLogEx(NORMAL, " Minor version: %02X", data[5]);
PrintAndLogEx(NORMAL, " Size: %s", getUlev1CardSizeStr(data[6]));
PrintAndLogEx(NORMAL, " Protocol type: %02X %s", data[7], (data[7] == 0x3) ? "(ISO14443-3 Compliant)" : "");
return PM3_SUCCESS;
}
@ -1112,7 +1122,7 @@ static int CmdHF14AMfUInfo(const char *Cmd) {
cmdp++;
break;
default:
PrintAndLogEx(WARNING, "Unknown parameter '%c'", param_getchar(Cmd, cmdp));
PrintAndLogEx(WARNING, "Unknown parameter: " _RED_("'%c'"), param_getchar(Cmd, cmdp));
errors = true;
break;
}
@ -1273,7 +1283,8 @@ static int CmdHF14AMfUInfo(const char *Cmd) {
// 1-7 = limit. No automatic tries then.
// hasAuthKey, if we was called with key, skip test.
if (!authlim && !hasAuthKey) {
PrintAndLogEx(NORMAL, "\n--- Known EV1/NTAG passwords.");
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(SUCCESS, _GREEN_("--- Known EV1/NTAG passwords ---"));
// test pwd gen A
num_to_bytes(ul_ev1_pwdgenA(card.uid), 4, key);
len = ulev1_requestAuthentication(key, pack, sizeof(pack));
@ -1324,7 +1335,7 @@ static int CmdHF14AMfUInfo(const char *Cmd) {
if (ul_auth_select(&card, tagtype, hasAuthKey, authkeyptr, pack, sizeof(pack)) == PM3_ESOFT) return PM3_ESOFT;
}
}
if (len < 1) PrintAndLogEx(WARNING, "password not known");
if (len < 1) PrintAndLogEx(WARNING, _YELLOW_("password not known"));
}
}
out:
@ -1397,7 +1408,7 @@ static int CmdHF14AMfUWrBl(const char *Cmd) {
cmdp += 2;
break;
default:
PrintAndLogEx(WARNING, "Unknown parameter '%c'", param_getchar(Cmd, cmdp));
PrintAndLogEx(WARNING, "Unknown parameter: " _RED_("'%c'"), param_getchar(Cmd, cmdp));
errors = true;
break;
}
@ -1511,7 +1522,7 @@ static int CmdHF14AMfURdBl(const char *Cmd) {
cmdp++;
break;
default:
PrintAndLogEx(WARNING, "Unknown parameter '%c'", param_getchar(Cmd, cmdp));
PrintAndLogEx(WARNING, "Unknown parameter: " _RED_("'%c'"), param_getchar(Cmd, cmdp));
errors = true;
break;
}
@ -1781,7 +1792,7 @@ static int CmdHF14AMfUDump(const char *Cmd) {
manualPages = true;
break;
default:
PrintAndLogEx(WARNING, "Unknown parameter '%c'", param_getchar(Cmd, cmdp));
PrintAndLogEx(WARNING, "Unknown parameter: " _RED_("'%c'"), param_getchar(Cmd, cmdp));
errors = true;
break;
}
@ -2022,7 +2033,7 @@ static int CmdHF14AMfURestore(const char *Cmd) {
read_key = true;
break;
default:
PrintAndLogEx(WARNING, "Unknown parameter '%c'", param_getchar(Cmd, cmdp));
PrintAndLogEx(WARNING, "Unknown parameter: " _RED_("'%c'"), param_getchar(Cmd, cmdp));
errors = true;
break;
}
@ -2673,4 +2684,3 @@ int CmdHFMFUltra(const char *Cmd) {
clearCommandBuffer();
return CmdsParse(CommandTable, Cmd);
}