From 080ff30a9e3e8bc5cdc66ba225ac9cc301810cda Mon Sep 17 00:00:00 2001 From: midnitesnake Date: Tue, 18 Mar 2014 07:41:02 +0000 Subject: [PATCH 1/2] Added Unique Code to EM41x --- client/cmdlfem4x.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/cmdlfem4x.c b/client/cmdlfem4x.c index bd6137ac..287083e8 100644 --- a/client/cmdlfem4x.c +++ b/client/cmdlfem4x.c @@ -35,6 +35,7 @@ int CmdEM410xRead(const char *Cmd) int i, j, clock, header, rows, bit, hithigh, hitlow, first, bit2idx, high, low; int parity[4]; char id[11]; + char id2[11]; int retested = 0; uint8_t BitStream[MAX_GRAPH_TRACE_LEN]; high = low = 0; @@ -101,6 +102,7 @@ retest: { /* Read another byte! */ sprintf(id+rows, "%x", (8 * BitStream[i]) + (4 * BitStream[i+1]) + (2 * BitStream[i+2]) + (1 * BitStream[i+3])); + sprintf(id+rows, "%x", (8 * BitStream[i+3]) + (4 * BitStream[i+2]) + (2 * BitStream[i+1]) + (1 * BitStream[i])); rows++; /* Keep parity info */ @@ -135,6 +137,7 @@ retest: { /* Sweet! */ PrintAndLog("EM410x Tag ID: %s", id); + PrintAndLog("Unique Tag ID: %s", id); /* Stop any loops */ return 1; From cb967ea9768ea1132cac8e4b24c8f55c56f55ef1 Mon Sep 17 00:00:00 2001 From: midnitesnake Date: Tue, 18 Mar 2014 07:42:54 +0000 Subject: [PATCH 2/2] Added Unique Code to EM41x --- client/cmdlfem4x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cmdlfem4x.c b/client/cmdlfem4x.c index 287083e8..a7312d21 100644 --- a/client/cmdlfem4x.c +++ b/client/cmdlfem4x.c @@ -102,7 +102,7 @@ retest: { /* Read another byte! */ sprintf(id+rows, "%x", (8 * BitStream[i]) + (4 * BitStream[i+1]) + (2 * BitStream[i+2]) + (1 * BitStream[i+3])); - sprintf(id+rows, "%x", (8 * BitStream[i+3]) + (4 * BitStream[i+2]) + (2 * BitStream[i+1]) + (1 * BitStream[i])); + sprintf(id2+rows, "%x", (8 * BitStream[i+3]) + (4 * BitStream[i+2]) + (2 * BitStream[i+1]) + (1 * BitStream[i])); rows++; /* Keep parity info */ @@ -137,7 +137,7 @@ retest: { /* Sweet! */ PrintAndLog("EM410x Tag ID: %s", id); - PrintAndLog("Unique Tag ID: %s", id); + PrintAndLog("Unique Tag ID: %s", id2); /* Stop any loops */ return 1;