]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlf.c
Updated the README.txt
[proxmark3-svn] / client / cmdlf.c
index 70db0575a3aea0beb289ec76b7edfef95c8bb303..8257a5b392abeb66a42395630e277d6909de503c 100644 (file)
@@ -571,31 +571,46 @@ int CmdVchDemod(const char *Cmd)
 //by marshmellow
 int CmdLFfind(const char *Cmd)
 {
-  int ans=0;
-  if (!offline){
-    ans=CmdLFRead("");
-    //ans=CmdSamples("20000");
-  }
-  if (GraphTraceLen<1000) return 0;
-  PrintAndLog("Checking for known tags:");
-  
-  ans=Cmdaskmandemod("");
-  PrintAndLog("ASK_MAN: %s", (ans)?"YES":"NO" );
-  
-  ans=CmdFSKdemodHID("");
-  PrintAndLog("HID: %s", (ans)?"YES":"NO" );
-  
-  ans=CmdFSKdemodIO("");
-  PrintAndLog("IO prox: %s", (ans)?"YES":"NO" );
-
-  ans=CmdIndalaDemod("");
-  PrintAndLog("Indala (64): %s", (ans)?"YES":"NO" );
+       int ans = 0;
+       char cmdp = param_getchar(Cmd, 0);
        
-  ans=CmdIndalaDemod("224");
-  PrintAndLog("Indala (224): %s", (ans)?"YES":"NO" );
-       
-  //PrintAndLog("No Known Tags Found!\n");
-  return 0;
+       if (strlen(Cmd) > 1 || cmdp == 'h' || cmdp == 'H') {
+               PrintAndLog("Usage:  lf search [use data from Graphbuffer]");
+               PrintAndLog("     [use data from Graphbuffer], if not set, try reading data from tag.");
+               PrintAndLog("");
+               PrintAndLog("    sample: lf search");
+               PrintAndLog("          : lf search 1");
+               return 0;
+       }
+
+       if (!offline || (cmdp != '1') ){
+               ans = CmdLFRead("");
+       } else if (GraphTraceLen<1000) {
+               PrintAndLog("Data in Graphbuffer was too small.");
+               return 0;
+       }
+
+       PrintAndLog("Checking for known tags:");
+
+       ans=Cmdaskmandemod("");
+       PrintAndLog("ASK_MAN: %s", (ans)?"YES":"NO" );
+
+       ans=CmdFSKdemodHID("");
+       PrintAndLog("HID: %s", (ans)?"YES":"NO" );
+
+       ans=CmdFSKdemodIO("");
+       PrintAndLog("IO prox: %s", (ans)?"YES":"NO" );
+
+       ans=CmdIndalaDemod("");
+       PrintAndLog("Indala (64): %s", (ans)?"YES":"NO" );
+
+       ans=CmdIndalaDemod("224");
+       PrintAndLog("Indala (224): %s", (ans)?"YES":"NO" );
+
+       if (!ans)
+               PrintAndLog("No Known Tags Found!\n");
+               
+       return 0;
 }
 
 static command_t CommandTable[] = 
Impressum, Datenschutz