FIX: 'mfu authentication' bug where the pack-length was wrong

ADD: 'hf mfu restore'  - added a restore from file command, see helptext for instructions
CHG: some help-text updates and refactored to functions
CHG: 'hf mfu gen'  - added the possibility to read uid from card as input
CHG: 'hf mfu dump' - refactored out the dump-printing
This commit is contained in:
iceman1001 2017-07-13 13:10:46 +02:00
commit 7cf0bf19e5
4 changed files with 407 additions and 201 deletions

View file

@ -4,6 +4,17 @@
#ifndef CMDHFMFU_H__
#define CMDHFMFU_H__
typedef struct {
uint8_t version[8];
uint8_t tbo[2];
uint8_t tearing[3];
uint8_t pack[2];
uint8_t tbo1[1];
uint8_t signature[32];
//uint8_t counter[3];
uint8_t data[1024];
} mfu_dump_t;
extern int CmdHF14AMfUWrBl(const char *Cmd);
extern int CmdHF14AMfURdBl(const char *Cmd);
@ -16,6 +27,7 @@ extern int CmdHF14AMfuPwdGen(const char *Cmd);
//general stuff
extern int CmdHF14AMfUDump(const char *Cmd);
extern int CmdHF14AMfURestore(const char *Cmd);
extern int CmdHF14AMfUInfo(const char *Cmd);
extern int CmdHF14AMfUeLoad(const char *Cmd);
extern int CmdHF14AMfUSim(const char *Cmd);
@ -24,6 +36,9 @@ extern uint32_t GetHF14AMfU_Type(void);
extern int ul_print_type(uint32_t tagtype, uint8_t spacer);
extern void ul_switch_off_field(void);
void printMFUdump(mfu_dump_t* card);
void printMFUdumpEx(mfu_dump_t* card, uint16_t pages, uint8_t startpage);
extern int usage_hf_mfu_info(void);
extern int usage_hf_mfu_dump(void);
extern int usage_hf_mfu_rdbl(void);
@ -77,4 +92,5 @@ typedef enum TAGTYPE_UL {
UL_ERROR = 0xFFFFFF,
} TagTypeUL_t;
#endif