]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfem4x.c
Fix description in help dump
[proxmark3-svn] / client / cmdlfem4x.c
index 862f20bdcac74bc45251dab3ebb368f448912f7e..a7312d21b81a21a148c7cfe1e0e95f5b4db021d3 100644 (file)
@@ -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(id2+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", id2);
 
         /* Stop any loops */
         return 1;
@@ -257,8 +260,11 @@ int CmdEM410xWatch(const char *Cmd)
                //   is very slow
                // TBD: Auto-grow sample size based on detected sample rate.  IE: If the
                //   rate gets lower, then grow the number of samples
-               CmdSamples("4000");
-  } while ( ! CmdEM410xRead(""));
+
+    // Changed by martin, 4000 x 4 = 16000, 
+    // see http://www.proxmark.org/forum/viewtopic.php?pid=7235#p7235
+               CmdSamples("16000");
+ } while ( ! CmdEM410xRead(""));
   return 0;
 }
 
@@ -409,7 +415,7 @@ int CmdEM4x50Read(const char *Cmd)
 int CmdEM410xWrite(const char *Cmd)
 {
   uint64_t id = 0xFFFFFFFFFFFFFFFF; // invalid id value
-  unsigned int card = 0xFF; // invalid card value
+  int card = 0xFF; // invalid card value
        unsigned int clock = 0; // invalid clock value
 
        sscanf(Cmd, "%" PRIx64 " %d %d", &id, &card, &clock);
Impressum, Datenschutz