mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-22 22:33:48 -07:00
select command refactoring
This commit is contained in:
parent
b8ce6676ef
commit
d80656ef53
2 changed files with 1 additions and 11 deletions
|
@ -3102,7 +3102,6 @@ static int CmdHF14ADesSelectApp(const char *Cmd) {
|
||||||
PrintAndLogEx(SUCCESS, "Application 0x%06x selected " _GREEN_("succesfully") " ", appid);
|
PrintAndLogEx(SUCCESS, "Application 0x%06x selected " _GREEN_("succesfully") " ", appid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DropField();
|
DropField();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2176,17 +2176,8 @@ int DesfireSetConfiguration(DesfireContext *dctx, uint8_t paramid, uint8_t *para
|
||||||
}
|
}
|
||||||
|
|
||||||
int DesfireISOSelect(DesfireContext *dctx, char *dfname, uint8_t *resp, size_t *resplen) {
|
int DesfireISOSelect(DesfireContext *dctx, char *dfname, uint8_t *resp, size_t *resplen) {
|
||||||
sAPDU apdu = {0};
|
|
||||||
apdu.CLA = 0x00;
|
|
||||||
apdu.INS = ISO7816_SELECT_FILE;
|
|
||||||
apdu.P1 = 0x04;
|
|
||||||
apdu.P2 = 0x00;
|
|
||||||
apdu.Lc = strnlen(dfname, 16);
|
|
||||||
apdu.data = (uint8_t *)dfname;
|
|
||||||
|
|
||||||
uint16_t sw = 0;
|
uint16_t sw = 0;
|
||||||
int res = DesfireExchangeISO(true, dctx, apdu, APDU_INCLUDE_LE_00, resp, resplen, &sw);
|
int res = DesfireExchangeISO(true, dctx, (sAPDU) {0x00, ISO7816_SELECT_FILE, 0x04, 0x00, strnlen(dfname, 16), (uint8_t *)dfname}, APDU_INCLUDE_LE_00, resp, resplen, &sw);
|
||||||
|
|
||||||
if (res == PM3_SUCCESS && sw != 0x9000)
|
if (res == PM3_SUCCESS && sw != 0x9000)
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue