reworked and improved the hf mfp chk key handling. reworked the nxp_detect_card technology function to enable other parts of the client to benefit from detecting card types. Like hf mf info or hf mf autopwn - two most common used commands. Now less waiting and more easily to know what next steps to do.
This commit is contained in:
1 parent
15fbfafac1
commit
5f2edb9bb8
11 files changed
+996
-443
No files matched your search
+40
-19
@@ -20,6 +20,44 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
// Ev1 card limits
|
||||
#define MAX_NUM_KEYS 0x0F
|
||||
#define MAX_APPLICATION_COUNT 28
|
||||
#define MAX_FILE_COUNT 32
|
||||
#define MAX_FRAME_SIZE 60
|
||||
#define FRAME_PAYLOAD_SIZE (MAX_FRAME_SIZE - 5)
|
||||
|
||||
// Ev2 card limits
|
||||
// Ev3 card limits
|
||||
// Light card limits
|
||||
// Light Ev1 card limits
|
||||
|
||||
#define NOT_YET_AUTHENTICATED 0xFF
|
||||
|
||||
typedef enum {
|
||||
NXP_UNKNOWN = 0,
|
||||
DESFIRE_MF3ICD40,
|
||||
DESFIRE_EV1,
|
||||
DESFIRE_EV2,
|
||||
DESFIRE_EV2_XL,
|
||||
DESFIRE_EV3,
|
||||
DESFIRE_LIGHT,
|
||||
PLUS_EV1,
|
||||
PLUS_EV2,
|
||||
NTAG413DNA,
|
||||
NTAG424,
|
||||
DUOX,
|
||||
} nxp_cardtype_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t isOK;
|
||||
uint8_t uid[7];
|
||||
uint8_t uidlen;
|
||||
uint8_t versionHW[7];
|
||||
uint8_t versionSW[7];
|
||||
uint8_t details[14];
|
||||
} PACKED mfdes_info_res_t;
|
||||
|
||||
int CmdHFMFDes(const char *Cmd);
|
||||
|
||||
/*
|
||||
@@ -29,24 +67,7 @@ int getKeySettings(uint8_t *aid);
|
||||
*/
|
||||
|
||||
int desfire_print_signature(uint8_t *uid, uint8_t uidlen, uint8_t *signature, size_t signature_len);
|
||||
|
||||
// Ev1 card limits
|
||||
#define MAX_NUM_KEYS 0x0F
|
||||
#define MAX_APPLICATION_COUNT 28
|
||||
#define MAX_FILE_COUNT 32
|
||||
#define MAX_FRAME_SIZE 60
|
||||
#define FRAME_PAYLOAD_SIZE (MAX_FRAME_SIZE - 5)
|
||||
|
||||
// Ev2 card limits
|
||||
|
||||
// Ev3 card limits
|
||||
|
||||
// Light card limits
|
||||
|
||||
// Light Ev1 card limits
|
||||
|
||||
#define NOT_YET_AUTHENTICATED 0xFF
|
||||
|
||||
|
||||
nxp_cardtype_t getCardType(uint8_t type, uint8_t major, uint8_t minor);
|
||||
int mfdes_get_info(mfdes_info_res_t *info);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user