add Get UID command
This commit is contained in:
1 parent
e2303a8bdc
commit
c99002c5e0
2 files changed
+11
No files matched your search
@@ -872,6 +872,16 @@ int DesfireAuthenticate(DesfireContext *dctx, DesfireSecureChannel secureChannel
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
int DesfireGetUID(DesfireContext *dctx, uint8_t *resp, size_t *resplen) {
|
||||
uint8_t respcode = 0xff;
|
||||
int res = DesfireExchange(dctx, MFDES_GET_UID, NULL, 0, &respcode, resp, resplen);
|
||||
if (res != PM3_SUCCESS)
|
||||
return res;
|
||||
if (respcode != MFDES_S_OPERATION_OK)
|
||||
return PM3_EAPDU_FAIL;
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
int DesfireGetAIDList(DesfireContext *dctx, uint8_t *resp, size_t *resplen) {
|
||||
uint8_t respcode = 0xff;
|
||||
int res = DesfireExchange(dctx, MFDES_GET_APPLICATION_IDS, NULL, 0, &respcode, resp, resplen);
|
||||
|
||||
@@ -39,6 +39,7 @@ int DesfireSelectAIDHex(DesfireContext *ctx, uint32_t aid1, bool select_two, uin
|
||||
|
||||
int DesfireAuthenticate(DesfireContext *dctx, DesfireSecureChannel secureChannel);
|
||||
|
||||
int DesfireGetUID(DesfireContext *dctx, uint8_t *resp, size_t *resplen);
|
||||
int DesfireGetAIDList(DesfireContext *dctx, uint8_t *resp, size_t *resplen);
|
||||
int DesfireGetDFList(DesfireContext *dctx, uint8_t *resp, size_t *resplen);
|
||||
|
||||
|
||||
Reference in new issue
Block a user