diff --git a/client/src/cmdlfio.c b/client/src/cmdlfio.c index bb05af40f..23172bcae 100644 --- a/client/src/cmdlfio.c +++ b/client/src/cmdlfio.c @@ -316,6 +316,9 @@ static int CmdIOProxClone(const char *Cmd) { // EM4305 if (em) { + // TODO: it seems an EM4305 tag supporting FSK still runs at RF/50 even if configured at RF/64 + // lf em 4x05 info <> lf read ; data detectclock --fs + // So, it seems cloning ioProx on EM4305 is not possible... blocks[0] = EM4305_IOPROX_CONFIG_BLOCK; snprintf(cardtype, sizeof(cardtype), "EM4305/4469"); } @@ -323,6 +326,14 @@ static int CmdIOProxClone(const char *Cmd) { blocks[1] = bytebits_to_byte(bits, 32); blocks[2] = bytebits_to_byte(bits + 32, 32); + // EM4305 + if (em) { + // invert FSK data + for (uint8_t i = 1; i < ARRAYLEN(blocks); i++) { + blocks[i] = blocks[i] ^ 0xFFFFFFFF; + } + } + PrintAndLogEx(INFO, "Preparing to clone ioProx to " _YELLOW_("%s") " with Version: " _GREEN_("%u") " FC: " _GREEN_("%u (0x%02x)") " CN: " _GREEN_("%u") , cardtype , version