unify hint text

This commit is contained in:
iceman1001 2025-03-20 22:55:26 +01:00
commit 4d603a4530
58 changed files with 222 additions and 213 deletions

View file

@ -927,7 +927,7 @@ static int CmdAnalyseDemodBuffer(const char *Cmd) {
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
g_DemodBufferLen = len; g_DemodBufferLen = len;
free(data); free(data);
PrintAndLogEx(HINT, "Use `" _YELLOW_("data print") "` to view DemodBuffer"); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("data print") "` to view DemodBuffer");
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -914,7 +914,7 @@ int AutoCorrelate(const int *in, int *out, size_t len, size_t window, bool SaveG
PrintAndLogEx(SUCCESS, "Possible correlation at "_YELLOW_("%4d") " samples", distance); PrintAndLogEx(SUCCESS, "Possible correlation at "_YELLOW_("%4d") " samples", distance);
} }
} else { } else {
PrintAndLogEx(HINT, "No repeating pattern found, try increasing window size"); PrintAndLogEx(HINT, "Hint: No repeating pattern found, try increasing window size");
// return value -1, indication to increase window size // return value -1, indication to increase window size
return -1; return -1;
} }
@ -953,7 +953,7 @@ static int CmdAutoCorr(const char *Cmd) {
if (g_GraphTraceLen == 0) { if (g_GraphTraceLen == 0) {
PrintAndLogEx(WARNING, "GraphBuffer is empty"); PrintAndLogEx(WARNING, "GraphBuffer is empty");
PrintAndLogEx(HINT, "Try `" _YELLOW_("lf read") "` to collect samples"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf read") "` to collect samples");
return PM3_ESOFT; return PM3_ESOFT;
} }

View file

@ -314,7 +314,7 @@ static int CmdFlashMemSpiFFSRename(const char *Cmd) {
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
} }
PrintAndLogEx(HINT, "Try `" _YELLOW_("mem spiffs tree") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("mem spiffs tree") "` to verify");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -363,7 +363,7 @@ static int CmdFlashMemSpiFFSCopy(const char *Cmd) {
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
} }
PrintAndLogEx(HINT, "Try `" _YELLOW_("mem spiffs tree") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("mem spiffs tree") "` to verify");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -428,7 +428,7 @@ static int CmdFlashMemSpiFFSDump(const char *Cmd) {
free(dump); free(dump);
return PM3_EMALLOC; return PM3_EMALLOC;
} }
PrintAndLogEx(HINT, "Use 'trace list -1 -t ...' to view, 'trace save -f ...' to save"); PrintAndLogEx(HINT, "Hint: Use 'trace list -1 -t ...' to view, 'trace save -f ...' to save");
} }
@ -480,7 +480,7 @@ static int CmdFlashMemSpiFFSWipe(const char *Cmd) {
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
} }
PrintAndLogEx(HINT, "Try `" _YELLOW_("mem spiffs tree") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("mem spiffs tree") "` to verify");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -528,7 +528,7 @@ static int CmdFlashMemSpiFFSUpload(const char *Cmd) {
if (res == PM3_SUCCESS) if (res == PM3_SUCCESS)
PrintAndLogEx(SUCCESS, "Wrote "_GREEN_("%zu") " bytes to file "_GREEN_("%s"), datalen, dest); PrintAndLogEx(SUCCESS, "Wrote "_GREEN_("%zu") " bytes to file "_GREEN_("%s"), datalen, dest);
PrintAndLogEx(HINT, "Try `" _YELLOW_("mem spiffs tree") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("mem spiffs tree") "` to verify");
return res; return res;
} }

View file

@ -240,47 +240,47 @@ int CmdHFSearch(const char *Cmd) {
// no need to print 14A hints, since it will print itself // no need to print 14A hints, since it will print itself
if (success[THINFILM]) { if (success[THINFILM]) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf thinfilm`") " commands\n"); PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf thinfilm") "` commands\n");
} }
if (success[LTO]) { if (success[LTO]) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf lto`") " commands\n"); PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf lto") "` commands\n");
} }
if (success[LEGIC]) { if (success[LEGIC]) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf legic`") " commands\n"); PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf legic") "` commands\n");
} }
if (success[TOPAZ]) { if (success[TOPAZ]) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf topaz`") " commands\n"); PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf topaz") "` commands\n");
} }
if (success[PROTO_TEXKOM]) { if (success[PROTO_TEXKOM]) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf texkom`") " commands\n"); PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf texkom") "` commands\n");
} }
if (success[PROTO_XEROX]) { if (success[PROTO_XEROX]) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf xerox`") " commands\n"); PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf xerox") "` commands\n");
} }
if (success[ISO_14443B]) { if (success[ISO_14443B]) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf 14b`") " commands\n"); PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf 14b") "` commands\n");
} }
if (success[ISO_15693]) { if (success[ISO_15693]) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf 15`") " commands\n"); PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf 15") "` commands\n");
} }
if (success[ICLASS]) { if (success[ICLASS]) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf iclass`") " commands\n"); PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf iclass") "` commands\n");
} }
if (success[FELICA]) { if (success[FELICA]) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf felica`") " commands\n"); PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf felica") "` commands\n");
} }
if (success[PROTO_CRYPTORF]) { if (success[PROTO_CRYPTORF]) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf cryptorf`") " commands\n"); PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf cryptorf") "` commands\n");
} }
} }
@ -498,9 +498,9 @@ int CmdHFSniff(const char *Cmd) {
PrintAndLogEx(INFO, "HF sniff (%u samples)", retval->len); PrintAndLogEx(INFO, "HF sniff (%u samples)", retval->len);
PrintAndLogEx(HINT, "Use `" _YELLOW_("data hpf") "` to remove offset"); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("data hpf") "` to remove offset");
PrintAndLogEx(HINT, "Use `" _YELLOW_("data plot") "` to view"); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("data plot") "` to view");
PrintAndLogEx(HINT, "Use `" _YELLOW_("data save") "` to save"); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("data save") "` to save");
// download bigbuf_malloc:d. // download bigbuf_malloc:d.
// it reserve memory from the higher end. // it reserve memory from the higher end.

View file

@ -987,8 +987,8 @@ int CmdHF14ASniff(const char *Cmd) {
PacketResponseNG resp; PacketResponseNG resp;
WaitForResponse(CMD_HF_ISO14443A_SNIFF, &resp); WaitForResponse(CMD_HF_ISO14443A_SNIFF, &resp);
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf 14a list")"` to view captured tracelog"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf 14a list")"` to view captured tracelog");
PrintAndLogEx(HINT, "Try `" _YELLOW_("trace save -h") "` to save tracelog for later analysing"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("trace save -h") "` to save tracelog for later analysing");
} }
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -2764,30 +2764,30 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
if (isMifareClassic || isMifareMini) { if (isMifareClassic || isMifareMini) {
if (((isMagic & MAGIC_FLAG_GEN_1A) == MAGIC_FLAG_GEN_1A) || ((isMagic & MAGIC_FLAG_GEN_1B) == MAGIC_FLAG_GEN_1B)) { if (((isMagic & MAGIC_FLAG_GEN_1A) == MAGIC_FLAG_GEN_1A) || ((isMagic & MAGIC_FLAG_GEN_1B) == MAGIC_FLAG_GEN_1B)) {
PrintAndLogEx(HINT, "Hint: use `" _YELLOW_("hf mf c*") "` magic commands"); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("hf mf c*") "` magic commands");
// if GEN4 GDM in Gen1a more, hint about it // if GEN4 GDM in Gen1a more, hint about it
if (((isMagic & MAGIC_FLAG_GDM_WUP_40) == MAGIC_FLAG_GDM_WUP_40) || ((isMagic & MAGIC_FLAG_GDM_WUP_40_ZUID) == MAGIC_FLAG_GDM_WUP_40_ZUID)) { if (((isMagic & MAGIC_FLAG_GDM_WUP_40) == MAGIC_FLAG_GDM_WUP_40) || ((isMagic & MAGIC_FLAG_GDM_WUP_40_ZUID) == MAGIC_FLAG_GDM_WUP_40_ZUID)) {
PrintAndLogEx(HINT, "Hint: use `" _YELLOW_("hf mf gdm* --gen1a") "` magic commands"); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("hf mf gdm* --gen1a") "` magic commands");
} }
} }
if ((isMagic & MAGIC_FLAG_GEN_3) == MAGIC_FLAG_GEN_3) { if ((isMagic & MAGIC_FLAG_GEN_3) == MAGIC_FLAG_GEN_3) {
PrintAndLogEx(HINT, "Hint: use `" _YELLOW_("hf mf gen3*") "` magic commands"); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("hf mf gen3*") "` magic commands");
} }
if ((isMagic & MAGIC_FLAG_GEN_4GTU) == MAGIC_FLAG_GEN_4GTU) { if ((isMagic & MAGIC_FLAG_GEN_4GTU) == MAGIC_FLAG_GEN_4GTU) {
PrintAndLogEx(HINT, "Hint: use `" _YELLOW_("hf mf g*") "` magic commands"); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("hf mf g*") "` magic commands");
} }
if ((isMagic & MAGIC_FLAG_GDM_AUTH) == MAGIC_FLAG_GDM_AUTH) { if ((isMagic & MAGIC_FLAG_GDM_AUTH) == MAGIC_FLAG_GDM_AUTH) {
PrintAndLogEx(HINT, "Hint: use `" _YELLOW_("hf mf gdm*") "` magic commands"); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("hf mf gdm*") "` magic commands");
} }
if ((isMagic & MAGIC_FLAG_GEN_2) == MAGIC_FLAG_GEN_2) { if ((isMagic & MAGIC_FLAG_GEN_2) == MAGIC_FLAG_GEN_2) {
PrintAndLogEx(HINT, "Hint: use `" _YELLOW_("hf mf") "` commands"); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("hf mf") "` commands");
} else { } else {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf mf info`")); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mf info`"));
} }
} }
@ -2834,11 +2834,11 @@ int infoHF14A4Applications(bool verbose) {
} }
if (found >= ARRAYLEN(hintAIDList) - 1) { if (found >= ARRAYLEN(hintAIDList) - 1) {
PrintAndLogEx(HINT, "Hint: card answers to all AID. It maybe the latest revision of plus/desfire/ultralight card."); PrintAndLogEx(HINT, "Hint: Card answers to all AID. It maybe the latest revision of plus/desfire/ultralight card.");
} else { } else {
for (int i = 0; i < ARRAYLEN(hintAIDList); i++) { for (int i = 0; i < ARRAYLEN(hintAIDList); i++) {
if (cardFound[i] && strlen(hintAIDList[i].hint)) if (cardFound[i] && strlen(hintAIDList[i].hint))
PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("%s") "` commands", hintAIDList[i].hint); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("%s") "` commands", hintAIDList[i].hint);
} }
} }
} }
@ -3286,10 +3286,10 @@ int CmdHF14ANdefRead(const char *Cmd) {
pm3_save_dump(filename, ndef_file, ndef_size, jsfNDEF); pm3_save_dump(filename, ndef_file, ndef_size, jsfNDEF);
if (verbose == false) { if (verbose == false) {
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf 14a ndefread -v`") " for more details"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf 14a ndefread -v`") " for more details");
} else { } else {
if (verbose2 == false) { if (verbose2 == false) {
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf 14a ndefread -vv`") " for more details"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf 14a ndefread -vv`") " for more details");
} }
} }
@ -3890,8 +3890,8 @@ int CmdHF14AAIDSim(const char *Cmd) {
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
PrintAndLogEx(HINT, "Try `" _YELLOW_("trace list -t 14a")"` to view captured tracelog"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("trace list -t 14a")"` to view captured tracelog");
PrintAndLogEx(HINT, "Try `" _YELLOW_("trace save -h") "` to save tracelog for later analysing"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("trace save -h") "` to save tracelog for later analysing");
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -925,8 +925,8 @@ static int CmdHF14BSniff(const char *Cmd) {
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_HF_ISO14443B_SNIFF, NULL, 0); SendCommandNG(CMD_HF_ISO14443B_SNIFF, NULL, 0);
WaitForResponse(CMD_HF_ISO14443B_SNIFF, &resp); WaitForResponse(CMD_HF_ISO14443B_SNIFF, &resp);
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf 14b list") "` to view captured tracelog"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf 14b list") "` to view captured tracelog");
PrintAndLogEx(HINT, "Try `" _YELLOW_("trace save -h") "` to save tracelog for later analysing"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("trace save -h") "` to save tracelog for later analysing");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -2969,7 +2969,7 @@ static int CmdHF14BSetUID(const char *Cmd) {
if (memcmp(card->uid, uid, uidlen) == 0) { if (memcmp(card->uid, uid, uidlen) == 0) {
PrintAndLogEx(SUCCESS, "Setting new UID ( " _GREEN_("ok") " )"); PrintAndLogEx(SUCCESS, "Setting new UID ( " _GREEN_("ok") " )");
PrintAndLogEx(HINT, "try `" _YELLOW_("hf 14b reader") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf 14b reader") "` to verify");
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS;; return PM3_SUCCESS;;
} }

View file

@ -534,7 +534,7 @@ static int CmdHF15Demod(const char *Cmd) {
if (g_GraphTraceLen < 1000) { if (g_GraphTraceLen < 1000) {
PrintAndLogEx(FAILED, "Too few samples in GraphBuffer"); PrintAndLogEx(FAILED, "Too few samples in GraphBuffer");
PrintAndLogEx(HINT, "Run " _YELLOW_("`hf 15 samples`") " to collect and download data"); PrintAndLogEx(HINT, "Hint: Run `" _YELLOW_("hf 15 samples") "` to collect and download data");
return PM3_ESOFT; return PM3_ESOFT;
} }
@ -659,7 +659,7 @@ static int CmdHF15Samples(const char *Cmd) {
getSamples(0, true); getSamples(0, true);
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf 15 demod") "` to decode signal"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf 15 demod") "` to decode signal");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -1148,8 +1148,8 @@ static int CmdHF15Sniff(const char *Cmd) {
WaitForResponse(CMD_HF_ISO15693_SNIFF, &resp); WaitForResponse(CMD_HF_ISO15693_SNIFF, &resp);
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf 15 list") "` to view captured tracelog"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf 15 list") "` to view captured tracelog");
PrintAndLogEx(HINT, "Try `" _YELLOW_("trace save -h") "` to save tracelog for later analysing"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("trace save -h") "` to save tracelog for later analysing");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -1293,7 +1293,7 @@ static int CmdHF15ELoad(const char *Cmd) {
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(SUCCESS, "uploaded " _YELLOW_("%zu") " bytes to emulator memory", offset); PrintAndLogEx(SUCCESS, "uploaded " _YELLOW_("%zu") " bytes to emulator memory", offset);
PrintAndLogEx(HINT, "You are ready to simulate. See " _YELLOW_("`hf 15 sim -h`")); PrintAndLogEx(HINT, "Hint: You are ready to simulate. See `" _YELLOW_("hf 15 sim -h") "`");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -2778,7 +2778,7 @@ static int CmdHF15Restore(const char *Cmd) {
DropField(); DropField();
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(HINT, "try `" _YELLOW_("hf 15 dump --ns") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf 15 dump --ns") "` to verify");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -96,8 +96,8 @@ static int CmdHFCryptoRFSniff(const char *Cmd) {
PacketResponseNG resp; PacketResponseNG resp;
WaitForResponse(CMD_HF_ISO14443B_SNIFF, &resp); WaitForResponse(CMD_HF_ISO14443B_SNIFF, &resp);
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf cryptorf list") "` to view captured tracelog"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf cryptorf list") "` to view captured tracelog");
PrintAndLogEx(HINT, "Try `" _YELLOW_("trace save -f hf_cryptorf_mytrace") "` to save tracelog for later analysing"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("trace save -f hf_cryptorf_mytrace") "` to save tracelog for later analysing");
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -1077,7 +1077,7 @@ static bool emrtd_do_auth(char *documentnumber, char *dob, char *expiry, bool BA
// If BAC isn't available, exit out and warn user. // If BAC isn't available, exit out and warn user.
if (BAC_available == false) { if (BAC_available == false) {
PrintAndLogEx(ERR, "This eMRTD enforces authentication, but you didn't supply MRZ data. Cannot proceed."); PrintAndLogEx(ERR, "This eMRTD enforces authentication, but you didn't supply MRZ data. Cannot proceed.");
PrintAndLogEx(HINT, "Check out `hf emrtd info/dump --h`, supply data with `-n` `-d` and `-e`"); PrintAndLogEx(HINT, "Hint: Check out `" _YELLOW_("hf emrtd info/dump --h") "`, supply data with `-n` `-d` and `-e`");
return false; return false;
} }
@ -1105,7 +1105,7 @@ int dumpHF_EMRTD(char *documentnumber, char *dob, char *expiry, bool BAC_availab
// Dump EF_CardAccess (if available) // Dump EF_CardAccess (if available)
if (emrtd_dump_file(ks_enc, ks_mac, ssc, dg_table[EF_CardAccess].fileid, dg_table[EF_CardAccess].filename, BAC, path) == false) { if (emrtd_dump_file(ks_enc, ks_mac, ssc, dg_table[EF_CardAccess].fileid, dg_table[EF_CardAccess].filename, BAC, path) == false) {
PrintAndLogEx(INFO, "Couldn't dump EF_CardAccess, card does not support PACE"); PrintAndLogEx(INFO, "Couldn't dump EF_CardAccess, card does not support PACE");
PrintAndLogEx(HINT, "This is expected behavior for cards without PACE, and isn't something to be worried about"); PrintAndLogEx(HINT, "Hint: This is expected behavior for cards without PACE and isn't something to be worried about");
} }
// Authenticate with the eMRTD // Authenticate with the eMRTD
@ -1389,7 +1389,7 @@ static void emrtd_print_unknown_timestamp_5f85(uint8_t *data, size_t datalen) {
); );
PrintAndLogEx(SUCCESS, "Unknown timestamp 5F85... " _YELLOW_("%s"), final_date); PrintAndLogEx(SUCCESS, "Unknown timestamp 5F85... " _YELLOW_("%s"), final_date);
PrintAndLogEx(HINT, "This is very likely the personalization timestamp, but it is using an undocumented tag."); PrintAndLogEx(HINT, "Hint: This is very likely the personalization timestamp but it is using an undocumented tag.");
} }
static int emrtd_print_ef_com_info(uint8_t *data, size_t datalen) { static int emrtd_print_ef_com_info(uint8_t *data, size_t datalen) {
@ -1999,7 +1999,7 @@ int infoHF_EMRTD(char *documentnumber, char *dob, char *expiry, bool BAC_availab
// Read EF_CardAccess // Read EF_CardAccess
if (emrtd_select_and_read(response, &resplen, dg_table[EF_CardAccess].fileid, ks_enc, ks_mac, ssc, BAC) == false) { if (emrtd_select_and_read(response, &resplen, dg_table[EF_CardAccess].fileid, ks_enc, ks_mac, ssc, BAC) == false) {
PACE_available = false; PACE_available = false;
PrintAndLogEx(HINT, "The error above this is normal. It just means that your eMRTD lacks PACE."); PrintAndLogEx(HINT, "Hint: The error above this is normal. It just means that your eMRTD lacks PACE.");
} }
// Select and authenticate with the eMRTD // Select and authenticate with the eMRTD
@ -2140,7 +2140,7 @@ int infoHF_EMRTD_offline(const char *path) {
emrtd_print_ef_cardaccess_info(data, datalen); emrtd_print_ef_cardaccess_info(data, datalen);
free(data); free(data);
} else { } else {
PrintAndLogEx(HINT, "The error above this is normal. It just means that your eMRTD lacks PACE"); PrintAndLogEx(HINT, "Hint: The error above this is normal. It just means that your eMRTD lacks PACE");
} }
strcpy(filepath, path); strcpy(filepath, path);
@ -2261,7 +2261,7 @@ static int CmdHFeMRTDDump(const char *Cmd) {
} else { } else {
if (!validate_date(dob, slen)) { if (!validate_date(dob, slen)) {
PrintAndLogEx(ERR, "Date of birth date format is incorrect, cannot continue."); PrintAndLogEx(ERR, "Date of birth date format is incorrect, cannot continue.");
PrintAndLogEx(HINT, "Use the format YYMMDD."); PrintAndLogEx(HINT, "Hint: Use the format YYMMDD.");
error = true; error = true;
} }
} }
@ -2271,7 +2271,7 @@ static int CmdHFeMRTDDump(const char *Cmd) {
} else { } else {
if (!validate_date(expiry, slen)) { if (!validate_date(expiry, slen)) {
PrintAndLogEx(ERR, "Expiry date format is incorrect, cannot continue."); PrintAndLogEx(ERR, "Expiry date format is incorrect, cannot continue.");
PrintAndLogEx(HINT, "Use the format YYMMDD."); PrintAndLogEx(HINT, "Hint: Use the format YYMMDD.");
error = true; error = true;
} }
} }
@ -2289,12 +2289,12 @@ static int CmdHFeMRTDDump(const char *Cmd) {
// TODO check MRZ checksums? // TODO check MRZ checksums?
if (!validate_date(dob, 6)) { if (!validate_date(dob, 6)) {
PrintAndLogEx(ERR, "Date of birth date format is incorrect, cannot continue."); PrintAndLogEx(ERR, "Date of birth date format is incorrect, cannot continue.");
PrintAndLogEx(HINT, "Use the format YYMMDD."); PrintAndLogEx(HINT, "Hint: Use the format YYMMDD.");
error = true; error = true;
} }
if (!validate_date(expiry, 6)) { if (!validate_date(expiry, 6)) {
PrintAndLogEx(ERR, "Expiry date format is incorrect, cannot continue."); PrintAndLogEx(ERR, "Expiry date format is incorrect, cannot continue.");
PrintAndLogEx(HINT, "Use the format YYMMDD."); PrintAndLogEx(HINT, "Hint: Use the format YYMMDD.");
error = true; error = true;
} }
} }
@ -2368,7 +2368,7 @@ static int CmdHFeMRTDInfo(const char *Cmd) {
} else { } else {
if (!validate_date(dob, slen)) { if (!validate_date(dob, slen)) {
PrintAndLogEx(ERR, "Date of birth date format is incorrect, cannot continue."); PrintAndLogEx(ERR, "Date of birth date format is incorrect, cannot continue.");
PrintAndLogEx(HINT, "Use the format YYMMDD."); PrintAndLogEx(HINT, "Hint: Use the format YYMMDD.");
error = true; error = true;
} }
} }
@ -2378,7 +2378,7 @@ static int CmdHFeMRTDInfo(const char *Cmd) {
} else { } else {
if (!validate_date(expiry, slen)) { if (!validate_date(expiry, slen)) {
PrintAndLogEx(ERR, "Expiry date format is incorrect, cannot continue."); PrintAndLogEx(ERR, "Expiry date format is incorrect, cannot continue.");
PrintAndLogEx(HINT, "Use the format YYMMDD."); PrintAndLogEx(HINT, "Hint: Use the format YYMMDD.");
error = true; error = true;
} }
} }
@ -2396,12 +2396,12 @@ static int CmdHFeMRTDInfo(const char *Cmd) {
// TODO check MRZ checksums? // TODO check MRZ checksums?
if (!validate_date(dob, 6)) { if (!validate_date(dob, 6)) {
PrintAndLogEx(ERR, "Date of birth date format is incorrect, cannot continue."); PrintAndLogEx(ERR, "Date of birth date format is incorrect, cannot continue.");
PrintAndLogEx(HINT, "Use the format YYMMDD."); PrintAndLogEx(HINT, "Hint: Use the format YYMMDD.");
error = true; error = true;
} }
if (!validate_date(expiry, 6)) { if (!validate_date(expiry, 6)) {
PrintAndLogEx(ERR, "Expiry date format is incorrect, cannot continue."); PrintAndLogEx(ERR, "Expiry date format is incorrect, cannot continue.");
PrintAndLogEx(HINT, "Use the format YYMMDD."); PrintAndLogEx(HINT, "Hint: Use the format YYMMDD.");
error = true; error = true;
} }
} }

View file

@ -1816,7 +1816,7 @@ static int CmdHFFelicaSniff(const char *Cmd) {
} }
} }
PrintAndLogEx(HINT, "try `" _YELLOW_("hf felica list") "` to view"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf felica list") "` to view");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -411,7 +411,7 @@ static int CmdHFFudanWrBl(const char *Cmd) {
uint8_t isok = resp.oldarg[0] & 0xff; uint8_t isok = resp.oldarg[0] & 0xff;
if (isok) { if (isok) {
PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )"); PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )");
PrintAndLogEx(HINT, "try `" _YELLOW_("hf fudan rdbl") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf fudan rdbl") "` to verify");
} else { } else {
PrintAndLogEx(FAILED, "Write ( " _RED_("fail") " )"); PrintAndLogEx(FAILED, "Write ( " _RED_("fail") " )");
} }

View file

@ -1089,7 +1089,7 @@ static int CmdGallagherClone(const char *cmd) {
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf gallagher reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf gallagher reader") "` to verify");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -1170,7 +1170,7 @@ static int CmdGallagherDelete(const char *cmd) {
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf gallagher reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf gallagher reader") "` to verify");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -1245,7 +1245,7 @@ static int CmdGallagherDiversify(const char *cmd) {
PrintAndLogEx(SUCCESS, "Successfully diversified key: " _GREEN_("%s"), key_str); PrintAndLogEx(SUCCESS, "Successfully diversified key: " _GREEN_("%s"), key_str);
if (IfPm3Iso14443()) { if (IfPm3Iso14443()) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf mfdes auth --aid %06X --keyno %d --algo AES --key %s`") " to verify", PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mfdes auth --aid %06X --keyno %d --algo AES --key %s") "` to verify",
aid, aid,
key_num, key_num,
key_str key_str

View file

@ -563,8 +563,8 @@ static int generate_config_card(const iclass_config_card_item_t *o, uint8_t *ke
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(SUCCESS, "sent " _YELLOW_("%u") " bytes of data to device emulator memory", bytes_sent); PrintAndLogEx(SUCCESS, "sent " _YELLOW_("%u") " bytes of data to device emulator memory", bytes_sent);
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass eview") "` to view dump file"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf iclass eview") "` to view dump file");
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass sim -t 3") "` to start simulating config card"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf iclass sim -t 3") "` to start simulating config card");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -825,10 +825,10 @@ static int CmdHFiClassSniff(const char *Cmd) {
WaitForResponse(CMD_HF_ICLASS_SNIFF, &resp); WaitForResponse(CMD_HF_ICLASS_SNIFF, &resp);
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass list") "` to view captured tracelog"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf iclass list") "` to view captured tracelog");
PrintAndLogEx(HINT, "Try `" _YELLOW_("trace save -f hf_iclass_mytrace") "` to save tracelog for later analysing"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("trace save -f hf_iclass_mytrace") "` to save tracelog for later analysing");
if (jam_epurse_update) { if (jam_epurse_update) {
PrintAndLogEx(HINT, "Verify if the jam worked by comparing value in trace and block 2"); PrintAndLogEx(HINT, "Hint: Verify if the jam worked by comparing value in trace and block 2");
} }
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS; return PM3_SUCCESS;
@ -955,7 +955,7 @@ static int CmdHFiClassSim(const char *Cmd) {
saveFile("iclass_mac_attack", ".bin", dump, datalen); saveFile("iclass_mac_attack", ".bin", dump, datalen);
free(dump); free(dump);
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass loclass -f iclass_mac_attack.bin") "` to recover elite key"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf iclass loclass -f iclass_mac_attack.bin") "` to recover elite key");
break; break;
} }
case ICLASS_SIM_MODE_READER_ATTACK_KEYROLL: { case ICLASS_SIM_MODE_READER_ATTACK_KEYROLL: {
@ -1019,8 +1019,8 @@ static int CmdHFiClassSim(const char *Cmd) {
saveFile("iclass_mac_attack_keyroll_B", ".bin", dump, datalen); saveFile("iclass_mac_attack_keyroll_B", ".bin", dump, datalen);
free(dump); free(dump);
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass loclass -f iclass_mac_attack_keyroll_A.bin") "` to recover elite key"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf iclass loclass -f iclass_mac_attack_keyroll_A.bin") "` to recover elite key");
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass loclass -f iclass_mac_attack_keyroll_B.bin") "` to recover elite key"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf iclass loclass -f iclass_mac_attack_keyroll_B.bin") "` to recover elite key");
break; break;
} }
case ICLASS_SIM_MODE_CSN: case ICLASS_SIM_MODE_CSN:
@ -1034,7 +1034,7 @@ static int CmdHFiClassSim(const char *Cmd) {
SendCommandMIX(CMD_HF_ICLASS_SIMULATE, sim_type, numberOfCSNs, 1, csn, 8); SendCommandMIX(CMD_HF_ICLASS_SIMULATE, sim_type, numberOfCSNs, 1, csn, 8);
if (sim_type == ICLASS_SIM_MODE_FULL) if (sim_type == ICLASS_SIM_MODE_FULL)
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass esave -h") "` to save the emulator memory to file"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf iclass esave -h") "` to save the emulator memory to file");
break; break;
} }
} }
@ -1227,7 +1227,7 @@ static int CmdHFiClassELoad(const char *Cmd) {
iclass_upload_emul(dump, bytes_read, 0, &bytes_sent); iclass_upload_emul(dump, bytes_read, 0, &bytes_sent);
free(dump); free(dump);
PrintAndLogEx(SUCCESS, "uploaded " _YELLOW_("%d") " bytes to emulator memory", bytes_sent); PrintAndLogEx(SUCCESS, "uploaded " _YELLOW_("%d") " bytes to emulator memory", bytes_sent);
PrintAndLogEx(HINT, "You are ready to simulate. See " _YELLOW_("`hf iclass sim -h`")); PrintAndLogEx(HINT, "Hint: You are ready to simulate. See `" _YELLOW_("hf iclass sim -h") "`");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -1284,7 +1284,7 @@ static int CmdHFiClassESave(const char *Cmd) {
pm3_save_dump(filename, dump, bytes, jsfIclass); pm3_save_dump(filename, dump, bytes, jsfIclass);
free(dump); free(dump);
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass view -f") "` to view dump file"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf iclass view -f") "` to view dump file");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -2242,8 +2242,8 @@ write_dump:
pm3_save_dump(filename, tag_data, bytes_got, jsfIclass); pm3_save_dump(filename, tag_data, bytes_got, jsfIclass);
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass decrypt -f") "` to decrypt dump file"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf iclass decrypt -f") "` to decrypt dump file");
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass view -f") "` to view dump file"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf iclass view -f") "` to view dump file");
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -2688,7 +2688,7 @@ static int CmdHFiClassRestore(const char *Cmd) {
if (resp.status == PM3_SUCCESS) { if (resp.status == PM3_SUCCESS) {
PrintAndLogEx(SUCCESS, "iCLASS restore " _GREEN_("successful")); PrintAndLogEx(SUCCESS, "iCLASS restore " _GREEN_("successful"));
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass rdbl") "` to verify data on card"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf iclass rdbl") "` to verify data on card");
} else { } else {
PrintAndLogEx(WARNING, "iCLASS restore " _RED_("failed")); PrintAndLogEx(WARNING, "iCLASS restore " _RED_("failed"));
} }
@ -3847,7 +3847,7 @@ static void add_key(uint8_t *key) {
if (i == ICLASS_KEYS_MAX) { if (i == ICLASS_KEYS_MAX) {
PrintAndLogEx(INFO, "Couldn't find an empty keyslot"); PrintAndLogEx(INFO, "Couldn't find an empty keyslot");
} else { } else {
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass managekeys -p") "` to view keys"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf iclass managekeys -p") "` to view keys");
} }
} }
@ -5248,7 +5248,7 @@ static int CmdHFiClassEncode(const char *Cmd) {
uint16_t byte_sent = 0; uint16_t byte_sent = 0;
iclass_upload_emul(credential, sizeof(credential), 6 * PICOPASS_BLOCK_SIZE, &byte_sent); iclass_upload_emul(credential, sizeof(credential), 6 * PICOPASS_BLOCK_SIZE, &byte_sent);
PrintAndLogEx(SUCCESS, "uploaded " _YELLOW_("%d") " bytes to emulator memory", byte_sent); PrintAndLogEx(SUCCESS, "uploaded " _YELLOW_("%d") " bytes to emulator memory", byte_sent);
PrintAndLogEx(HINT, "You are now ready to simulate. See " _YELLOW_("`hf iclass sim -h`")); PrintAndLogEx(HINT, "Hint: You are now ready to simulate. See `" _YELLOW_("hf iclass sim -h") "`");
} else { } else {
for (uint8_t i = 0; i < 4; i++) { for (uint8_t i = 0; i < 4; i++) {
isok = iclass_write_block(6 + i, credential + (i * 8), NULL, key, use_credit_key, elite, rawkey, false, false, auth, shallow_mod); isok = iclass_write_block(6 + i, credential + (i * 8), NULL, key, use_credit_key, elite, rawkey, false, false, auth, shallow_mod);

View file

@ -591,7 +591,7 @@ static int CmdHF14AJookiSim(const char *Cmd) {
break; break;
} }
free(data); free(data);
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf 14a list") "` to view trace log"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf 14a list") "` to view trace log");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -669,7 +669,7 @@ static int CmdHF14AJookiClone(const char *Cmd) {
i++; i++;
} }
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf mfu ndefread") "` to view"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mfu ndefread") "` to view");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -569,7 +569,7 @@ static int CmdLegicSim(const char *Cmd) {
} }
} }
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf legic list") "` to view trace log"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf legic list") "` to view trace log");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -936,7 +936,7 @@ static int CmdLegicDump(const char *Cmd) {
// 0x00 ^ MCC = MCC. Finding the end of used data is not part of this function. // 0x00 ^ MCC = MCC. Finding the end of used data is not part of this function.
if (legic_xor(data, dumplen) == false) { if (legic_xor(data, dumplen) == false) {
PrintAndLogEx(FAILED, "Deobsfuscate failed, exiting..."); PrintAndLogEx(FAILED, "Deobsfuscate failed, exiting...");
PrintAndLogEx(HINT, "Try running command without `--de` parameter"); PrintAndLogEx(HINT, "Hint: Try running command without `--de` parameter");
free(data); free(data);
return PM3_EFAILED; return PM3_EFAILED;
} }
@ -1004,7 +1004,7 @@ static int CmdLegicRestore(const char *Cmd) {
if (shall_obsfuscate) { if (shall_obsfuscate) {
if (legic_xor(dump, card.cardsize) == false) { if (legic_xor(dump, card.cardsize) == false) {
PrintAndLogEx(FAILED, "Obsfuscate failed, exiting..."); PrintAndLogEx(FAILED, "Obsfuscate failed, exiting...");
PrintAndLogEx(HINT, "Try running command without `--ob` parameter"); PrintAndLogEx(HINT, "Hint: Try running command without `--ob` parameter");
free(dump); free(dump);
return PM3_EFAILED; return PM3_EFAILED;
} }
@ -1109,7 +1109,7 @@ static int CmdLegicELoad(const char *Cmd) {
free(dump); free(dump);
PrintAndLogEx(HINT, "You are ready to simulate. See " _YELLOW_("`hf legic sim -h`")); PrintAndLogEx(HINT, "Hint: You are ready to simulate. See `" _YELLOW_("hf legic sim -h") "`");
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -682,7 +682,7 @@ static int CmdHfLTOWriteBlock(const char *Cmd) {
int res = wrblLTO(blk, block_data, true); int res = wrblLTO(blk, block_data, true);
if (res == PM3_SUCCESS) if (res == PM3_SUCCESS)
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf lto rdbl") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf lto rdbl") "` to verify");
return res; return res;
} }

View file

@ -356,7 +356,7 @@ static void mf_print_blocks(uint16_t n, uint8_t *d, bool verbose) {
// MAD detection // MAD detection
if (HasMADKey(d)) { if (HasMADKey(d)) {
PrintAndLogEx(HINT, "MAD key detected. Try " _YELLOW_("`hf mf mad`") " for more details"); PrintAndLogEx(HINT, "Hint: MAD key detected. Try " _YELLOW_("`hf mf mad`") " for more details");
} }
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
} }
@ -1017,13 +1017,13 @@ static int CmdHF14AMfWrBl(const char *Cmd) {
int status = resp.oldarg[0]; int status = resp.oldarg[0];
if (status > 0) { if (status > 0) {
PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )"); PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )");
PrintAndLogEx(HINT, "try `" _YELLOW_("hf mf rdbl") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mf rdbl") "` to verify");
} else if (status == PM3_ETEAROFF) { } else if (status == PM3_ETEAROFF) {
return status; return status;
} else { } else {
PrintAndLogEx(FAILED, "Write ( " _RED_("fail") " )"); PrintAndLogEx(FAILED, "Write ( " _RED_("fail") " )");
// suggest the opposite keytype than what was used. // suggest the opposite keytype than what was used.
PrintAndLogEx(HINT, "Maybe access rights? Try specify keytype `" _YELLOW_("hf mf wrbl -%c ...") "` instead", (keytype == MF_KEY_A) ? 'b' : 'a'); PrintAndLogEx(HINT, "Hint: Maybe access rights? Try specify keytype `" _YELLOW_("hf mf wrbl -%c ...") "` instead", (keytype == MF_KEY_A) ? 'b' : 'a');
} }
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -1611,7 +1611,7 @@ out:
free(keyB); free(keyB);
PrintAndLogEx(INFO, "-----+-------------------------------------------------+----------------"); PrintAndLogEx(INFO, "-----+-------------------------------------------------+----------------");
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(HINT, "try `" _YELLOW_("hf mf dump --ns") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mf dump --ns") "` to verify");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -2408,7 +2408,7 @@ static int CmdHF14AMfNestedHard(const char *Cmd) {
// check if tag doesn't have static nonce // check if tag doesn't have static nonce
if (detect_classic_static_nonce() == NONCE_STATIC) { if (detect_classic_static_nonce() == NONCE_STATIC) {
PrintAndLogEx(WARNING, "Static nonce detected. Quitting..."); PrintAndLogEx(WARNING, "Static nonce detected. Quitting...");
PrintAndLogEx(HINT, "\tTry use `" _YELLOW_("hf mf staticnested") "`"); PrintAndLogEx(HINT, "Hint: Try use `" _YELLOW_("hf mf staticnested") "`");
return PM3_EOPABORTED; return PM3_EOPABORTED;
} }
@ -2923,7 +2923,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
noValidKeyFound: noValidKeyFound:
PrintAndLogEx(FAILED, "No usable key was found!"); PrintAndLogEx(FAILED, "No usable key was found!");
PrintAndLogEx(HINT, "try `" _YELLOW_("hf mf autopwn -f mfc_default_keys")"` i.e. the Randy special"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mf autopwn -f mfc_default_keys")"` i.e. the Randy special");
free(keyBlock); free(keyBlock);
free(e_sector); free(e_sector);
free(fptr); free(fptr);
@ -4470,11 +4470,11 @@ void printKeyTableEx(size_t sectorscnt, sector_t *e_sector, uint8_t start_sector
// MAD detection // MAD detection
if (e_sector[MF_MAD1_SECTOR].foundKey[0] && e_sector[MF_MAD1_SECTOR].Key[0] == 0xA0A1A2A3A4A5) { if (e_sector[MF_MAD1_SECTOR].foundKey[0] && e_sector[MF_MAD1_SECTOR].Key[0] == 0xA0A1A2A3A4A5) {
PrintAndLogEx(HINT, "MAD key detected. Try " _YELLOW_("`hf mf mad`") " for more details"); PrintAndLogEx(HINT, "Hint: MAD key detected. Try " _YELLOW_("`hf mf mad`") " for more details");
} }
// NDEF detection // NDEF detection
if (has_ndef_key) { if (has_ndef_key) {
PrintAndLogEx(HINT, "NDEF key detected. Try " _YELLOW_("`hf mf ndefread`") " for more details"); PrintAndLogEx(HINT, "Hint: NDEF key detected. Try " _YELLOW_("`hf mf ndefread`") " for more details");
} }
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
} }
@ -4795,14 +4795,14 @@ int CmdHF14AMfELoad(const char *Cmd) {
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
if (block_width == MFU_BLOCK_SIZE) { if (block_width == MFU_BLOCK_SIZE) {
PrintAndLogEx(HINT, "You are ready to simulate. See " _YELLOW_("`hf mfu sim -h`")); PrintAndLogEx(HINT, "Hint: You are ready to simulate. See `" _YELLOW_("hf mfu sim -h`") "`");
// MFU / NTAG // MFU / NTAG
if ((cnt != block_cnt)) { if ((cnt != block_cnt)) {
PrintAndLogEx(WARNING, "Warning, Ultralight/Ntag file content, Loaded %d blocks of expected %d blocks into emulator memory", cnt, block_cnt); PrintAndLogEx(WARNING, "Warning, Ultralight/Ntag file content, Loaded %d blocks of expected %d blocks into emulator memory", cnt, block_cnt);
return PM3_SUCCESS; return PM3_SUCCESS;
} }
} else { } else {
PrintAndLogEx(HINT, "You are ready to simulate. See " _YELLOW_("`hf mf sim -h`")); PrintAndLogEx(HINT, "Hint: You are ready to simulate. See `" _YELLOW_("hf mf sim -h") "`");
// MFC // MFC
if ((cnt != block_cnt)) { if ((cnt != block_cnt)) {
PrintAndLogEx(WARNING, "Error, file content, Only loaded %d blocks, must be %d blocks into emulator memory", cnt, block_cnt); PrintAndLogEx(WARNING, "Error, file content, Only loaded %d blocks, must be %d blocks into emulator memory", cnt, block_cnt);
@ -5515,7 +5515,7 @@ static int CmdHF14AMfCLoad(const char *Cmd) {
if (mf_chinese_set_block(blockno, data + (MFBLOCK_SIZE * blockno), NULL, flags)) { if (mf_chinese_set_block(blockno, data + (MFBLOCK_SIZE * blockno), NULL, flags)) {
PrintAndLogEx(WARNING, "Can't set magic card block: %d", blockno); PrintAndLogEx(WARNING, "Can't set magic card block: %d", blockno);
PrintAndLogEx(HINT, "Verify that it is a GDM and not USCUID derivative"); PrintAndLogEx(HINT, "Hint: Verify that it is a GDM and not USCUID derivative");
free(data); free(data);
return PM3_ESOFT; return PM3_ESOFT;
} }
@ -5761,7 +5761,7 @@ static int CmdHF14AMfCSave(const char *Cmd) {
if (mf_chinese_get_block(i, dump + (i * MFBLOCK_SIZE), flags)) { if (mf_chinese_get_block(i, dump + (i * MFBLOCK_SIZE), flags)) {
PrintAndLogEx(WARNING, "Can't get magic card block: %d", i); PrintAndLogEx(WARNING, "Can't get magic card block: %d", i);
PrintAndLogEx(HINT, "Verify your card size, and try again or try another tag position"); PrintAndLogEx(HINT, "Hint: Verify your card size and try again or try another tag position");
free(dump); free(dump);
return PM3_ESOFT; return PM3_ESOFT;
} }
@ -5910,7 +5910,7 @@ static int CmdHF14AMfCView(const char *Cmd) {
if (mf_chinese_get_block(i, dump + (i * MFBLOCK_SIZE), flags)) { if (mf_chinese_get_block(i, dump + (i * MFBLOCK_SIZE), flags)) {
PrintAndLogEx(WARNING, "Can't get magic card block: " _YELLOW_("%u"), i); PrintAndLogEx(WARNING, "Can't get magic card block: " _YELLOW_("%u"), i);
PrintAndLogEx(HINT, "Verify your card size, and try again or try another tag position"); PrintAndLogEx(HINT, "Hint: Verify your card size and try again or try another tag position");
free(dump); free(dump);
return PM3_ESOFT; return PM3_ESOFT;
} }
@ -6554,7 +6554,7 @@ int CmdHFMFNDEFRead(const char *Cmd) {
if (mf_read_sector(MF_MAD1_SECTOR, MF_KEY_A, g_mifare_mad_key, sector0)) { if (mf_read_sector(MF_MAD1_SECTOR, MF_KEY_A, g_mifare_mad_key, sector0)) {
PrintAndLogEx(ERR, "error, read sector 0. card doesn't have MAD or doesn't have MAD on default keys"); PrintAndLogEx(ERR, "error, read sector 0. card doesn't have MAD or doesn't have MAD on default keys");
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mf ndefread -k `") " with your custom key"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mf ndefread -k `") " with your custom key");
return PM3_ESOFT; return PM3_ESOFT;
} }
@ -6630,10 +6630,10 @@ int CmdHFMFNDEFRead(const char *Cmd) {
} }
if (verbose == false) { if (verbose == false) {
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mf ndefread -v`") " for more details"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mf ndefread -v`") " for more details");
} else { } else {
if (verbose2 == false) { if (verbose2 == false) {
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mf ndefread -vv`") " for more details"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mf ndefread -vv`") " for more details");
} }
} }
return PM3_SUCCESS; return PM3_SUCCESS;
@ -6919,7 +6919,7 @@ int CmdHFMFNDEFWrite(const char *Cmd) {
int res = mf_check_keys(0, MF_KEY_A, true, 1, (uint8_t *)g_mifare_mad_key, &key64); int res = mf_check_keys(0, MF_KEY_A, true, 1, (uint8_t *)g_mifare_mad_key, &key64);
if (res != PM3_SUCCESS) { if (res != PM3_SUCCESS) {
PrintAndLogEx(FAILED, "Sector 0 failed to authenticate with MAD default key"); PrintAndLogEx(FAILED, "Sector 0 failed to authenticate with MAD default key");
PrintAndLogEx(HINT, "Verify that the tag NDEF formatted"); PrintAndLogEx(HINT, "Hint: Verify that the tag NDEF formatted");
return res; return res;
} }
@ -6993,7 +6993,7 @@ int CmdHFMFNDEFWrite(const char *Cmd) {
uint8_t sector0[MFBLOCK_SIZE * 4] = {0}; uint8_t sector0[MFBLOCK_SIZE * 4] = {0};
if (mf_read_sector(MF_MAD1_SECTOR, MF_KEY_A, g_mifare_mad_key, sector0)) { if (mf_read_sector(MF_MAD1_SECTOR, MF_KEY_A, g_mifare_mad_key, sector0)) {
PrintAndLogEx(ERR, "error, reading sector 0. Card doesn't have MAD or doesn't have MAD on default keys"); PrintAndLogEx(ERR, "error, reading sector 0. Card doesn't have MAD or doesn't have MAD on default keys");
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mf ndefread -k `") " with your custom key"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mf ndefread -k `") " with your custom key");
return PM3_ESOFT; return PM3_ESOFT;
} }
@ -7002,7 +7002,7 @@ int CmdHFMFNDEFWrite(const char *Cmd) {
if (m4) { if (m4) {
if (mf_read_sector(MF_MAD2_SECTOR, MF_KEY_A, g_mifare_mad_key, sector10)) { if (mf_read_sector(MF_MAD2_SECTOR, MF_KEY_A, g_mifare_mad_key, sector10)) {
PrintAndLogEx(ERR, "error, reading sector 10. Card doesn't have MAD or doesn't have MAD on default keys"); PrintAndLogEx(ERR, "error, reading sector 10. Card doesn't have MAD or doesn't have MAD on default keys");
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mf ndefread -k `") " with your custom key"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mf ndefread -k `") " with your custom key");
return PM3_ESOFT; return PM3_ESOFT;
} }
} }
@ -7224,7 +7224,7 @@ static int CmdHf14AGen3UID(const char *Cmd) {
int res = mf_chinese_gen_3_uid(uid, uidlen, old_uid); int res = mf_chinese_gen_3_uid(uid, uidlen, old_uid);
if (res != PM3_SUCCESS) { if (res != PM3_SUCCESS) {
PrintAndLogEx(ERR, "Can't set UID"); PrintAndLogEx(ERR, "Can't set UID");
PrintAndLogEx(HINT, "Are you sure your card is a Gen3 ?"); PrintAndLogEx(HINT, "Hint: Are you sure your card is a Gen3?");
return PM3_ESOFT; return PM3_ESOFT;
} }
@ -8427,7 +8427,7 @@ static int CmdHF14AGen4Load(const char *cmd) {
int res = mfG4SetBlock(pwd, blockno, data + (blockno * MFBLOCK_SIZE), flags); int res = mfG4SetBlock(pwd, blockno, data + (blockno * MFBLOCK_SIZE), flags);
if (res != PM3_SUCCESS) { if (res != PM3_SUCCESS) {
PrintAndLogEx(WARNING, "Can't set magic card block: %d. error=%d", blockno, res); PrintAndLogEx(WARNING, "Can't set magic card block: %d. error=%d", blockno, res);
PrintAndLogEx(HINT, "Verify your card size, and try again or try another tag position"); PrintAndLogEx(HINT, "Hint: Verify your card size and try again or try another tag position");
free(data); free(data);
return PM3_ESOFT; return PM3_ESOFT;
} }
@ -8588,7 +8588,7 @@ static int CmdHF14AGen4View(const char *Cmd) {
int res = mfG4GetBlock(pwd, i, dump + (i * MFBLOCK_SIZE), flags); int res = mfG4GetBlock(pwd, i, dump + (i * MFBLOCK_SIZE), flags);
if (res != PM3_SUCCESS) { if (res != PM3_SUCCESS) {
PrintAndLogEx(WARNING, "Can't get magic card block: %u. error=%d", i, res); PrintAndLogEx(WARNING, "Can't get magic card block: %u. error=%d", i, res);
PrintAndLogEx(HINT, "Verify your card size, and try again or try another tag position"); PrintAndLogEx(HINT, "Hint: Verify your card size and try again or try another tag position");
free(dump); free(dump);
return PM3_ESOFT; return PM3_ESOFT;
} }
@ -8738,7 +8738,7 @@ static int CmdHF14AGen4Save(const char *Cmd) {
if (res != PM3_SUCCESS) { if (res != PM3_SUCCESS) {
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(WARNING, "Can't get magic card block: %u. error=%d", i, res); PrintAndLogEx(WARNING, "Can't get magic card block: %u. error=%d", i, res);
PrintAndLogEx(HINT, "Verify your card size, and try again or try another tag position"); PrintAndLogEx(HINT, "Hint: Verify your card size and try again or try another tag position");
free(dump); free(dump);
return PM3_ESOFT; return PM3_ESOFT;
} }
@ -9076,7 +9076,7 @@ static int CmdHF14AGen4_GDM_SetCfg(const char *Cmd) {
if (resp.status == PM3_SUCCESS) { if (resp.status == PM3_SUCCESS) {
PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )"); PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )");
PrintAndLogEx(HINT, "try `" _YELLOW_("hf mf gdmcfg") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mf gdmcfg") "` to verify");
} else { } else {
PrintAndLogEx(FAILED, "Write ( " _RED_("fail") " )"); PrintAndLogEx(FAILED, "Write ( " _RED_("fail") " )");
} }
@ -9159,7 +9159,7 @@ static int CmdHF14AGen4_GDM_SetBlk(const char *Cmd) {
if (resp.status == PM3_SUCCESS) { if (resp.status == PM3_SUCCESS) {
PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )"); PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )");
PrintAndLogEx(HINT, "try `" _YELLOW_("hf mf rdbl") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mf rdbl") "` to verify");
} else if (resp.status == PM3_ETEAROFF) { } else if (resp.status == PM3_ETEAROFF) {
PrintAndLogEx(INFO, "Tear off triggered"); PrintAndLogEx(INFO, "Tear off triggered");
return resp.status; return resp.status;
@ -10160,6 +10160,11 @@ static int CmdHF14AMfISEN(const char *Cmd) {
} else if (res == NONCE_STATIC_ENC) { } else if (res == NONCE_STATIC_ENC) {
PrintAndLogEx(SUCCESS, "Static enc nonce..... " _RED_("yes")); PrintAndLogEx(SUCCESS, "Static enc nonce..... " _RED_("yes"));
} }
if (res == NONCE_STATIC_ENC) {
PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("script run fm11rf08s_recovery.py") "`");
}
if (setDeviceDebugLevel(dbg_curr, false) != PM3_SUCCESS) { if (setDeviceDebugLevel(dbg_curr, false) != PM3_SUCCESS) {
return PM3_EFAILED; return PM3_EFAILED;
} }

View file

@ -1831,7 +1831,7 @@ static int CmdHF14aDesMAD(const char *Cmd) {
if ((PICCInfo.keySettings & (1 << 1)) == 0) { if ((PICCInfo.keySettings & (1 << 1)) == 0) {
PrintAndLogEx(WARNING, "Directory list access with CMK... ( " _RED_("Enabled") " )"); PrintAndLogEx(WARNING, "Directory list access with CMK... ( " _RED_("Enabled") " )");
PrintAndLogEx(HINT, "Try to read MAD with Card Master Key (CMK)"); PrintAndLogEx(HINT, "Hint: Try to read MAD with Card Master Key (CMK)");
} }
PrintAndLogEx(SUCCESS, "----------------------------------------- " _CYAN_("MAD") " ------------------------------------------"); PrintAndLogEx(SUCCESS, "----------------------------------------- " _CYAN_("MAD") " ------------------------------------------");
@ -2559,7 +2559,7 @@ static int CmdHF14ADesCreateApp(const char *Cmd) {
arg_str0(NULL, "rawdata", "<hex>", "Raw data that sends to command"), arg_str0(NULL, "rawdata", "<hex>", "Raw data that sends to command"),
arg_str0(NULL, "aid", "<hex>", "Application ID for create. Mandatory. (3 hex bytes, big endian)"), arg_str0(NULL, "aid", "<hex>", "Application ID for create. Mandatory. (3 hex bytes, big endian)"),
arg_str0(NULL, "fid", "<hex>", "ISO file ID. Forbidden values: 0000 3F00, 3FFF, FFFF. (2 hex bytes, big endian)"), arg_str0(NULL, "fid", "<hex>", "ISO file ID. Forbidden values: 0000 3F00, 3FFF, FFFF. (2 hex bytes, big endian)"),
arg_str0(NULL, "dfname", "<string>", "ISO DF Name (1..16 chars)"), arg_str0(NULL, "dfname", "<str>", "ISO DF Name (1..16 chars)"),
arg_str0(NULL, "dfhex", "<hex>", "ISO DF Name as hex (1..16 bytes)"), arg_str0(NULL, "dfhex", "<hex>", "ISO DF Name as hex (1..16 bytes)"),
arg_str0(NULL, "ks1", "<hex>", "Key settings 1 (1 hex byte). Application Master Key Settings (def: 0x0F)"), arg_str0(NULL, "ks1", "<hex>", "Key settings 1 (1 hex byte). Application Master Key Settings (def: 0x0F)"),
arg_str0(NULL, "ks2", "<hex>", "Key settings 2 (1 hex byte). (def: 0x0E)"), arg_str0(NULL, "ks2", "<hex>", "Key settings 2 (1 hex byte). (def: 0x0E)"),

View file

@ -361,7 +361,7 @@ static int CmdHFMFPInfo(const char *Cmd) {
case DESFIRE_EV2_XL: case DESFIRE_EV2_XL:
case DESFIRE_EV3: case DESFIRE_EV3:
case DESFIRE_LIGHT: { case DESFIRE_LIGHT: {
PrintAndLogEx(HINT, "Card seems to be MIFARE DESFire. Try " _YELLOW_("`hf mfdes info`")); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mfdes info") "` Card seems to be MIFARE DESFire");
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
DropField(); DropField();
return PM3_SUCCESS; return PM3_SUCCESS;
@ -1688,12 +1688,12 @@ static int CmdHFMFPChk(const char *Cmd) {
// MAD detection // MAD detection
if ((memcmp(&foundKeys[0][0][1], "\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7", AES_KEY_LEN) == 0)) { if ((memcmp(&foundKeys[0][0][1], "\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7", AES_KEY_LEN) == 0)) {
PrintAndLogEx(HINT, "MAD key detected. Try " _YELLOW_("`hf mfp mad`") " for more details"); PrintAndLogEx(HINT, "Hint: MAD key detected. Try " _YELLOW_("`hf mfp mad`") " for more details");
} }
// NDEF detection // NDEF detection
if (has_ndef_key) { if (has_ndef_key) {
PrintAndLogEx(HINT, "NDEF key detected. Try " _YELLOW_("`hf mfp ndefread -h`") " for more details"); PrintAndLogEx(HINT, "Hint: NDEF key detected. Try " _YELLOW_("`hf mfp ndefread -h`") " for more details");
} }
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS; return PM3_SUCCESS;
@ -1999,7 +1999,7 @@ int CmdHFMFPNDEFRead(const char *Cmd) {
if (mfpReadSector(MF_MAD1_SECTOR, MF_KEY_A, (uint8_t *)g_mifarep_mad_key, sector0, verbose)) { if (mfpReadSector(MF_MAD1_SECTOR, MF_KEY_A, (uint8_t *)g_mifarep_mad_key, sector0, verbose)) {
PrintAndLogEx(ERR, "error, read sector 0. card doesn't have MAD or doesn't have MAD on default keys"); PrintAndLogEx(ERR, "error, read sector 0. card doesn't have MAD or doesn't have MAD on default keys");
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mfp ndefread -k `") " with your custom key"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mfp ndefread -k `") " with your custom key");
return PM3_ESOFT; return PM3_ESOFT;
} }
@ -2017,7 +2017,7 @@ int CmdHFMFPNDEFRead(const char *Cmd) {
if (mfpReadSector(MF_MAD2_SECTOR, MF_KEY_A, (uint8_t *)g_mifarep_mad_key, sector16, verbose)) { if (mfpReadSector(MF_MAD2_SECTOR, MF_KEY_A, (uint8_t *)g_mifarep_mad_key, sector16, verbose)) {
PrintAndLogEx(ERR, "error, read sector 0x10. card doesn't have MAD or doesn't have MAD on default keys"); PrintAndLogEx(ERR, "error, read sector 0x10. card doesn't have MAD or doesn't have MAD on default keys");
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mfp ndefread -k `") " with your custom key"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mfp ndefread -k `") " with your custom key");
return PM3_ESOFT; return PM3_ESOFT;
} }
} }
@ -2072,10 +2072,10 @@ int CmdHFMFPNDEFRead(const char *Cmd) {
pm3_save_dump(filename, data, n, jsfNDEF); pm3_save_dump(filename, data, n, jsfNDEF);
if (verbose == false) { if (verbose == false) {
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mfp ndefread -v`") " for more details"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mfp ndefread -v`") " for more details");
} else { } else {
if (verbose2 == false) { if (verbose2 == false) {
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mfp ndefread -vv`") " for more details"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mfp ndefread -vv`") " for more details");
} }
} }
return PM3_SUCCESS; return PM3_SUCCESS;

View file

@ -1930,9 +1930,9 @@ static int mfu_fingerprint(uint64_t tagtype, bool hasAuthKey, const uint8_t *aut
if (item->Pwd) { if (item->Pwd) {
char s[40] = {0}; char s[40] = {0};
snprintf(s, sizeof(s), item->hint, item->Pwd(uid)); snprintf(s, sizeof(s), item->hint, item->Pwd(uid));
PrintAndLogEx(HINT, "Use `" _YELLOW_("%s") "`", s); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("%s") "`", s);
} else { } else {
PrintAndLogEx(HINT, "Use `" _YELLOW_("%s") "`", item->hint); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("%s") "`", item->hint);
} }
} }
} }
@ -1948,9 +1948,9 @@ static int mfu_fingerprint(uint64_t tagtype, bool hasAuthKey, const uint8_t *aut
if (item->otp) { if (item->otp) {
char s[40] = {0}; char s[40] = {0};
snprintf(s, sizeof(s), item->hint, item->otp(uid)); snprintf(s, sizeof(s), item->hint, item->otp(uid));
PrintAndLogEx(HINT, "Use `" _YELLOW_("%s") "`", s); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("%s") "`", s);
} else { } else {
PrintAndLogEx(HINT, "Use `" _YELLOW_("%s") "`", item->hint); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("%s") "`", item->hint);
} }
} }
} }
@ -2314,7 +2314,7 @@ static int CmdHF14AMfUInfo(const char *Cmd) {
status = ul_read(0x28, ulc_conf, sizeof(ulc_conf)); status = ul_read(0x28, ulc_conf, sizeof(ulc_conf));
if (status <= 0) { if (status <= 0) {
PrintAndLogEx(ERR, "Error: tag didn't answer to READ UL-C"); PrintAndLogEx(ERR, "Error: tag didn't answer to READ UL-C");
PrintAndLogEx(HINT, "Hint: tag is likely fully read protected"); PrintAndLogEx(HINT, "Hint: Tag is most likely fully read protected");
DropField(); DropField();
return PM3_ESOFT; return PM3_ESOFT;
} }
@ -2614,11 +2614,11 @@ static int CmdHF14AMfUInfo(const char *Cmd) {
} }
if (len < 1) { if (len < 1) {
PrintAndLogEx(WARNING, _YELLOW_("password not known")); PrintAndLogEx(WARNING, _YELLOW_("password not known"));
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf mfu pwdgen -r`") " to get see known pwd gen algo suggestions"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mfu pwdgen -r`") " to get see known pwd gen algo suggestions");
} }
} else { } else {
if (locked) { if (locked) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf mfu pwdgen -r`") " to get see known pwd gen algo suggestions"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mfu pwdgen -r`") " to get see known pwd gen algo suggestions");
} }
} }
} }
@ -2630,11 +2630,11 @@ out:
if (locked) { if (locked) {
PrintAndLogEx(INFO, "\nTag appears to be locked, try using a key to get more info"); PrintAndLogEx(INFO, "\nTag appears to be locked, try using a key to get more info");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf mfu pwdgen -r`") " to get see known pwd gen algo suggestions"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mfu pwdgen -r`") " to get see known pwd gen algo suggestions");
} }
if (tagtype & (MFU_TT_MAGIC_1A | MFU_TT_MAGIC_1B | MFU_TT_MAGIC_2)) { if (tagtype & (MFU_TT_MAGIC_1A | MFU_TT_MAGIC_1B | MFU_TT_MAGIC_2)) {
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`script run hf_mfu_setuid -h`") " to set UID"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`script run hf_mfu_setuid -h`") " to set UID");
} }
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
@ -2755,7 +2755,7 @@ static int CmdHF14AMfUWrBl(const char *Cmd) {
if (res == PM3_SUCCESS) { if (res == PM3_SUCCESS) {
PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )"); PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )");
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf mfu rdbl -b %u") "` to verify ", blockno); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mfu rdbl -b %u") "` to verify ", blockno);
} }
} else { } else {
@ -2763,12 +2763,12 @@ static int CmdHF14AMfUWrBl(const char *Cmd) {
switch (res) { switch (res) {
case PM3_SUCCESS: { case PM3_SUCCESS: {
PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )"); PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )");
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf mfu rdbl -b %u") "` to verify ", blockno); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mfu rdbl -b %u") "` to verify ", blockno);
break; break;
} }
case PM3_ESOFT: { case PM3_ESOFT: {
PrintAndLogEx(FAILED, "Write ( " _RED_("fail") " )"); PrintAndLogEx(FAILED, "Write ( " _RED_("fail") " )");
PrintAndLogEx(HINT, "Check password / key!"); PrintAndLogEx(HINT, "Hint: Check password / key!");
break; break;
} }
case PM3_ETIMEOUT: case PM3_ETIMEOUT:
@ -3242,10 +3242,10 @@ static int CmdHF14AMfUDump(const char *Cmd) {
if ((tagtype & MFU_TT_UL_C) == MFU_TT_UL_C) { if ((tagtype & MFU_TT_UL_C) == MFU_TT_UL_C) {
if (card_mem_size != (pages + 4)) { if (card_mem_size != (pages + 4)) {
PrintAndLogEx(INFO, "Partial dump, got " _RED_("%d") " bytes - card mem size is %u bytes", pages * MFU_BLOCK_SIZE, card_mem_size * MFU_BLOCK_SIZE); PrintAndLogEx(INFO, "Partial dump, got " _RED_("%d") " bytes - card mem size is %u bytes", pages * MFU_BLOCK_SIZE, card_mem_size * MFU_BLOCK_SIZE);
PrintAndLogEx(HINT, "Try using a key"); PrintAndLogEx(HINT, "Hint: Try using a key");
} }
} else { } else {
PrintAndLogEx(HINT, "Try using a pwd"); PrintAndLogEx(HINT, "Hint: Try using a password");
} }
} }
@ -3762,7 +3762,7 @@ static int CmdHF14AMfURestore(const char *Cmd) {
DropField(); DropField();
free(dump); free(dump);
PrintAndLogEx(HINT, "try `" _YELLOW_("hf mfu dump --ns") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mfu dump --ns") "` to verify");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -3798,7 +3798,7 @@ static int CmdHF14AMfUeLoad(const char *Cmd) {
int res = CmdHF14AMfELoad(nc); int res = CmdHF14AMfELoad(nc);
free(nc); free(nc);
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mfu sim -t 7`") " to simulate an Amiibo."); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mfu sim -t 7`") " to simulate an Amiibo.");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return res; return res;
} }
@ -5266,7 +5266,7 @@ int CmdHF14MfuNDEFRead(const char *Cmd) {
jooki++; jooki++;
char s[17] = {0}; char s[17] = {0};
strncpy(s, jooki, 16); strncpy(s, jooki, 16);
PrintAndLogEx(HINT, "Use `" _YELLOW_("hf jooki decode -d %s") "` to decode", s); PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("hf jooki decode -d %s") "` to decode", s);
break; break;
} }
} }
@ -5838,7 +5838,7 @@ ulc:
} }
PrintAndLogEx(HINT, "try `" _YELLOW_("hf mfu dump --ns") "` to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mfu dump --ns") "` to verify");
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
@ -5930,7 +5930,7 @@ static int CmdHF14AMfUIncr(const char *Cmd) {
if (len != sizeof(current_counter)) { if (len != sizeof(current_counter)) {
PrintAndLogEx(FAILED, "failed to read old counter"); PrintAndLogEx(FAILED, "failed to read old counter");
if (is_ntag) { if (is_ntag) {
PrintAndLogEx(HINT, "NTAG detected, try reading with PWD"); PrintAndLogEx(HINT, "Hint: NTAG detected, try reading with password");
} }
DropField(); DropField();
return PM3_ESOFT; return PM3_ESOFT;

View file

@ -837,8 +837,8 @@ static int CmdHFTopazSniff(const char *Cmd) {
PacketResponseNG resp; PacketResponseNG resp;
WaitForResponse(CMD_HF_ISO14443A_SNIFF, &resp); WaitForResponse(CMD_HF_ISO14443A_SNIFF, &resp);
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf topaz list")"` to view captured tracelog"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf topaz list")"` to view captured tracelog");
PrintAndLogEx(HINT, "Try `" _YELLOW_("trace save -h") "` to save tracelog for later analysing"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("trace save -h") "` to save tracelog for later analysing");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -1052,7 +1052,7 @@ static int CmdHFTopazWrBl(const char *Cmd) {
if (res == PM3_SUCCESS) { if (res == PM3_SUCCESS) {
PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )"); PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )");
PrintAndLogEx(HINT, "try `" _YELLOW_("hf topaz rdbl --blk %u") "` to verify", blockno); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf topaz rdbl --blk %u") "` to verify", blockno);
} else { } else {
PrintAndLogEx(WARNING, "Write ( " _RED_("fail") " )"); PrintAndLogEx(WARNING, "Write ( " _RED_("fail") " )");

View file

@ -1572,7 +1572,7 @@ static bool check_chiptype(bool getDeviceData) {
uint32_t word = 0; uint32_t word = 0;
if (IfPm3EM4x50() && em4x05_isblock0(&word)) { if (IfPm3EM4x50() && em4x05_isblock0(&word)) {
PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("EM4x05 / EM4x69")); PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("EM4x05 / EM4x69"));
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf em 4x05`") " commands"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf em 4x05") "` commands");
retval = true; retval = true;
goto out; goto out;
} }
@ -1580,7 +1580,7 @@ static bool check_chiptype(bool getDeviceData) {
//check for t55xx chip... //check for t55xx chip...
if (tryDetectP1(true)) { if (tryDetectP1(true)) {
PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("T55xx")); PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("T55xx"));
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf t55xx`") " commands"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf t55xx") "` commands");
retval = true; retval = true;
goto out; goto out;
} }
@ -1591,7 +1591,7 @@ static bool check_chiptype(bool getDeviceData) {
// Hitag 2 // Hitag 2
if (ht2_read_uid() == PM3_SUCCESS) { if (ht2_read_uid() == PM3_SUCCESS) {
PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("Hitag 2")); PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("Hitag 2"));
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf hitag`") " commands"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf hitag") "` commands");
retval = true; retval = true;
goto out; goto out;
} }
@ -1599,7 +1599,7 @@ static bool check_chiptype(bool getDeviceData) {
// Hitag S // Hitag S
if (read_hts_uid() == PM3_SUCCESS) { if (read_hts_uid() == PM3_SUCCESS) {
PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("Hitag 1/S / 82xx")); PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("Hitag 1/S / 82xx"));
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf hitag hts`") " commands"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf hitag hts") "` commands");
retval = true; retval = true;
goto out; goto out;
} }
@ -1607,7 +1607,7 @@ static bool check_chiptype(bool getDeviceData) {
// Hitag µ // Hitag µ
if (read_htu_uid() == PM3_SUCCESS) { if (read_htu_uid() == PM3_SUCCESS) {
PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("Hitag µ / 8265")); PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("Hitag µ / 8265"));
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf hitag htu`") " commands"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf hitag htu") "` commands");
retval = true; retval = true;
goto out; goto out;
} }
@ -1618,7 +1618,7 @@ static bool check_chiptype(bool getDeviceData) {
// check for em4x50 chips // check for em4x50 chips
if (IfPm3EM4x50() && detect_4x50_block()) { if (IfPm3EM4x50() && detect_4x50_block()) {
PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("EM4x50")); PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("EM4x50"));
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf em 4x50`") " commands"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf em 4x50") "` commands");
retval = true; retval = true;
goto out; goto out;
} }
@ -1626,7 +1626,7 @@ static bool check_chiptype(bool getDeviceData) {
// check for em4x70 chips // check for em4x70 chips
if (IfPm3EM4x70() && detect_4x70_block()) { if (IfPm3EM4x70() && detect_4x70_block()) {
PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("EM4x70")); PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("EM4x70"));
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf em 4x70`") " commands"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf em 4x70") "` commands");
retval = true; retval = true;
goto out; goto out;
} }
@ -1783,7 +1783,7 @@ int CmdLFfind(const char *Cmd) {
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(FAILED, _RED_("No data found!")); PrintAndLogEx(FAILED, _RED_("No data found!"));
PrintAndLogEx(HINT, "Maybe not an LF tag?"); PrintAndLogEx(HINT, "Hint: Maybe not an LF tag?");
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
if (search_cont == 0) { if (search_cont == 0) {
return PM3_ESOFT; return PM3_ESOFT;

View file

@ -434,7 +434,7 @@ static int CmdAWIDClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf awid reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf awid reader") "` to verify");
return res; return res;
} }

View file

@ -213,7 +213,7 @@ static int CmdDestronClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf destron reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf destron reader") "` to verify");
return res; return res;
} }

View file

@ -859,7 +859,7 @@ static int CmdEM410xClone(const char *Cmd) {
switch (resp.status) { switch (resp.status) {
case PM3_SUCCESS: { case PM3_SUCCESS: {
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf em 410x reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf em 410x reader`") " to verify");
break; break;
} }
default: { default: {

View file

@ -1486,7 +1486,7 @@ int CmdEM4x05Write(const char *Cmd) {
else else
PrintAndLogEx(DEBUG, "No answer from tag"); PrintAndLogEx(DEBUG, "No answer from tag");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf em 4x05 read`") " to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf em 4x05 read") "` to verify");
return status; return status;
} }

View file

@ -215,7 +215,7 @@ static int CmdEM4x50ELoad(const char *Cmd) {
// upload to emulator memory // upload to emulator memory
em4x50_seteml(data, 0, EM4X50_DUMP_FILESIZE); em4x50_seteml(data, 0, EM4X50_DUMP_FILESIZE);
PrintAndLogEx(HINT, "You are ready to simulate. See " _YELLOW_("`lf em 4x50 sim -h`")); PrintAndLogEx(HINT, "Hint: You are ready to simulate. See `" _YELLOW_("lf em 4x50 sim -h") "`");
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -983,7 +983,7 @@ static int CmdEM4x50Write(const char *Cmd) {
em4x50_prepare_result(data, addr, addr, words); em4x50_prepare_result(data, addr, addr, words);
em4x50_print_result(words, addr, addr); em4x50_print_result(words, addr, addr);
PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )"); PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )");
PrintAndLogEx(HINT, "Try `" _YELLOW_("lf em 4x50 rdbl -b %u") "` - to read your data", addr); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf em 4x50 rdbl -b %u") "` - to read your data", addr);
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -1191,7 +1191,7 @@ static int CmdEM4x70AutoRecover(const char *Cmd) {
// lf em 4x70 auth --rnd <rnd_1> --frn <frn_1> // lf em 4x70 auth --rnd <rnd_1> --frn <frn_1>
if (PM3_SUCCESS == result) { if (PM3_SUCCESS == result) {
PrintAndLogEx(INFO, "Step 1. Verifying passed parameters authenticate with the tag (safety check)"); PrintAndLogEx(INFO, "Step 1. Verifying passed parameters authenticate with the tag (safety check)");
PrintAndLogEx(HINT, " " _YELLOW_("lf em 4x70 auth --rnd %s --frn %s"), rnd_string, frn_string); PrintAndLogEx(HINT, "Hint: " _YELLOW_("lf em 4x70 auth --rnd %s --frn %s"), rnd_string, frn_string);
em4x70_cmd_input_auth_t opts_auth = { em4x70_cmd_input_auth_t opts_auth = {
.use_parity = opts.parity, .use_parity = opts.parity,
@ -1237,7 +1237,7 @@ static int CmdEM4x70AutoRecover(const char *Cmd) {
// lf em 4x70 write -b N -d 0000 // lf em 4x70 write -b N -d 0000
if (PM3_SUCCESS == result) { if (PM3_SUCCESS == result) {
PrintAndLogEx(INFO, "Step %d. Brute force the key bits in block %d", step, block); PrintAndLogEx(INFO, "Step %d. Brute force the key bits in block %d", step, block);
PrintAndLogEx(HINT, " " _YELLOW_("lf em 4x70 write -b %d -d 0000"), block); PrintAndLogEx(HINT, "Hint: " _YELLOW_("lf em 4x70 write -b %d -d 0000"), block);
em4x70_cmd_input_writeblock_t opt_write_zeros = { em4x70_cmd_input_writeblock_t opt_write_zeros = {
.use_parity = opts.parity, .use_parity = opts.parity,
@ -1249,18 +1249,18 @@ static int CmdEM4x70AutoRecover(const char *Cmd) {
if (PM3_ETIMEOUT == result) { if (PM3_ETIMEOUT == result) {
PrintAndLogEx(FAILED, "timeout while waiting for reply"); PrintAndLogEx(FAILED, "timeout while waiting for reply");
PrintAndLogEx(HINT, "Block %d data may have been overwritten. Manually restart at step %d", block, step); PrintAndLogEx(HINT, "Hint: Block %d data may have been overwritten. Manually restart at step %d", block, step);
return result; return result;
} else if (PM3_SUCCESS != result) { } else if (PM3_SUCCESS != result) {
PrintAndLogEx(FAILED, "Writing block %d ( " _RED_("fail") " )", block); PrintAndLogEx(FAILED, "Writing block %d ( " _RED_("fail") " )", block);
PrintAndLogEx(HINT, "Block %d data was overwritten. Manually restart at step %d", block, step); PrintAndLogEx(HINT, "Hint: Block %d data was overwritten. Manually restart at step %d", block, step);
return result; return result;
} }
} }
// lf em 4x70 brute -b N --rnd <rnd_1> --frn <frn_1> // lf em 4x70 brute -b N --rnd <rnd_1> --frn <frn_1>
if (PM3_SUCCESS == result) { if (PM3_SUCCESS == result) {
PrintAndLogEx(HINT, " " _YELLOW_("lf em 4x70 brute -b %d --rnd %s --frn %s"), block, rnd_string, frn_string); PrintAndLogEx(HINT, "Hint: " _YELLOW_("lf em 4x70 brute -b %d --rnd %s --frn %s"), block, rnd_string, frn_string);
em4x70_cmd_input_brute_t opts_brute = { em4x70_cmd_input_brute_t opts_brute = {
.use_parity = opts.parity, .use_parity = opts.parity,
@ -1274,11 +1274,11 @@ static int CmdEM4x70AutoRecover(const char *Cmd) {
if (PM3_ETIMEOUT == result) { if (PM3_ETIMEOUT == result) {
PrintAndLogEx(FAILED, "timeout while waiting for reply"); PrintAndLogEx(FAILED, "timeout while waiting for reply");
PrintAndLogEx(HINT, "Block %d data was overwritten. Manually restart at step %d", block, step); PrintAndLogEx(HINT, "Hint: Block %d data was overwritten. Manually restart at step %d", block, step);
return result; return result;
} else if (PM3_SUCCESS != result) { } else if (PM3_SUCCESS != result) {
PrintAndLogEx(FAILED, "Writing block %d ( " _RED_("fail") " )", block); PrintAndLogEx(FAILED, "Writing block %d ( " _RED_("fail") " )", block);
PrintAndLogEx(HINT, "Block %d data was overwritten. Manually restart at step %d", block, step); PrintAndLogEx(HINT, "Hint: Block %d data was overwritten. Manually restart at step %d", block, step);
return result; return result;
} else { } else {
PrintAndLogEx(INFO, " Found: Partial key in block %d is " _GREEN_("%02X%02X") PrintAndLogEx(INFO, " Found: Partial key in block %d is " _GREEN_("%02X%02X")
@ -1301,7 +1301,7 @@ static int CmdEM4x70AutoRecover(const char *Cmd) {
} }
// lf em 4x70 write -b N -d <key_block_N> // lf em 4x70 write -b N -d <key_block_N>
if (PM3_SUCCESS == result) { if (PM3_SUCCESS == result) {
PrintAndLogEx(HINT, " " _YELLOW_("lf em 4x70 write -b %d -d %02X%02X"), block, brute.partial_key[0], brute.partial_key[1]); PrintAndLogEx(HINT, "Hint: " _YELLOW_("lf em 4x70 write -b %d -d %02X%02X"), block, brute.partial_key[0], brute.partial_key[1]);
em4x70_cmd_input_writeblock_t opt_write_zeros = { em4x70_cmd_input_writeblock_t opt_write_zeros = {
.use_parity = opts.parity, .use_parity = opts.parity,
@ -1313,11 +1313,11 @@ static int CmdEM4x70AutoRecover(const char *Cmd) {
if (PM3_ETIMEOUT == result) { if (PM3_ETIMEOUT == result) {
PrintAndLogEx(FAILED, "timeout while waiting for reply"); PrintAndLogEx(FAILED, "timeout while waiting for reply");
PrintAndLogEx(HINT, "Block %d data (" _GREEN_("%02X%02X") ") may need to be rewritten", block, brute.partial_key[0], brute.partial_key[1]); PrintAndLogEx(HINT, "Hint: Block %d data (" _GREEN_("%02X%02X") ") may need to be rewritten", block, brute.partial_key[0], brute.partial_key[1]);
return result; return result;
} else if (PM3_SUCCESS != result) { } else if (PM3_SUCCESS != result) {
PrintAndLogEx(FAILED, "Writing block %d ( " _RED_("fail") " )", block); PrintAndLogEx(FAILED, "Writing block %d ( " _RED_("fail") " )", block);
PrintAndLogEx(HINT, "Block %d data (" _GREEN_("%02X%02X") ") may need to be rewritten", block, brute.partial_key[0], brute.partial_key[1]); PrintAndLogEx(HINT, "Hint: Block %d data (" _GREEN_("%02X%02X") ") may need to be rewritten", block, brute.partial_key[0], brute.partial_key[1]);
return result; return result;
} }
} }
@ -1335,7 +1335,7 @@ static int CmdEM4x70AutoRecover(const char *Cmd) {
// lf em 4x70 recover --key <key_block_9><key_block_8><key_block_7> --rnd <rnd_1> --frn <frn_1> // lf em 4x70 recover --key <key_block_9><key_block_8><key_block_7> --rnd <rnd_1> --frn <frn_1>
if (PM3_SUCCESS == result) { if (PM3_SUCCESS == result) {
PrintAndLogEx(INFO, "Step 5. Recover potential values of the lower 48 bits of the key"); PrintAndLogEx(INFO, "Step 5. Recover potential values of the lower 48 bits of the key");
PrintAndLogEx(HINT, " " _YELLOW_("lf em 4x70 recover --key %s --rnd %s --frn %s --grn %s"), key_string, rnd_string, frn_string, grn_string); PrintAndLogEx(HINT, "Hint: " _YELLOW_("lf em 4x70 recover --key %s --rnd %s --frn %s --grn %s"), key_string, rnd_string, frn_string, grn_string);
result = recover_em4x70(&opts, &data); result = recover_em4x70(&opts, &data);

View file

@ -803,7 +803,7 @@ static int CmdFdxBClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf fdxb reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf fdxb reader`") " to verify");
return res; return res;
} }

View file

@ -277,7 +277,7 @@ static int CmdGallagherClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf gallagher reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf gallagher reader`") " to verify");
return res; return res;
} }

View file

@ -332,7 +332,7 @@ static int CmdGuardClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf gproxii reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf gproxii reader`") " to verify");
return res; return res;
} }

View file

@ -479,7 +479,7 @@ static int CmdHIDClone(const char *Cmd) {
if (resp.status == PM3_SUCCESS) { if (resp.status == PM3_SUCCESS) {
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf hid reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf hid reader`") " to verify");
} else { } else {
PrintAndLogEx(FAILED, "cloning ( " _RED_("fail") " )"); PrintAndLogEx(FAILED, "cloning ( " _RED_("fail") " )");
} }

View file

@ -1807,8 +1807,8 @@ static int CmdLFHitagSniff(const char *Cmd) {
SendCommandNG(CMD_LF_HITAG_SNIFF, NULL, 0); SendCommandNG(CMD_LF_HITAG_SNIFF, NULL, 0);
WaitForResponse(CMD_LF_HITAG_SNIFF, &resp); WaitForResponse(CMD_LF_HITAG_SNIFF, &resp);
PrintAndLogEx(INFO, "Done!"); PrintAndLogEx(INFO, "Done!");
PrintAndLogEx(HINT, "Try `" _YELLOW_("lf hitag list")"` to view captured tracelog"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf hitag list")"` to view captured tracelog");
PrintAndLogEx(HINT, "Try `" _YELLOW_("trace save -h") "` to save tracelog for later analysing"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("trace save -h") "` to save tracelog for later analysing");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -2242,7 +2242,7 @@ static int CmdLFHitag2Crack2(const char *Cmd) {
} }
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(SUCCESS, "Nonce replay and length extension attack ( %s )", _GREEN_("ok")); PrintAndLogEx(SUCCESS, "Nonce replay and length extension attack ( %s )", _GREEN_("ok"));
PrintAndLogEx(HINT, "try running `tools/hitag2crack/crack2/ht2crack2search <FILE_with_above_bytes>"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("tools/hitag2crack/crack2/ht2crack2search <FILE_with_above_bytes>") "`");
break; break;
} else { } else {
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");

View file

@ -227,7 +227,7 @@ static int CmdIdteckClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf idteck reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf idteck reader`") " to verify");
return res; return res;
} }

View file

@ -946,7 +946,7 @@ static int CmdIndalaClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf indala reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf indala reader`") " to verify");
return res; return res;
} }

View file

@ -359,7 +359,7 @@ static int CmdIOProxClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf io reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf io reader`") " to verify");
return res; return res;
} }

View file

@ -241,7 +241,7 @@ static int CmdJablotronClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf jablotron reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf jablotron reader`") " to verify");
return res; return res;
} }

View file

@ -310,7 +310,7 @@ static int CmdKeriClone(const char *Cmd) {
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf keri read`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf keri read`") " to verify");
return res; return res;
} }

View file

@ -254,7 +254,7 @@ static int CmdMotorolaClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf motorola reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf motorola reader`") " to verify");
return res; return res;
} }

View file

@ -473,7 +473,7 @@ static int CmdLFNedapClone(const char *Cmd) {
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf nedap reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf nedap reader`") " to verify");
return res; return res;
} }

View file

@ -448,7 +448,7 @@ static int CmdNexWatchClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf nexwatch reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf nexwatch reader`") " to verify");
return res; return res;
} }

View file

@ -221,7 +221,7 @@ static int CmdNoralsyClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf noralsy reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf noralsy reader`") " to verify");
return res; return res;
} }

View file

@ -305,7 +305,7 @@ static int CmdPacClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf pac reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf pac reader`") " to verify");
return res; return res;
} }

View file

@ -384,7 +384,7 @@ static int CmdParadoxClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf paradox read`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf paradox read`") " to verify");
return res; return res;
} }

View file

@ -44,7 +44,7 @@ int pcf7931_resetConfig(void) {
configPcf.OffsetWidth = PCF7931_DEFAULT_OFFSET_WIDTH; configPcf.OffsetWidth = PCF7931_DEFAULT_OFFSET_WIDTH;
configPcf.OffsetPosition = PCF7931_DEFAULT_OFFSET_POSITION; configPcf.OffsetPosition = PCF7931_DEFAULT_OFFSET_POSITION;
PrintAndLogEx(INFO, "Configuration reset"); PrintAndLogEx(INFO, "Configuration reset");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf pcf7931 config`") " to view current settings"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf pcf7931 config") "` to view current settings");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -194,7 +194,7 @@ static int CmdLFPCF7931Write(const char *Cmd) {
SendCommandMIX(CMD_LF_PCF7931_WRITE, block, idx, data[0], buf, sizeof(buf)); SendCommandMIX(CMD_LF_PCF7931_WRITE, block, idx, data[0], buf, sizeof(buf));
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf pcf7931 reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf pcf7931 reader`") " to verify");
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -265,7 +265,7 @@ static int CmdPrescoClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf presco reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf presco reader`") " to verify");
return res; return res;
} }

View file

@ -357,7 +357,7 @@ static int CmdPyramidClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf pyramid reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf pyramid reader`") " to verify");
return res; return res;
} }

View file

@ -233,7 +233,7 @@ static int CmdSecurakeyClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf securakey reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf securakey reader`") " to verify");
return res; return res;
} }

View file

@ -900,7 +900,7 @@ int T55xxReadBlockEx(uint8_t block, bool page1, bool usepwd, uint8_t override, u
if (t55xxTryDetectModulationEx(downlink_mode, false, 0, password) == false) { if (t55xxTryDetectModulationEx(downlink_mode, false, 0, password) == false) {
PrintAndLogEx(WARNING, "Safety check: Could not detect if PWD bit is set in config block. Exits."); PrintAndLogEx(WARNING, "Safety check: Could not detect if PWD bit is set in config block. Exits.");
PrintAndLogEx(HINT, "Consider using the override parameter to force read."); PrintAndLogEx(HINT, "Hint: Consider using the override parameter to force read.");
return PM3_EWRONGANSWER; return PM3_EWRONGANSWER;
} else { } else {
PrintAndLogEx(WARNING, "Safety check: PWD bit is NOT set in config block. Reading without password..."); PrintAndLogEx(WARNING, "Safety check: PWD bit is NOT set in config block. Reading without password...");

View file

@ -370,7 +370,7 @@ static int CmdTIWrite(const char *Cmd) {
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_LF_TI_WRITE, (uint8_t *)&payload, sizeof(payload)); SendCommandNG(CMD_LF_TI_WRITE, (uint8_t *)&payload, sizeof(payload));
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf ti reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf ti reader`") " to verify");
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -138,7 +138,7 @@ static int CmdVerichipClone(const char *Cmd) {
int res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); int res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf verichip read`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf verichip read`") " to verify");
return res; return res;
} }

View file

@ -177,7 +177,7 @@ static int CmdVikingClone(const char *Cmd) {
return PM3_ETIMEOUT; return PM3_ETIMEOUT;
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf viking reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf viking reader`") " to verify");
return resp.status; return resp.status;
} }

View file

@ -245,7 +245,7 @@ static int CmdVisa2kClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
} }
PrintAndLogEx(SUCCESS, "Done!"); PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf visa2000 reader`") " to verify"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("lf visa2000 reader") "` to verify");
return res; return res;
} }

View file

@ -696,7 +696,7 @@ static int CmdSmartUpgrade(const char *Cmd) {
if (resp.status == PM3_SUCCESS) { if (resp.status == PM3_SUCCESS) {
PrintAndLogEx(SUCCESS, "Sim module firmware upgrade " _GREEN_("successful")); PrintAndLogEx(SUCCESS, "Sim module firmware upgrade " _GREEN_("successful"));
PrintAndLogEx(HINT, "run " _YELLOW_("`hw status`") " to validate the fw version "); PrintAndLogEx(HINT, "Hint: Run `" _YELLOW_("hw status") "` to validate the fw version ");
} else { } else {
PrintAndLogEx(FAILED, "Sim module firmware upgrade " _RED_("failed")); PrintAndLogEx(FAILED, "Sim module firmware upgrade " _RED_("failed"));
} }

View file

@ -1231,7 +1231,7 @@ static int CmdTraceLoad(const char *Cmd) {
gs_traceLen = (long)len; gs_traceLen = (long)len;
PrintAndLogEx(SUCCESS, "Recorded Activity (TraceLen = " _YELLOW_("%u") " bytes)", gs_traceLen); PrintAndLogEx(SUCCESS, "Recorded Activity (TraceLen = " _YELLOW_("%u") " bytes)", gs_traceLen);
PrintAndLogEx(HINT, "try " _YELLOW_("`trace list -1 -t ...`") " to view trace. Remember the " _YELLOW_("`-1`") " param"); PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("trace list -1 -t ...") "` to view trace. Remember the " _YELLOW_("`-1`") " param");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -1588,7 +1588,7 @@ int CmdTraceList(const char *Cmd) {
} }
if (show_hex) { if (show_hex) {
PrintAndLogEx(HINT, "syntax to use: " _YELLOW_("`text2pcap -t \"%%S.\" -l 264 -n <input-text-file> <output-pcapng-file>`")); PrintAndLogEx(HINT, "Hint: Syntax to use: `" _YELLOW_("text2pcap -t \"%%S.\" -l 264 -n <input-text-file> <output-pcapng-file>") "`");
} }
return PM3_SUCCESS; return PM3_SUCCESS;

View file

@ -788,12 +788,12 @@ bool OpenProxmark(pm3_device_t **dev, const char *port, bool wait_for_port, int
// check result of uart opening // check result of uart opening
if (sp == INVALID_SERIAL_PORT) { if (sp == INVALID_SERIAL_PORT) {
PrintAndLogEx(WARNING, "\n" _RED_("ERROR:") " invalid serial port " _YELLOW_("%s"), port); PrintAndLogEx(WARNING, "\n" _RED_("ERROR:") " invalid serial port " _YELLOW_("%s"), port);
PrintAndLogEx(HINT, "Try the shell script " _YELLOW_("`./pm3 --list`") " to get a list of possible serial ports"); PrintAndLogEx(HINT, "Hint: Try the shell script `" _YELLOW_("`./pm3 --list") "` to get a list of possible serial ports");
sp = NULL; sp = NULL;
return false; return false;
} else if (sp == CLAIMED_SERIAL_PORT) { } else if (sp == CLAIMED_SERIAL_PORT) {
PrintAndLogEx(WARNING, "\n" _RED_("ERROR:") " serial port " _YELLOW_("%s") " is claimed by another process", port); PrintAndLogEx(WARNING, "\n" _RED_("ERROR:") " serial port " _YELLOW_("%s") " is claimed by another process", port);
PrintAndLogEx(HINT, "Try the shell script " _YELLOW_("`./pm3 --list`") " to get a list of possible serial ports"); PrintAndLogEx(HINT, "Hint: Try the shell script `" _YELLOW_("./pm3 --list") "` to get a list of possible serial ports");
sp = NULL; sp = NULL;
return false; return false;

View file

@ -128,7 +128,7 @@ void des3_decrypt(void *out, const void *in, const void *key, uint8_t keycount)
int aes_encode(uint8_t *iv, uint8_t *key, uint8_t *input, uint8_t *output, int length) { int aes_encode(uint8_t *iv, uint8_t *key, uint8_t *input, uint8_t *output, int length) {
uint8_t iiv[16] = {0}; uint8_t iiv[16] = {0};
if (iv) { if (iv) {
memcpy(iiv, iv, 16); memcpy(iiv, iv, sizeof(iiv));
} }
mbedtls_aes_context aes; mbedtls_aes_context aes;

View file

@ -145,15 +145,19 @@ static int print_aid_description(json_t *root, uint16_t aid, char *fmt, bool ver
} }
if (verbose) { if (verbose) {
PrintAndLogEx(SUCCESS, " MAD: %s", vmad); PrintAndLogEx(SUCCESS, " MAD................. %s", vmad);
if (application) if (application) {
PrintAndLogEx(SUCCESS, " Application: %s", application); PrintAndLogEx(SUCCESS, " Application......... %s", application);
if (company) }
PrintAndLogEx(SUCCESS, " Company: %s", company); if (company) {
if (provider) PrintAndLogEx(SUCCESS, " Company............. %s", company);
PrintAndLogEx(SUCCESS, " Service provider: %s", provider); }
if (integrator) if (provider) {
PrintAndLogEx(SUCCESS, " System integrator: %s", integrator); PrintAndLogEx(SUCCESS, " Service provider.... %s", provider);
}
if (integrator) {
PrintAndLogEx(SUCCESS, " System integrator... %s", integrator);
}
} }
return PM3_SUCCESS; return PM3_SUCCESS;
} }