]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlf.c
add check for no wave in graphbuffer prior to...
[proxmark3-svn] / client / cmdlf.c
index 2000f6d00f3286d32a376c5215a6274b1a17d596..59f6cd0d4a336ba12e89bdc3406e85a941807e64 100644 (file)
@@ -1180,10 +1180,14 @@ int CmdLFfind(const char *Cmd)
                return 1;
        }
 
-       if (!offline && (cmdp != '1')){
-               ans=CmdLFHitagReader("26");
-               if (ans==0) {
-                       return 1;
+       size_t testLen = (GraphTraceLen < 500) ? GraphTraceLen : 500;
+       // only run if graphbuffer is just noise as it should be for hitag
+       if (graphJustNoise(GraphBuffer, testLen)) { 
+               if (!offline && (cmdp != '1')){
+                       ans=CmdLFHitagReader("26");
+                       if (ans==0) {
+                               return 1;
+                       }
                }
        }
 
Impressum, Datenschutz