diff --git a/client/src/cmdlfkeri.c b/client/src/cmdlfkeri.c index b1a73cc9d..d05c159c0 100644 --- a/client/src/cmdlfkeri.c +++ b/client/src/cmdlfkeri.c @@ -137,11 +137,16 @@ static int CmdKeriMSScramble(KeriMSScramble_t Action, uint32_t *FC, uint32_t *ID static int CmdKeriDemod(const char *Cmd) { (void)Cmd; // Cmd is not used so far + return demodKeri(); +} + +int demodKeri(void) { if (PSKDemod("", false) != PM3_SUCCESS) { PrintAndLogEx(DEBUG, "DEBUG: Error - KERI: PSK1 Demod failed"); return PM3_ESOFT; } + bool invert = false; size_t size = DemodBufferLen; int idx = detectKeri(DemodBuffer, &size, &invert); @@ -207,6 +212,8 @@ static int CmdKeriDemod(const char *Cmd) { return PM3_SUCCESS; } + + static int CmdKeriRead(const char *Cmd) { lf_read(false, 10000); return CmdKeriDemod(Cmd); @@ -382,7 +389,3 @@ int detectKeri(uint8_t *dest, size_t *size, bool *invert) { return (int)startIdx; } -int demodKeri(void) { - return CmdKeriDemod(""); -} - diff --git a/client/src/cmdlft55xx.c b/client/src/cmdlft55xx.c index 5607b52a5..13693ffc7 100644 --- a/client/src/cmdlft55xx.c +++ b/client/src/cmdlft55xx.c @@ -2049,13 +2049,13 @@ static void printT5x7KnownBlock0(uint32_t b0) { snprintf(s + strlen(s), sizeof(s) - strlen(s), "FDXB "); break; case T55X7_HID_26_CONFIG_BLOCK: - snprintf(s + strlen(s), sizeof(s) - strlen(s), "HID 26b (ProxCard), Paradox "); + snprintf(s + strlen(s), sizeof(s) - strlen(s), "HID 26b (ProxCard), Paradox, AWID "); break; case T55X7_PYRAMID_CONFIG_BLOCK: snprintf(s + strlen(s), sizeof(s) - strlen(s), "Pyramid "); break; case T55X7_INDALA_64_CONFIG_BLOCK: - snprintf(s + strlen(s), sizeof(s) - strlen(s), "Indala 64"); + snprintf(s + strlen(s), sizeof(s) - strlen(s), "Indala 64, Motorola"); break; case T55X7_INDALA_224_CONFIG_BLOCK: snprintf(s + strlen(s), sizeof(s) - strlen(s), "Indala 224 "); @@ -2066,7 +2066,7 @@ static void printT5x7KnownBlock0(uint32_t b0) { case T55X7_VIKING_CONFIG_BLOCK: snprintf(s + strlen(s), sizeof(s) - strlen(s), "Viking "); break; - case T55X7_NORALYS_CONFIG_BLOCK: + case T55X7_NORALSY_CONFIG_BLOCK: snprintf(s + strlen(s), sizeof(s) - strlen(s), "Noralys "); break; case T55X7_IOPROX_CONFIG_BLOCK: @@ -2082,20 +2082,32 @@ static void printT5x7KnownBlock0(uint32_t b0) { snprintf(s + strlen(s), sizeof(s) - strlen(s), "Nedap 128 "); break; case T55X7_PAC_CONFIG_BLOCK: - snprintf(s + strlen(s), sizeof(s) - strlen(s), "PAC "); + snprintf(s + strlen(s), sizeof(s) - strlen(s), "PAC/Stanley "); break; case T55X7_VERICHIP_CONFIG_BLOCK: snprintf(s + strlen(s), sizeof(s) - strlen(s), "Verichip "); break; case T55X7_VISA2000_CONFIG_BLOCK: snprintf(s + strlen(s), sizeof(s) - strlen(s), "VISA2000 "); - break; + break; + case T55X7_JABLOTRON_CONFIG_BLOCK: + snprintf(s + strlen(s), sizeof(s) - strlen(s), "Jablotron "); + break; + case T55X7_KERI_CONFIG_BLOCK: + snprintf(s + strlen(s), sizeof(s) - strlen(s), "KERI "); + break; + case T55X7_SECURAKEY_CONFIG_BLOCK: + snprintf(s + strlen(s), sizeof(s) - strlen(s), "SecuraKey "); + break; + case T55X7_NEXWATCH_CONFIG_BLOCK: + snprintf(s + strlen(s), sizeof(s) - strlen(s), "NexWatch, Quadrakey "); + break; default: break; } if (strlen(s) > 0) - PrintAndLogEx(NORMAL, "\n Config block match : " _YELLOW_("%s"), s); + PrintAndLogEx(SUCCESS, "\nConfig block match : " _YELLOW_("%s"), s); } static int CmdT55xxInfo(const char *Cmd) { diff --git a/client/src/cmdlft55xx.h b/client/src/cmdlft55xx.h index 5e84a85c4..155e23c77 100644 --- a/client/src/cmdlft55xx.h +++ b/client/src/cmdlft55xx.h @@ -27,10 +27,11 @@ #define T55X7_RAW_CONFIG_BLOCK 0x000880E0 // ASK, compat mode, data rate 32, manchester, 7 data blocks #define T55X7_EM_UNIQUE_CONFIG_BLOCK 0x00148040 // ASK, EM4x02/unique - compat mode, manchester, data rate 64, 2 data blocks #define T55X7_EM_PAXTON_CONFIG_BLOCK 0x00148040 // ASK, EM4x02/paxton - compat mode, manchester, data rate 64, 2 data blocks -#define T55X7_VISA2000_CONFIG_BLOCK 0x00148068 // ASK, data raet +#define T55X7_VISA2000_CONFIG_BLOCK 0x00148068 // ASK, data rate 64, 3 data blocks, STT #define T55X7_VIKING_CONFIG_BLOCK 0x00088040 // ASK, compat mode, data rate 32, Manchester, 2 data blocks -#define T55X7_NORALYS_CONFIG_BLOCK 0x00088C6A // ASK, compat mode, (NORALYS - KCP3000), data rate 32, 3 data blocks +#define T55X7_NORALSY_CONFIG_BLOCK 0x00088C6A // ASK, compat mode, (NORALSY - KCP3000), data rate 32, 3 data blocks #define T55X7_PRESCO_CONFIG_BLOCK 0x00088088 // ASK, data rate 32, Manchester, 4 data blocks, STT +#define T55X7_SECURAKEY_CONFIG_BLOCK 0x000C8060 // ASK, Manchester, data rate 40, 3 data blocks // FDXB requires data inversion and BiPhase 57 is simply BiPhase 50 inverted, so we can either do it using the modulation scheme or the inversion flag // we've done both below to prove that it works either way, and the modulation value for BiPhase 50 in the Atmel data sheet of binary "10001" (17) is a typo, @@ -41,20 +42,28 @@ #define T55X7_HID_26_CONFIG_BLOCK 0x00107060 // FSK2a, hid 26 bit - compat mode, data rate 50, 3 data blocks #define T55X7_PARADOX_CONFIG_BLOCK 0x00107060 // FSK2a, hid 26 bit - compat mode, data rate 50, 3 data blocks +#define T55X7_AWID_CONFIG_BLOCK 0x00107060 // FSK2a, hid 26 bit - compat mode, data rate 50, 3 data blocks #define T55X7_PYRAMID_CONFIG_BLOCK 0x00107080 // FSK2a, Pyramid 26 bit - compat mode, data rate 50, 4 data blocks +#define T55X7_IOPROX_CONFIG_BLOCK 0x00147040 // FSK2a, data rate 64, 2 data blocks + #define T55X7_INDALA_64_CONFIG_BLOCK 0x00081040 // PSK1, indala 64 bit - compat mode, psk carrier FC * 2, data rate 32, maxblock 2 #define T55X7_INDALA_224_CONFIG_BLOCK 0x000810E0 // PSK1, indala 224 bit - compat mode, psk carrier FC * 2, data rate 32, maxblock 7 -#define T55X7_IOPROX_CONFIG_BLOCK 0x00147040 // FSK2a, data rate 64, 2 data blocks +#define T55X7_MOTOROLA_CONFIG_BLOCK 0x00081040 // PSK1, data rate 32, 2 data blocks +#define T55X7_NEXWATCH_CONFIG_BLOCK 0x00081060 // PSK1 data rate 16, psk carrier FC * 2, 3 data blocks +#define T55X7_KERI_CONFIG_BLOCK 0x603E1040 // PSK1, 2 data blocks + +#define T55X7_JABLOTRON_CONFIG_BLOCK 0x00158040 // Biphase, data rate 64, 2 data blocks #define T55X7_GUARDPROXII_CONFIG_BLOCK 0x00150060 // Biphase, data rate 64, Direct modulation, 3 data blocks #define T55X7_NEDAP_64_CONFIG_BLOCK 0x907f0042 // BiPhase, data rate 64, 2 data blocks #define T55X7_NEDAP_128_CONFIG_BLOCK 0x907f0082 // BiPhase, data rate 64, 4 data blocks #define T55X7_PAC_CONFIG_BLOCK 0x00080080 // NRZ, data rate 32, 4 data blocks #define T55X7_VERICHIP_CONFIG_BLOCK 0x000C0080 // NRZ, data rate 40, 4 data blocks - #define T55X7_bin 0b0010 +// Q5 / Termic / T5555 #define T5555_DEFAULT_CONFIG_BLOCK 0x6001F004 // ASK, data rate 64, manchester, 2 data blocks? + typedef enum { T55x7_RAW = 0x00, T55x7_DEFAULT = 0x00,