]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhf15.c
Merge branch 'master' of https://github.com/Proxmark/proxmark3
[proxmark3-svn] / client / cmdhf15.c
index ec037ce9fab76190960d50ea0ccc73ccf234f837..b843730f65fcd3dcd10a0145beed54682689d35c 100644 (file)
 #include "data.h"
 #include "graph.h"
 #include "ui.h"
 #include "data.h"
 #include "graph.h"
 #include "ui.h"
+#include "util.h"
 #include "cmdparser.h"
 #include "cmdhf15.h"
 #include "cmdparser.h"
 #include "cmdhf15.h"
-#include "../common/iso15693tools.h"
+#include "iso15693tools.h"
 #include "cmdmain.h"
 
 #define FrameSOF              Iso15693FrameSOF
 #include "cmdmain.h"
 
 #define FrameSOF              Iso15693FrameSOF
@@ -44,7 +45,6 @@
 #define Crc(data,datalen)     Iso15693Crc(data,datalen)
 #define AddCrc(data,datalen)  Iso15693AddCrc(data,datalen)
 #define sprintUID(target,uid)  Iso15693sprintUID(target,uid)
 #define Crc(data,datalen)     Iso15693Crc(data,datalen)
 #define AddCrc(data,datalen)  Iso15693AddCrc(data,datalen)
 #define sprintUID(target,uid)  Iso15693sprintUID(target,uid)
-#define TRACE_BUFF_SIZE 12000
 
 // structure and database for uid -> tagtype lookups 
 typedef struct { 
 
 // structure and database for uid -> tagtype lookups 
 typedef struct { 
@@ -136,6 +136,7 @@ const productName uidmapping[] = {
        { 0xE016040000000000LL, 24, "EM-Marin SA (Skidata Keycard-eco); EM4034? no 'read', just 'readmulti'" },
        { 0xE0160c0000000000LL, 24, "EM-Marin SA; EM4035?" },
        { 0xE016100000000000LL, 24, "EM-Marin SA (Skidata); EM4135; 36x64bit start page 13" },
        { 0xE016040000000000LL, 24, "EM-Marin SA (Skidata Keycard-eco); EM4034? no 'read', just 'readmulti'" },
        { 0xE0160c0000000000LL, 24, "EM-Marin SA; EM4035?" },
        { 0xE016100000000000LL, 24, "EM-Marin SA (Skidata); EM4135; 36x64bit start page 13" },
+       { 0xE016240000000000LL, 24, "EM-Marin SA (Skidata); EM4233;" },
        { 0xE016940000000000LL, 24, "EM-Marin SA (Skidata); 51x64bit" },
        
        { 0xE017000000000000LL, 16, "KSW Microtec GmbH Germany" },
        { 0xE016940000000000LL, 24, "EM-Marin SA (Skidata); 51x64bit" },
        
        { 0xE017000000000000LL, 16, "KSW Microtec GmbH Germany" },
@@ -236,7 +237,7 @@ static char* getTagInfo(uint8_t *uid) {
                        if (best==-1) { 
                                best=i;
                        } else {
                        if (best==-1) { 
                                best=i;
                        } else {
-                               if (uidmapping[i].mask > uidmapping[best].mask) {
+                               if (uidmapping[i].mask>uidmapping[best].mask) {
                                        best=i;
                                }
                        }                                       
                                        best=i;
                                }
                        }                                       
@@ -352,17 +353,6 @@ int CmdHF15Read(const char *Cmd)
 {
        UsbCommand c = {CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_15693};
        SendCommand(&c);
 {
        UsbCommand c = {CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_15693};
        SendCommand(&c);
-
-       uint8_t data[TRACE_BUFF_SIZE] = {0x00};
-       
-       GetFromBigBuf(data,TRACE_BUFF_SIZE,3560);  //3560 -- should be offset..
-       WaitForResponseTimeout(CMD_ACK,NULL, 1500);
-
-       for (int j = 0; j < TRACE_BUFF_SIZE; j++) {
-               GraphBuffer[j] = ((int)data[j]) ;
-       }
-       GraphTraceLen = TRACE_BUFF_SIZE;
-       RepaintGraphWindow();
        return 0;
 }
 
        return 0;
 }
 
@@ -371,17 +361,6 @@ int CmdHF15Record(const char *Cmd)
 {
        UsbCommand c = {CMD_RECORD_RAW_ADC_SAMPLES_ISO_15693};
        SendCommand(&c);
 {
        UsbCommand c = {CMD_RECORD_RAW_ADC_SAMPLES_ISO_15693};
        SendCommand(&c);
-
-       uint8_t data[TRACE_BUFF_SIZE] = {0x00};
-       
-       GetFromBigBuf(data,TRACE_BUFF_SIZE,3560);  //3560 -- should be offset..
-       WaitForResponseTimeout(CMD_ACK,NULL, 1500);
-
-       for (int j = 0; j < TRACE_BUFF_SIZE; j++) {
-               GraphBuffer[j] = ((int)data[j]) ;
-       }
-       GraphTraceLen = TRACE_BUFF_SIZE;
-       RepaintGraphWindow();
        return 0;
 }
 
        return 0;
 }
 
@@ -679,9 +658,9 @@ int CmdHF15CmdRaw (const char *cmd) {
  */
 int prepareHF15Cmd(char **cmd, UsbCommand *c, uint8_t iso15cmd[], int iso15cmdlen) {
        int temp;
  */
 int prepareHF15Cmd(char **cmd, UsbCommand *c, uint8_t iso15cmd[], int iso15cmdlen) {
        int temp;
-       uint8_t *req = c->d.asBytes;
+       uint8_t *req=c->d.asBytes;
        uint8_t uid[8] = {0x00};
        uint8_t uid[8] = {0x00};
-       uint32_t reqlen = 0;
+       uint32_t reqlen=0;
 
        // strip
        while (**cmd==' ' || **cmd=='\t') (*cmd)++;
 
        // strip
        while (**cmd==' ' || **cmd=='\t') (*cmd)++;
Impressum, Datenschutz