Fixed support to clone Pyramic, Paradox and Awid on EM4x05

This commit is contained in:
Philippe Teuwen 2022-04-30 00:04:49 +02:00
commit c1c093af62
6 changed files with 22 additions and 0 deletions

View file

@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
## [unreleased][unreleased]
- Fixed support to clone Pyramic, Paradox and Awid on EM4x05 (@doegox)
- Added support to clone Viking and EM410x on EM4x05 (@doegox)
- Fixed `lf config --reset` - averaging is set to 1 rather than 0 (@wh201906)
- Added standalone mode for sniffing 14b (@jacopo-j)

View file

@ -373,6 +373,7 @@ static int CmdAWIDClone(const char *Cmd) {
// EM4305
if (em) {
PrintAndLogEx(WARNING, "Beware some EM4305 tags don't support FSK and datarate = RF/50, check your tag copy!");
blocks[0] = EM4305_AWID_CONFIG_BLOCK;
snprintf(cardtype, sizeof(cardtype), "EM4305/4469");
}
@ -391,6 +392,14 @@ static int CmdAWIDClone(const char *Cmd) {
blocks[2] = bytebits_to_byte(bits + 32, 32);
blocks[3] = bytebits_to_byte(bits + 64, 32);
// EM4305
if (em) {
// invert FSK data
for (uint8_t i = 1; i < ARRAYLEN(blocks) ; i++) {
blocks[i] = blocks[i] ^ 0xFFFFFFFF;
}
}
free(bits);
PrintAndLogEx(INFO, "Preparing to clone AWID %u to " _YELLOW_("%s") " with FC: " _GREEN_("%u") " CN: " _GREEN_("%u"), fmtlen, cardtype, fc, cn);

View file

@ -182,6 +182,7 @@ static int CmdDestronClone(const char *Cmd) {
// EM4305
if (em) {
PrintAndLogEx(WARNING, "Beware some EM4305 tags don't support FSK and datarate = RF/50, check your tag copy!");
blocks[0] = EM4305_DESTRON_CONFIG_BLOCK;
snprintf(cardtype, sizeof(cardtype), "EM4305/4469");
}

View file

@ -419,6 +419,7 @@ static int CmdHIDClone(const char *Cmd) {
// EM4305
if (em) {
PrintAndLogEx(WARNING, "Beware some EM4305 tags don't support FSK and datarate = RF/50, check your tag copy!");
snprintf(cardtype, sizeof(cardtype), "EM4305/4469");
}

View file

@ -275,7 +275,12 @@ static int CmdParadoxClone(const char *Cmd) {
// EM4305
if (em) {
PrintAndLogEx(WARNING, "Beware some EM4305 tags don't support FSK and datarate = RF/50, check your tag copy!");
blocks[0] = EM4305_PARADOX_CONFIG_BLOCK;
// invert FSK data
for (uint8_t i = 1; i < ARRAYLEN(blocks); i++) {
blocks[i] = blocks[i] ^ 0xFFFFFFFF;
}
snprintf(cardtype, sizeof(cardtype), "EM4305/4469");
}

View file

@ -327,7 +327,12 @@ static int CmdPyramidClone(const char *Cmd) {
}
// EM4305
if (em) {
PrintAndLogEx(WARNING, "Beware some EM4305 tags don't support FSK and datarate = RF/50, check your tag copy!");
blocks[0] = EM4305_PYRAMID_CONFIG_BLOCK;
// invert FSK data
for (uint8_t i = 1; i < ARRAYLEN(blocks) ; i++) {
blocks[i] = blocks[i] ^ 0xFFFFFFFF;
}
snprintf(cardtype, sizeof(cardtype), "EM4305/4469");
}