mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-31 17:36:27 +08:00
formatpicc command
This commit is contained in:
parent
8fa1fbfedf
commit
e03501bc86
2 changed files with 13 additions and 0 deletions
client/src/mifare
|
@ -901,6 +901,18 @@ int DesfireAuthenticate(DesfireContext *dctx, DesfireSecureChannel secureChannel
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int DesfireFormatPICC(DesfireContext *dctx) {
|
||||||
|
uint8_t respcode = 0xff;
|
||||||
|
uint8_t resp[257] = {0};
|
||||||
|
size_t resplen = 0;
|
||||||
|
int res = DesfireExchange(dctx, MFDES_GET_UID, NULL, 0, &respcode, resp, &resplen);
|
||||||
|
if (res != PM3_SUCCESS)
|
||||||
|
return res;
|
||||||
|
if (respcode != MFDES_S_OPERATION_OK || resplen != 0)
|
||||||
|
return PM3_EAPDU_FAIL;
|
||||||
|
return PM3_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
int DesfireGetUID(DesfireContext *dctx, uint8_t *resp, size_t *resplen) {
|
int DesfireGetUID(DesfireContext *dctx, uint8_t *resp, size_t *resplen) {
|
||||||
uint8_t respcode = 0xff;
|
uint8_t respcode = 0xff;
|
||||||
int res = DesfireExchange(dctx, MFDES_GET_UID, NULL, 0, &respcode, resp, resplen);
|
int res = DesfireExchange(dctx, MFDES_GET_UID, NULL, 0, &respcode, resp, resplen);
|
||||||
|
|
|
@ -40,6 +40,7 @@ int DesfireSelectAIDHex(DesfireContext *ctx, uint32_t aid1, bool select_two, uin
|
||||||
int DesfireSelectAndAuthenticate(DesfireContext *dctx, DesfireSecureChannel secureChannel, uint32_t aid, bool verbose);
|
int DesfireSelectAndAuthenticate(DesfireContext *dctx, DesfireSecureChannel secureChannel, uint32_t aid, bool verbose);
|
||||||
int DesfireAuthenticate(DesfireContext *dctx, DesfireSecureChannel secureChannel);
|
int DesfireAuthenticate(DesfireContext *dctx, DesfireSecureChannel secureChannel);
|
||||||
|
|
||||||
|
int DesfireFormatPICC(DesfireContext *dctx);
|
||||||
int DesfireGetUID(DesfireContext *dctx, uint8_t *resp, size_t *resplen);
|
int DesfireGetUID(DesfireContext *dctx, uint8_t *resp, size_t *resplen);
|
||||||
int DesfireGetAIDList(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);
|
int DesfireGetDFList(DesfireContext *dctx, uint8_t *resp, size_t *resplen);
|
||||||
|
|
Loading…
Add table
Reference in a new issue