fix little endian vs big endian in the macros... again... but this time correct
[RRG-proxmark3.git] / client / src / cmdhfmfu.h
blob03da49c667bcb5e1312e8a391bd3dad8aac94fee
1 #ifndef CMDHFMFU_H__
2 #define CMDHFMFU_H__
4 #include "common.h"
6 #include "mifare.h" // structs
8 // Old Ultralight/NTAG dump file format
9 // It is used only for converting
10 #define OLD_MFU_DUMP_PREFIX_LENGTH 48
12 typedef struct {
13 uint8_t version[8];
14 uint8_t tbo[2];
15 uint8_t tearing[3];
16 uint8_t pack[2];
17 uint8_t tbo1[1];
18 uint8_t signature[32];
19 //uint8_t counter[3];
20 uint8_t data[1024];
21 } PACKED old_mfu_dump_t;
23 uint32_t GetHF14AMfU_Type(void);
24 int ul_print_type(uint32_t tagtype, uint8_t spaces);
25 void printMFUdumpEx(mfu_dump_t *card, uint16_t pages, uint8_t startpage);
26 int ul_read_uid(uint8_t *uid);
28 int CmdHFMFUltra(const char *Cmd);
29 int CmdHF14MfuNDEFRead(const char *Cmd);
31 uint16_t ul_ev1_packgen_VCNEW(uint8_t *uid, uint32_t pwd);
32 uint32_t ul_ev1_otpgenA(uint8_t *uid);
34 typedef enum TAGTYPE_UL {
35 UNKNOWN = 0x000000,
36 UL = 0x1,
37 UL_C = 0x2,
38 UL_EV1_48 = 0x4,
39 UL_EV1_128 = 0x8,
40 NTAG = 0x10,
41 NTAG_203 = 0x20,
42 NTAG_210 = 0x40,
43 NTAG_212 = 0x80,
44 NTAG_213 = 0x100,
45 NTAG_215 = 0x200,
46 NTAG_216 = 0x400,
47 MY_D = 0x800,
48 MY_D_NFC = 0x1000,
49 MY_D_MOVE = 0x2000,
50 MY_D_MOVE_NFC = 0x4000,
51 MY_D_MOVE_LEAN = 0x8000,
52 NTAG_I2C_1K = 0x10000,
53 NTAG_I2C_2K = 0x20000,
54 NTAG_I2C_1K_PLUS = 0x40000,
55 NTAG_I2C_2K_PLUS = 0x80000,
56 FUDAN_UL = 0x100000,
57 MAGIC = 0x200000,
58 NTAG_213_F = 0x400000,
59 NTAG_216_F = 0x800000,
60 UL_EV1 = 0x1000000,
61 UL_NANO_40 = 0x2000000,
62 NTAG_213_TT = 0x4000000,
63 NTAG_213_C = 0x8000000,
64 MAGIC_1A = 0x10000000 | MAGIC,
65 MAGIC_1B = 0x20000000 | MAGIC,
66 MAGIC_NTAG = 0x40000000 | MAGIC,
67 NTAG_210u = 0x80000000,
68 UL_MAGIC = UL | MAGIC,
69 UL_C_MAGIC = UL_C | MAGIC,
70 UL_ERROR = 0xFFFFFF,
71 } TagTypeUL_t;
73 #endif