unify text and hints for static enc nonces a bit more

This commit is contained in:
iceman1001 2025-06-08 21:46:31 +02:00
commit 1fa5e28a38
14 changed files with 44 additions and 35 deletions

View file

@ -576,10 +576,11 @@ static int CmdFlashMemSpiFFSView(const char *Cmd) {
static command_t CommandTable[] = {
{"help", CmdHelp, AlwaysAvailable, "This help"},
{"-----------", CmdHelp, IfPm3Flash, "------------------- " _CYAN_("Operations") " -------------------"},
{"copy", CmdFlashMemSpiFFSCopy, IfPm3Flash, "Copy a file to another (destructively) in SPIFFS file system"},
{"check", CmdFlashMemSpiFFSCheck, IfPm3Flash, "Check/try to defrag faulty/fragmented file system"},
{"dump", CmdFlashMemSpiFFSDump, IfPm3Flash, "Dump a file from SPIFFS file system"},
{"info", CmdFlashMemSpiFFSInfo, IfPm3Flash, "Print file system info and usage statistics"},
{"info", CmdFlashMemSpiFFSInfo, IfPm3Flash, "File system information and usage statistics"},
{"mount", CmdFlashMemSpiFFSMount, IfPm3Flash, "Mount the SPIFFS file system if not already mounted"},
{"remove", CmdFlashMemSpiFFSRemove, IfPm3Flash, "Remove a file from SPIFFS file system"},
{"rename", CmdFlashMemSpiFFSRename, IfPm3Flash, "Rename/move a file in SPIFFS file system"},

View file

@ -1888,7 +1888,8 @@ static int CmdHFCipurseDefault(const char *Cmd) {
static command_t CommandTable[] = {
{"help", CmdHelp, AlwaysAvailable, "This help."},
{"info", CmdHFCipurseInfo, IfPm3Iso14443a, "Get info about CIPURSE tag"},
{"-----------", CmdHelp, IfPm3Iso14443a, "------------------- " _CYAN_("Operations") " -------------------"},
{"info", CmdHFCipurseInfo, IfPm3Iso14443a, "Tag information"},
{"select", CmdHFCipurseSelect, IfPm3Iso14443a, "Select CIPURSE application or file"},
{"auth", CmdHFCipurseAuth, IfPm3Iso14443a, "Authenticate CIPURSE tag"},
{"read", CmdHFCipurseReadFile, IfPm3Iso14443a, "Read binary file"},

View file

@ -2449,8 +2449,9 @@ static int CmdHFeMRTDList(const char *Cmd) {
static command_t CommandTable[] = {
{"help", CmdHelp, AlwaysAvailable, "This help"},
{"-----------", CmdHelp, IfPm3Iso14443, "------------------- " _CYAN_("Operations") " -------------------"},
{"dump", CmdHFeMRTDDump, IfPm3Iso14443, "Dump eMRTD files to binary files"},
{"info", CmdHFeMRTDInfo, AlwaysAvailable, "Display info about an eMRTD"},
{"info", CmdHFeMRTDInfo, AlwaysAvailable, "Tag information"},
{"list", CmdHFeMRTDList, AlwaysAvailable, "List ISO 14443A/7816 history"},
{NULL, NULL, NULL, NULL}
};

View file

@ -913,7 +913,8 @@ static int CmdHFFido2GetAssertion(const char *cmd) {
static command_t CommandTable[] = {
{"help", CmdHelp, AlwaysAvailable, "This help."},
{"list", CmdHFFidoList, AlwaysAvailable, "List ISO 14443A history"},
{"info", CmdHFFidoInfo, IfPm3Iso14443a, "Info about FIDO tag."},
{"-----------", CmdHelp, IfPm3Iso14443a, "------------------- " _CYAN_("Operations") " -------------------"},
{"info", CmdHFFidoInfo, IfPm3Iso14443a, "Tag information"},
{"reg", CmdHFFidoRegister, IfPm3Iso14443a, "FIDO U2F Registration Message."},
{"auth", CmdHFFidoAuthenticate, IfPm3Iso14443a, "FIDO U2F Authentication Message."},
{"make", CmdHFFido2MakeCredential, IfPm3Iso14443a, "FIDO2 MakeCredential command."},

View file

@ -358,7 +358,7 @@ end:
static command_t CommandTable[] = {
{"help", CmdHelp, AlwaysAvailable, "This help"},
{"select", CmdHFKSX6924Select, IfPm3Iso14443a, "Select application, and leave field up"},
{"info", CmdHFKSX6924Info, IfPm3Iso14443a, "Get info about a KS X 6924 (T-Money, Snapper+) transit card"},
{"info", CmdHFKSX6924Info, IfPm3Iso14443a, "Tag information"},
{"balance", CmdHFKSX6924Balance, IfPm3Iso14443a, "Get current purse balance"},
{"init", CmdHFKSX6924Initialize, IfPm3Iso14443a, "Perform transaction initialization with Mpda"},
{"prec", CmdHFKSX6924PRec, IfPm3Iso14443a, "Send proprietary get record command (CLA=90, INS=4C)"},

View file

@ -2105,7 +2105,8 @@ static int CmdHF14AMfNested(const char *Cmd) { //TODO: single mode broken? can't
PrintAndLogEx(FAILED, "No valid key found");
break;
case PM3_ESTATIC_NONCE:
PrintAndLogEx(ERR, "Error: Static encrypted nonce detected. Aborted\n");
PrintAndLogEx(ERR, "Static encrypted nonce detected. Aborted\n");
PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("script run fm11rf08s_recovery.py") "`");
break;
case PM3_SUCCESS:
key64 = bytes_to_num(keyBlock, 6);
@ -2189,7 +2190,8 @@ static int CmdHF14AMfNested(const char *Cmd) { //TODO: single mode broken? can't
calibrate = false;
continue;
case PM3_ESTATIC_NONCE:
PrintAndLogEx(ERR, "Error: Static encrypted nonce detected. Aborted\n");
PrintAndLogEx(ERR, "Static encrypted nonce detected. Aborted\n");
PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("script run fm11rf08s_recovery.py") "`");
break;
case PM3_SUCCESS:
calibrate = false;
@ -2766,7 +2768,8 @@ static int CmdHF14AMfNestedHard(const char *Cmd) {
PrintAndLogEx(WARNING, "Button pressed. Aborted\n");
break;
case PM3_ESTATIC_NONCE:
PrintAndLogEx(ERR, "Error: Static encrypted nonce detected. Aborted\n");
PrintAndLogEx(ERR, "Static encrypted nonce detected. Aborted\n");
PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("script run fm11rf08s_recovery.py") "`");
break;
case PM3_EFAILED: {
PrintAndLogEx(FAILED, "\nFailed to recover a key...");
@ -3279,7 +3282,8 @@ noValidKeyFound:
}
if (has_staticnonce == NONCE_STATIC_ENC) {
PrintAndLogEx(HINT, "Hint: Static encrypted nonce detected, run `" _YELLOW_("script run fm11rf08s_recovery.py") "`");
PrintAndLogEx(ERR, "Static encrypted nonce detected. Aborted\n");
PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("script run fm11rf08s_recovery.py") "`");
}
DropField();
@ -3431,7 +3435,8 @@ tryNested:
break;
}
case PM3_ESTATIC_NONCE: {
PrintAndLogEx(ERR, "Error: Static encrypted nonce detected. Aborted\n");
PrintAndLogEx(ERR, "Static encrypted nonce detected. Aborted\n");
PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("script run fm11rf08s_recovery.py") "`");
e_sector[current_sector_i].Key[current_key_type_i] = 0xffffffffffff;
e_sector[current_sector_i].foundKey[current_key_type_i] = false;
@ -10617,8 +10622,6 @@ static command_t CommandTable[] = {
{"help", CmdHelp, AlwaysAvailable, "This help"},
{"list", CmdHF14AMfList, AlwaysAvailable, "List MIFARE history"},
{"-----------", CmdHelp, IfPm3Iso14443a, "----------------------- " _CYAN_("recovery") " -----------------------"},
{"info", CmdHF14AMfInfo, IfPm3Iso14443a, "mfc card Info"},
{"isen", CmdHF14AMfISEN, IfPm3Iso14443a, "mfc card Info Static Encrypted Nonces"},
{"darkside", CmdHF14AMfDarkside, IfPm3Iso14443a, "Darkside attack"},
{"nested", CmdHF14AMfNested, IfPm3Iso14443a, "Nested attack"},
{"hardnested", CmdHF14AMfNestedHard, AlwaysAvailable, "Nested attack for hardened MIFARE Classic cards"},
@ -10636,6 +10639,8 @@ static command_t CommandTable[] = {
{"auth4", CmdHF14AMfAuth4, IfPm3Iso14443a, "ISO14443-4 AES authentication"},
{"acl", CmdHF14AMfAcl, AlwaysAvailable, "Decode and print MIFARE Classic access rights bytes"},
{"dump", CmdHF14AMfDump, IfPm3Iso14443a, "Dump MIFARE Classic tag to binary file"},
{"info", CmdHF14AMfInfo, IfPm3Iso14443a, "Tag information"},
{"isen", CmdHF14AMfISEN, IfPm3Iso14443a, "Information Static Encrypted Nonces"},
{"mad", CmdHF14AMfMAD, AlwaysAvailable, "Checks and prints MAD"},
{"personalize", CmdHFMFPersonalize, IfPm3Iso14443a, "Personalize UID (MIFARE Classic EV1 only)"},
{"rdbl", CmdHF14AMfRdBl, IfPm3Iso14443a, "Read MIFARE Classic block"},

View file

@ -2152,7 +2152,7 @@ static command_t CommandTable[] = {
{"auth", CmdHFMFPAuth, IfPm3Iso14443a, "Authentication"},
{"chk", CmdHFMFPChk, IfPm3Iso14443a, "Check keys"},
{"dump", CmdHFMFPDump, IfPm3Iso14443a, "Dump MIFARE Plus tag to binary file"},
{"info", CmdHFMFPInfo, IfPm3Iso14443a, "Info about MIFARE Plus tag"},
{"info", CmdHFMFPInfo, IfPm3Iso14443a, "Tag information"},
{"mad", CmdHFMFPMAD, IfPm3Iso14443a, "Check and print MAD"},
{"rdbl", CmdHFMFPRdbl, IfPm3Iso14443a, "Read blocks from card"},
{"rdsc", CmdHFMFPRdsc, IfPm3Iso14443a, "Read sectors from card"},

View file

@ -3867,7 +3867,7 @@ static int CmdHF14AMfUCAuth(const char *Cmd) {
"Tests 3DES key on Mifare Ultralight-C tag.\n"
"If key is not specified, a set of known defaults will be tried.",
"hf mfu cauth\n"
"hf mfu cauth --key <32 hex chars>"
"hf mfu cauth --key 000102030405060708090a0b0c0d0e0f"
);
void *argtable[] = {

View file

@ -1013,8 +1013,8 @@ static int CmdHFXeroxRdBl(const char *Cmd) {
static command_t CommandTable[] = {
{"help", CmdHelp, AlwaysAvailable, "This help"},
{"list", CmdHFXeroxList, AlwaysAvailable, "List ISO-14443B history"},
{"--------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("General") " -----------------------"},
{"info", CmdHFXeroxInfo, IfPm3Iso14443b, "Short info on Fuji/Xerox tag"},
{"--------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("Operations") " -----------------------"},
{"info", CmdHFXeroxInfo, IfPm3Iso14443b, "Tag information"},
{"dump", CmdHFXeroxDump, IfPm3Iso14443b, "Read all memory pages of an Fuji/Xerox tag, save to file"},
{"reader", CmdHFXeroxReader, IfPm3Iso14443b, "Act like a Fuji/Xerox reader"},
{"view", CmdHFXeroxView, AlwaysAvailable, "Display content from tag dump file"},

View file

@ -1521,7 +1521,7 @@ static int CmdHelp(const char *Cmd);
static command_t CommandTable[] = {
{"help", CmdHelp, AlwaysAvailable, "This help"},
{"brute", CmdEM4x70Brute, IfPm3EM4x70, "Bruteforce EM4X70 to find partial key"},
{"info", CmdEM4x70Info, IfPm3EM4x70, "Tag information EM4x70"},
{"info", CmdEM4x70Info, IfPm3EM4x70, "Tag information"},
{"write", CmdEM4x70Write, IfPm3EM4x70, "Write EM4x70"},
{"unlock", CmdEM4x70Unlock, IfPm3EM4x70, "Unlock EM4x70 for writing"},
{"auth", CmdEM4x70Auth, IfPm3EM4x70, "Authenticate EM4x70"},

View file

@ -2468,7 +2468,7 @@ static command_t CommandTable[] = {
{"hts", CmdLFHitagS, AlwaysAvailable, "{ Hitag S/8211 operations }"},
{"htu", CmdLFHitagU, AlwaysAvailable, "{ Hitag µ/8265 operations }"},
{"-----------", CmdHelp, IfPm3Hitag, "------------------------ " _CYAN_("General") " ------------------------"},
{"info", CmdLFHitagInfo, IfPm3Hitag, "Hitag 2 tag information"},
{"info", CmdLFHitagInfo, IfPm3Hitag, "Tag information"},
{"reader", CmdLFHitagReader, IfPm3Hitag, "Act like a Hitag 2 reader"},
{"test", CmdLFHitag2Selftest, AlwaysAvailable, "Perform self tests"},
{"-----------", CmdHelp, IfPm3Hitag, "----------------------- " _CYAN_("Operations") " -----------------------"},

View file

@ -343,8 +343,6 @@ const static vocabulary_t vocabulary[] = {
{ 0, "hf lto wrbl" },
{ 1, "hf mf help" },
{ 1, "hf mf list" },
{ 0, "hf mf info" },
{ 0, "hf mf isen" },
{ 0, "hf mf darkside" },
{ 0, "hf mf nested" },
{ 1, "hf mf hardnested" },
@ -360,6 +358,8 @@ const static vocabulary_t vocabulary[] = {
{ 0, "hf mf auth4" },
{ 1, "hf mf acl" },
{ 0, "hf mf dump" },
{ 0, "hf mf info" },
{ 0, "hf mf isen" },
{ 1, "hf mf mad" },
{ 0, "hf mf personalize" },
{ 0, "hf mf rdbl" },