mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-24 07:05:40 -07:00
iso check correctly select MF
This commit is contained in:
parent
8402ba3d95
commit
508e89a7a9
1 changed files with 10 additions and 5 deletions
|
@ -1380,11 +1380,16 @@ static bool DesfireCheckISOAuthCmd(uint32_t appAID, char *dfname, uint8_t keyNum
|
||||||
|
|
||||||
bool app_level = (appAID != 0x000000);
|
bool app_level = (appAID != 0x000000);
|
||||||
int res = 0;
|
int res = 0;
|
||||||
// if cant select - return false
|
|
||||||
if (dfname == NULL || strnlen(dfname, 16) == 0) {
|
if (dfname == NULL || strnlen(dfname, 16) == 0) {
|
||||||
|
if (appAID == 0x000000) {
|
||||||
|
res = DesfireISOSelect(&dctx, ISSMFDFEF, NULL, 0, NULL, NULL);
|
||||||
|
if (res != PM3_SUCCESS)
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
res = DesfireSelectAIDHex(&dctx, appAID, false, 0);
|
res = DesfireSelectAIDHex(&dctx, appAID, false, 0);
|
||||||
if (res != PM3_SUCCESS)
|
if (res != PM3_SUCCESS)
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
res = DesfireISOSelectDF(&dctx, dfname, NULL, NULL);
|
res = DesfireISOSelectDF(&dctx, dfname, NULL, NULL);
|
||||||
if (res != PM3_SUCCESS)
|
if (res != PM3_SUCCESS)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue