- {0x4A,0xF8,0x4B,0x19}, // PACK 0xE5,0xBE -- italian bus (sniffed)
- {0x33,0x6B,0xA1,0x19}, // PACK 0x9c,0x2d -- italian bus (sniffed)
- {0xFF,0x90,0x6C,0xB2}, // PACK 0x12,0x9e -- italian bus (sniffed)
- {0x46,0x1c,0xA3,0x19}, // PACK 0xE9,0x5A -- italian bus (sniffed)
- {0x35,0x1C,0xD0,0x19}, // PACK 0x9A,0x5a -- italian bus (sniffed)
+#define MAX_UL_TYPES 18
+uint32_t UL_TYPES_ARRAY[MAX_UL_TYPES] = {
+ UNKNOWN, UL, UL_C,
+ UL_EV1_48, UL_EV1_128, NTAG,
+ NTAG_203, NTAG_210, NTAG_212,
+ NTAG_213, NTAG_215, NTAG_216,
+ MY_D, MY_D_NFC, MY_D_MOVE,
+ MY_D_MOVE_NFC, MY_D_MOVE_LEAN, FUDAN_UL};
+
+uint8_t UL_MEMORY_ARRAY[MAX_UL_TYPES] = {
+ MAX_UL_BLOCKS, MAX_UL_BLOCKS, MAX_ULC_BLOCKS,
+ MAX_ULEV1a_BLOCKS, MAX_ULEV1b_BLOCKS, MAX_NTAG_203,
+ MAX_NTAG_203, MAX_NTAG_210, MAX_NTAG_212,
+ MAX_NTAG_213, MAX_NTAG_215, MAX_NTAG_216,
+ MAX_UL_BLOCKS, MAX_MY_D_NFC, MAX_MY_D_MOVE,
+ MAX_MY_D_MOVE, MAX_MY_D_MOVE_LEAN, MAX_UL_BLOCKS};
+
+// Certain pwd generation algo nickname A.
+uint32_t ul_ev1_pwdgenA(uint8_t* uid) {
+
+ uint8_t pos = (uid[3] ^ uid[4] ^ uid[5] ^ uid[6]) % 32;
+
+ uint32_t xortable[] = {
+ 0x4f2711c1, 0x07D7BB83, 0x9636EF07, 0xB5F4460E, 0xF271141C, 0x7D7BB038, 0x636EF871, 0x5F4468E3,
+ 0x271149C7, 0xD7BB0B8F, 0x36EF8F1E, 0xF446863D, 0x7114947A, 0x7BB0B0F5, 0x6EF8F9EB, 0x44686BD7,
+ 0x11494fAF, 0xBB0B075F, 0xEF8F96BE, 0x4686B57C, 0x1494F2F9, 0xB0B07DF3, 0xF8F963E6, 0x686B5FCC,
+ 0x494F2799, 0x0B07D733, 0x8F963667, 0x86B5F4CE, 0x94F2719C, 0xB07D7B38, 0xF9636E70, 0x6B5F44E0
+ };
+
+ uint8_t entry[] = {0x00,0x00,0x00,0x00};
+ uint8_t pwd[] = {0x00,0x00,0x00,0x00};
+
+ num_to_bytes( xortable[pos], 4, entry);