]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
CHG: temporary disable hitag2_uid detection. Loop times out sometimes.
authoriceman1001 <iceman@iuse.se>
Tue, 31 Jan 2017 21:38:02 +0000 (22:38 +0100)
committericeman1001 <iceman@iuse.se>
Tue, 31 Jan 2017 21:38:02 +0000 (22:38 +0100)
client/cmdlf.c
client/cmdlfcotag.c
client/cmdlfhitag.c

index eb2f7cde15455992b455af8a75dc7079c4e6496f..07f3ac98bbdf617fb93271f67e6780b1cd154742 100644 (file)
@@ -556,7 +556,7 @@ int CmdLFRead(const char *Cmd) {
        UsbCommand c = {CMD_ACQUIRE_RAW_ADC_SAMPLES_125K, {arg1,0,0}};
        clearCommandBuffer();
        SendCommand(&c);
-       if ( !WaitForResponseTimeout(CMD_ACK,NULL,2500) ) {
+       if ( !WaitForResponseTimeout(CMD_ACK, NULL ,2500) ) {
                PrintAndLog("command execution time out");
                return 1;
        }
@@ -1011,7 +1011,7 @@ int CmdLFfind(const char *Cmd) {
 
        if (!offline && (cmdp != '1')){
                CmdLFRead("s");
-               getSamples("30000", TRUE);
+               getSamples("30000", false);
        } else if (GraphTraceLen < 1000) {
                PrintAndLog("Data in Graphbuffer was too small.");
                return 0;
@@ -1118,13 +1118,15 @@ int CmdLFfind(const char *Cmd) {
                return 1;
        }
        // TIdemod?
-       
+
+/*     
        if (!offline && (cmdp != '1')){
                ans=CmdLFHitagReader("26");
                if (ans==0) {
                        return 1;
                }
        }
+*/
 
        PrintAndLog("\nNo Known Tags Found!\n");
        if (testRaw=='u' || testRaw=='U'){
index 11be2db8024e83d92f030406040b5a373d642f86..1a2b2eca699cee338d4f7aa746421c0a4bda3099 100644 (file)
@@ -19,11 +19,10 @@ int CmdCOTAGRead(const char *Cmd) {
        clearCommandBuffer();
        SendCommand(&c);
        if ( !WaitForResponseTimeout(CMD_ACK, NULL, 2500) ) {
-               //PrintAndLog("command execution time out");
+               PrintAndLog("command execution time out");
                return 1;
        }
-       getSamples("", true);
-       //return CmdFSKdemodAWID(Cmd);
+       getSamples("20000", true);
        return 0;
 }
 
index ec290d89ed09938f3cfbda3561e1283920ebcc52..b32990cdd340c857c3b2c333c2fcc5f6279ac825 100644 (file)
@@ -195,9 +195,9 @@ int CmdLFHitagSim(const char *Cmd) {
 
 int CmdLFHitagReader(const char *Cmd) {
        
-       UsbCommand c = {CMD_READER_HITAG};//, {param_get32ex(Cmd,0,0,10),param_get32ex(Cmd,1,0,16),param_get32ex(Cmd,2,0,16),param_get32ex(Cmd,3,0,16)}};
+       UsbCommand c = {CMD_READER_HITAG, {0,0,0} };//, {param_get32ex(Cmd,0,0,10),param_get32ex(Cmd,1,0,16),param_get32ex(Cmd,2,0,16),param_get32ex(Cmd,3,0,16)}};
        hitag_data* htd = (hitag_data*)c.d.asBytes;
-       hitag_function htf = param_get32ex(Cmd,0,0,10);
+       hitag_function htf = param_get32ex(Cmd, 0, 0, 10);
        
        switch (htf) {
                case 01: { //RHTSF_CHALLENGE
@@ -249,7 +249,7 @@ int CmdLFHitagReader(const char *Cmd) {
        clearCommandBuffer();
        SendCommand(&c);
        UsbCommand resp;
-       WaitForResponse(CMD_ACK,&resp);
+       WaitForResponse(CMD_ACK, &resp);
 
        // Check the return status, stored in the first argument
        if (resp.arg[0] == false) return 1;
@@ -259,19 +259,19 @@ int CmdLFHitagReader(const char *Cmd) {
        if (htf == RHT2F_UID_ONLY){
                PrintAndLog("Valid Hitag2 tag found - UID: %08x",id);
        } else {
-       char filename[FILE_PATH_SIZE];
-       FILE* f = NULL;
-       sprintf(filename,"%08x_%04x.ht2",id,(rand() & 0xffff));
-       f = fopen(filename,"wb");
-       if (!f) {
-               PrintAndLog("Error: Could not open file [%s]",filename);
-               return 1;
-       }
+               char filename[FILE_PATH_SIZE];
+               FILE* f = NULL;
+               sprintf(filename,"%08x_%04x.ht2",id,(rand() & 0xffff));
+               f = fopen(filename,"wb");
+               if (!f) {
+                       PrintAndLog("Error: Could not open file [%s]",filename);
+                       return 1;
+               }
 
-       // Write the 48 tag memory bytes to file and finalize
-       fwrite(resp.d.asBytes, 1, 48, f);
-       fclose(f);
-       PrintAndLog("Succesfully saved tag memory to [%s]",filename);
+               // Write the 48 tag memory bytes to file and finalize
+               fwrite(resp.d.asBytes, 1, 48, f);
+               fclose(f);
+               PrintAndLog("Succesfully saved tag memory to [%s]",filename);
        }
        return 0;
 }
Impressum, Datenschutz