Skip to content

Commit

Permalink
Merge pull request #2509 from douniwan5788/0em410
Browse files Browse the repository at this point in the history
fix: all zeros is a valid Em410x too
  • Loading branch information
iceman1001 authored Sep 14, 2024
2 parents dd32fce + 8609322 commit 395d16c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions client/src/cmdlfem410x.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ static void em410x_construct_emul_graph(uint8_t *uid, uint8_t clock, uint8_t gap
// print 64 bit EM410x ID in multiple formats
void printEM410x(uint32_t hi, uint64_t id, bool verbose, int type) {

if (!id && !hi) return;

if (verbose == false) {
if (type & 0x1) { // Short ID
PrintAndLogEx(SUCCESS, "EM 410x ID "_GREEN_("%010" PRIX64), id);
Expand Down Expand Up @@ -254,11 +252,6 @@ static int ask_em410x_binary_decode(bool verbose, uint32_t *hi, uint64_t *lo, ui
return PM3_ESOFT;
}

if (!lo && !hi) {
PrintAndLogEx(DEBUG, "DEBUG: Error - Em410x decoded to all zeros");
return PM3_ESOFT;
}

PrintAndLogEx(DEBUG, "DEBUG: Em410x idx: %zu, Len: %zu, Printing DemodBuffer:", *idx, *size);
if (g_debugMode) {
printDemodBuff(0, false, false, true);
Expand Down Expand Up @@ -680,7 +673,7 @@ static int CmdEM410xClone(const char *Cmd) {
"lf em 410x clone --id 0F0368568B -> encode for T55x7 tag\n"
"lf em 410x clone --id 0F0368568B --q5 -> encode for Q5/T5555 tag\n"
"lf em 410x clone --id 0F0368568B --em -> encode for EM4305/4469\n"
"lf em 410x clone --id 0F0368568B --hts -> encode for Hitag S/8211/8268/8310"
"lf em 410x clone --id 0F0368568B --hts -> encode for Hitag S/8211/8268/8310"
);

void *argtable[] = {
Expand Down

0 comments on commit 395d16c

Please sign in to comment.