]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
CHG: modified cmdlf.c - CmdLFfind with a parameter to accept traces loaded with...
authoriceman1001 <iceman@iuse.se>
Wed, 31 Dec 2014 11:01:00 +0000 (12:01 +0100)
committericeman1001 <iceman@iuse.se>
Wed, 31 Dec 2014 11:01:00 +0000 (12:01 +0100)
client/.history [deleted file]
client/cmdlf.c

diff --git a/client/.history b/client/.history
deleted file mode 100644 (file)
index d781126..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-hw tune
-lf read
-data plot
-data sample 4000
-lf t55xx rd 0
-lf t55xx trac
-lf t55xx rd 1
-lf t55xx rd 2
-lf em4x 410xsim 124s
-lf em4x 410xsim 0F0368568B
-da pl
-scr run sky
-script list
-scr run mifare_autopwn
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3 -n
-scr run  tnp3
-scr run  tnp3 -n
-hf mf nested 0 a 4b0b20107ccb d
-hf mf nested 1 0 a 4b0b20107ccb d
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3
-scr run  tnp3 -n
-scr run  tnp3
-hf mf nested 1 0 a 4b0b20107ccb d
-scr run  tnp3
index 70db0575a3aea0beb289ec76b7edfef95c8bb303..14d8d2159f31fa17ffd2542540165157e7e061ec 100644 (file)
@@ -571,31 +571,44 @@ 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" );
-       
-  ans=CmdIndalaDemod("224");
-  PrintAndLog("Indala (224): %s", (ans)?"YES":"NO" );
+       char cmdp = param_getchar(Cmd, 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;
+       }
        
-  //PrintAndLog("No Known Tags Found!\n");
-  return 0;
+       int ans = 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" );
+
+       //PrintAndLog("No Known Tags Found!\n");
+       return 0;
 }
 
 static command_t CommandTable[] = 
Impressum, Datenschutz