mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
add cli parser option
This commit is contained in:
parent
7e2fd2a953
commit
be128741e3
2 changed files with 18 additions and 0 deletions
|
@ -103,6 +103,15 @@ const CLIParserOption DesfireValueFileOperOpts[] = {
|
||||||
{0, NULL},
|
{0, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const CLIParserOption DesfireReadFileTypeOpts[] = {
|
||||||
|
{RFTAuto, "auto"},
|
||||||
|
{RFTData, "data"},
|
||||||
|
{RFTValue, "value"},
|
||||||
|
{RFTRecord, "record"},
|
||||||
|
{RFTMAC, "mac"},
|
||||||
|
{0, NULL},
|
||||||
|
};
|
||||||
|
|
||||||
static const char *getstatus(uint16_t *sw) {
|
static const char *getstatus(uint16_t *sw) {
|
||||||
if (sw == NULL) return "--> sw argument error. This should never happen !";
|
if (sw == NULL) return "--> sw argument error. This should never happen !";
|
||||||
if (((*sw >> 8) & 0xFF) == 0x91) {
|
if (((*sw >> 8) & 0xFF) == 0x91) {
|
||||||
|
|
|
@ -28,6 +28,14 @@ typedef struct {
|
||||||
const bool mayHaveISOfid;
|
const bool mayHaveISOfid;
|
||||||
} DesfireCreateFileCommandsS;
|
} DesfireCreateFileCommandsS;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
RFTAuto,
|
||||||
|
RFTData,
|
||||||
|
RFTValue,
|
||||||
|
RFTRecord,
|
||||||
|
RFTMAC,
|
||||||
|
} DesfireReadOpFileType;
|
||||||
|
|
||||||
extern const CLIParserOption DesfireAlgoOpts[];
|
extern const CLIParserOption DesfireAlgoOpts[];
|
||||||
extern const CLIParserOption DesfireKDFAlgoOpts[];
|
extern const CLIParserOption DesfireKDFAlgoOpts[];
|
||||||
extern const CLIParserOption DesfireCommunicationModeOpts[];
|
extern const CLIParserOption DesfireCommunicationModeOpts[];
|
||||||
|
@ -35,6 +43,7 @@ extern const CLIParserOption DesfireCommandSetOpts[];
|
||||||
extern const CLIParserOption DesfireSecureChannelOpts[];
|
extern const CLIParserOption DesfireSecureChannelOpts[];
|
||||||
extern const CLIParserOption DesfireFileAccessModeOpts[];
|
extern const CLIParserOption DesfireFileAccessModeOpts[];
|
||||||
extern const CLIParserOption DesfireValueFileOperOpts[];
|
extern const CLIParserOption DesfireValueFileOperOpts[];
|
||||||
|
extern const CLIParserOption DesfireReadFileTypeOpts[];
|
||||||
|
|
||||||
const char *DesfireGetErrorString(int res, uint16_t *sw);
|
const char *DesfireGetErrorString(int res, uint16_t *sw);
|
||||||
uint32_t DesfireAIDByteToUint(uint8_t *data);
|
uint32_t DesfireAIDByteToUint(uint8_t *data);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue