mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
add commands get file id and iso id
This commit is contained in:
parent
28b946738c
commit
edc84ed3f4
3 changed files with 25 additions and 0 deletions
|
@ -1013,6 +1013,22 @@ int DesfireSetConfigurationCmd(DesfireContext *dctx, uint8_t *data, size_t len,
|
|||
return DesfireCommand(dctx, MFDES_CHANGE_CONFIGURATION, data, len, resp, resplen, -1);
|
||||
}
|
||||
|
||||
int DesfireGetFileIDList(DesfireContext *dctx, uint8_t *resp, size_t *resplen) {
|
||||
return DesfireCommandRxData(dctx, MFDES_GET_FILE_IDS, resp, resplen, -1);
|
||||
}
|
||||
|
||||
int DesfireGetFileISOIDList(DesfireContext *dctx, uint8_t *resp, size_t *resplen) {
|
||||
return DesfireCommandRxData(dctx, MFDES_GET_ISOFILE_IDS, resp, resplen, -1);
|
||||
}
|
||||
|
||||
int DesfireCreateFile(DesfireContext *dctx, uint8_t *fdata, size_t fdatalen) {
|
||||
return DesfireCommandTxData(dctx, MFDES_CREATE_STD_DATA_FILE, fdata, fdatalen);
|
||||
}
|
||||
|
||||
int DesfireDeleteFile(DesfireContext *dctx, uint8_t fid) {
|
||||
return DesfireCommandTxData(dctx, MFDES_DELETE_FILE, &fid, 1);
|
||||
}
|
||||
|
||||
uint8_t DesfireKeyAlgoToType(DesfireCryptoAlgorythm keyType) {
|
||||
switch (keyType) {
|
||||
case T_DES:
|
||||
|
|
|
@ -61,4 +61,9 @@ int DesfireChangeKey(DesfireContext *dctx, bool change_master_key, uint8_t newke
|
|||
int DesfireSetConfigurationCmd(DesfireContext *dctx, uint8_t *data, size_t len, uint8_t *resp, size_t *resplen);
|
||||
int DesfireSetConfiguration(DesfireContext *dctx, uint8_t paramid, uint8_t *param, size_t paramlen);
|
||||
|
||||
int DesfireGetFileIDList(DesfireContext *dctx, uint8_t *resp, size_t *resplen);
|
||||
int DesfireGetFileISOIDList(DesfireContext *dctx, uint8_t *resp, size_t *resplen);
|
||||
int DesfireCreateFile(DesfireContext *dctx, uint8_t *fdata, size_t fdatalen);
|
||||
int DesfireDeleteFile(DesfireContext *dctx, uint8_t fid);
|
||||
|
||||
#endif // __DESFIRECORE_H
|
||||
|
|
|
@ -47,6 +47,8 @@ AllowedChannelModesS AllowedChannelModes[] = {
|
|||
{MFDES_ROLL_KEY_SETTINGS, DACd40, DCCNative, DCMMACed},
|
||||
{MFDES_COMMIT_READER_ID, DACd40, DCCNative, DCMMACed},
|
||||
{MFDES_FORMAT_PICC, DACd40, DCCNative, DCMMACed},
|
||||
{MFDES_GET_FILE_IDS, DACd40, DCCNative, DCMMACed},
|
||||
{MFDES_GET_ISOFILE_IDS, DACd40, DCCNative, DCMMACed},
|
||||
|
||||
{MFDES_GET_UID, DACd40, DCCNative, DCMEncrypted},
|
||||
{MFDES_CHANGE_KEY_SETTINGS, DACd40, DCCNative, DCMEncrypted},
|
||||
|
@ -65,6 +67,8 @@ AllowedChannelModesS AllowedChannelModes[] = {
|
|||
{MFDES_GET_DF_NAMES, DACEV1, DCCNative, DCMMACed},
|
||||
{MFDES_GET_KEY_SETTINGS, DACEV1, DCCNative, DCMMACed},
|
||||
{MFDES_FORMAT_PICC, DACEV1, DCCNative, DCMMACed},
|
||||
{MFDES_GET_FILE_IDS, DACEV1, DCCNative, DCMMACed},
|
||||
{MFDES_GET_ISOFILE_IDS, DACEV1, DCCNative, DCMMACed},
|
||||
|
||||
{MFDES_GET_UID, DACEV1, DCCNative, DCMEncrypted},
|
||||
{MFDES_CHANGE_KEY_SETTINGS, DACEV1, DCCNative, DCMEncrypted},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue