mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
making a 14a select fct reachable, in order to do a test in desfire code without repeating same ftc
This commit is contained in:
parent
8243ac9749
commit
0d1f8ca957
3 changed files with 19 additions and 2 deletions
|
@ -843,7 +843,7 @@ int ExchangeRAW14a(uint8_t *datain, int datainlen, bool activateField, bool leav
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int SelectCard14443_4(bool disconnect, iso14a_card_select_t *card) {
|
||||
int SelectCard14443_4(bool disconnect, iso14a_card_select_t *card) {
|
||||
PacketResponseNG resp;
|
||||
|
||||
frameLength = 0;
|
||||
|
@ -862,7 +862,7 @@ static int SelectCard14443_4(bool disconnect, iso14a_card_select_t *card) {
|
|||
|
||||
// check result
|
||||
if (resp.oldarg[0] == 0) {
|
||||
PrintAndLogEx(ERR, "No card in fiel.");
|
||||
PrintAndLogEx(ERR, "No card in field");
|
||||
return PM3_ECARDEXCHANGE;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,4 +34,5 @@ int Hf14443_4aGetCardData(iso14a_card_select_t *card);
|
|||
int ExchangeAPDU14a(uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen);
|
||||
int ExchangeRAW14a(uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen, bool silentMode);
|
||||
|
||||
int SelectCard14443_4(bool disconnect, iso14a_card_select_t *card);
|
||||
#endif
|
||||
|
|
|
@ -3604,6 +3604,22 @@ static int CmdHF14ADesInfo(const char *Cmd) {
|
|||
}
|
||||
PrintAndLogEx(INFO, "-------------------------------------------------------------");
|
||||
}
|
||||
|
||||
|
||||
iso14a_card_select_t card;
|
||||
res = SelectCard14443_4(true, &card);
|
||||
if (res == PM3_SUCCESS) {
|
||||
static const char STANDALONE_DESFIRE[] = { 0x75, 0x77, 0x81, 0x02};
|
||||
static const char JCOP_DESFIRE[] = { 0x75, 0xf7, 0xb1, 0x02 };
|
||||
|
||||
if (str_startswith((const char*)card.ats + 1, STANDALONE_DESFIRE)) {
|
||||
PrintAndLogEx(INFO, "Standalone DESFire");
|
||||
}
|
||||
if (str_startswith((const char*)card.ats + 1, JCOP_DESFIRE)) {
|
||||
PrintAndLogEx(INFO, "JCOP DESFire");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Card Master key (CMK) 0x00 AID = 00 00 00 (card level)
|
||||
Application Master Key (AMK) 0x00 AID != 00 00 00
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue