added there is no applications message if it there is no app)

This commit is contained in:
merlokk 2021-07-07 16:31:23 +03:00
commit 6e207be3ac

View file

@ -5217,6 +5217,8 @@ static int CmdHF14ADesGetAIDs(const char *Cmd) {
PrintAndLogEx(INFO, "---- " _CYAN_("AID list") " ----"); PrintAndLogEx(INFO, "---- " _CYAN_("AID list") " ----");
for (int i = 0; i < buflen; i += 3) for (int i = 0; i < buflen; i += 3)
PrintAndLogEx(INFO, "AID: %06x", DesfireAIDByteToUint(&buf[i])); PrintAndLogEx(INFO, "AID: %06x", DesfireAIDByteToUint(&buf[i]));
} else {
PrintAndLogEx(INFO, "There is no applications on the card");
} }
DropField(); DropField();
@ -5302,12 +5304,15 @@ static int CmdHF14ADesGetAppNames(const char *Cmd) {
buf[i * 24 + 1 + 3], buf[i * 24 + 1 + 4], buf[i * 24 + 1 + 3], buf[i * 24 + 1 + 4],
strlen((char *)&buf[i * 24 + 1 + 5]), strlen((char *)&buf[i * 24 + 1 + 5]),
&buf[i * 24 + 1 + 5]); &buf[i * 24 + 1 + 5]);
} else {
PrintAndLogEx(INFO, "There is no applications on the card");
} }
DropField(); DropField();
return PM3_SUCCESS; return PM3_SUCCESS;
} }
static command_t CommandTable[] = { static command_t CommandTable[] = {
{"help", CmdHelp, AlwaysAvailable, "This help"}, {"help", CmdHelp, AlwaysAvailable, "This help"},
{"-----------", CmdHelp, IfPm3Iso14443a, "---------------------- " _CYAN_("general") " ----------------------"}, {"-----------", CmdHelp, IfPm3Iso14443a, "---------------------- " _CYAN_("general") " ----------------------"},
@ -5340,6 +5345,8 @@ static command_t CommandTable[] = {
{"getvalue", CmdHF14ADesGetValueData, IfPm3Iso14443a, "Get value of file"}, {"getvalue", CmdHF14ADesGetValueData, IfPm3Iso14443a, "Get value of file"},
{"read", CmdHF14ADesReadData, IfPm3Iso14443a, "Read data from standard/backup/record file"}, {"read", CmdHF14ADesReadData, IfPm3Iso14443a, "Read data from standard/backup/record file"},
{"write", CmdHF14ADesWriteData, IfPm3Iso14443a, "Write data to standard/backup/record file"}, {"write", CmdHF14ADesWriteData, IfPm3Iso14443a, "Write data to standard/backup/record file"},
{"-----------", CmdHelp, IfPm3Iso14443a, "----------------------- " _CYAN_("System") " -----------------------"},
// {"test", CmdHF14ADesTest, IfPm3Iso14443a, "Test crypto"},
{NULL, NULL, NULL, NULL} {NULL, NULL, NULL, NULL}
}; };