mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-08-29 01:08:21 +00:00
no table when no AID found
This commit is contained in:
@@ -799,6 +799,16 @@ static int CmdEMVSearch(const char *Cmd) {
|
||||
struct tlvdb *t = tlvdb_fixed(1, strlen(al), (const unsigned char *)al);
|
||||
|
||||
if (EMVSearch(channel, activateField, leaveSignalON, decodeTLV, t, false)) {
|
||||
|
||||
PrintAndLogEx(FAILED, "Search failed, no answer from the card");
|
||||
|
||||
// Without activation the ARM never reads the ATR, so it does not know
|
||||
// which protocols the card offers and cannot redirect a T=0 request to
|
||||
// a T=1 only card. That used to end here without a word.
|
||||
if ((channel == CC_CONTACT) && (activateField == false)) {
|
||||
PrintAndLogEx(HINT, "Hint: the card is activated by `" _YELLOW_("-s") "`, try `" _YELLOW_("emv search -w -s") "`");
|
||||
}
|
||||
|
||||
tlvdb_free(t);
|
||||
SetAPDULogging(false);
|
||||
return PM3_ERFTRANS;
|
||||
|
||||
@@ -266,6 +266,11 @@ void TLVPrintAIDlistFromSelectTLV(struct tlvdb *tlv) {
|
||||
ttmp = tlvdb_find_next(ttmp, 0x6f);
|
||||
}
|
||||
|
||||
if (n == 0) {
|
||||
PrintAndLogEx(INFO, "No applications found");
|
||||
return;
|
||||
}
|
||||
|
||||
size_t w_aid = strlen("AID");
|
||||
size_t w_prio = strlen("Priority");
|
||||
size_t w_name = strlen("Name");
|
||||
@@ -289,10 +294,6 @@ void TLVPrintAIDlistFromSelectTLV(struct tlvdb *tlv) {
|
||||
(int)w_aid, "AID", (int)w_prio, "Priority", (int)w_name, "Name");
|
||||
PrintAndLogEx(INFO, "%s", rule);
|
||||
|
||||
if (n == 0) {
|
||||
PrintAndLogEx(INFO, "| %-*s |", (int)(w_aid + w_prio + w_name + 6), "none");
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
PrintAndLogEx(INFO, "| " _YELLOW_("%-*s") " | %-*s | " _CYAN_("%-*s") " |",
|
||||
(int)w_aid, rows[i].aid,
|
||||
|
||||
Reference in New Issue
Block a user