+//by marshmellow
+int CmdLFfind(const char *Cmd)
+{
+ int ans=0;
+ char cmdp = param_getchar(Cmd, 0);
+
+ if (strlen(Cmd) > 1 || cmdp == 'h' || cmdp == 'H') {
+ PrintAndLog("Usage: lf search <0|1>");
+ 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("");
+ ans=CmdSamples("20000");
+ } else if (GraphTraceLen < 1000) {
+ PrintAndLog("Data in Graphbuffer was too small.");
+ return 0;
+ }
+
+ PrintAndLog("NOTE: some demods output possible binary\n if it finds something that looks like a tag");
+ PrintAndLog("\nChecking for known tags:\n");
+ ans=CmdFSKdemodIO("");
+ if (ans>0) {
+ PrintAndLog("\nValid IO Prox ID Found!");
+ return 1;
+ }
+ ans=CmdFSKdemodPyramid("");
+ if (ans>0) {
+ PrintAndLog("\nValid Pyramid ID Found!");
+ return 1;
+ }
+ ans=CmdFSKdemodParadox("");
+ if (ans>0) {
+ PrintAndLog("\nValid Paradox ID Found!");
+ return 1;
+ }
+ ans=CmdFSKdemodAWID("");
+ if (ans>0) {
+ PrintAndLog("\nValid AWID ID Found!");
+ return 1;
+ }
+ ans=CmdFSKdemodHID("");
+ if (ans>0) {
+ PrintAndLog("\nValid HID Prox ID Found!");
+ return 1;
+ }
+ //add psk and indala
+ ans=CmdIndalaDecode("");
+ if (ans>0) {
+ PrintAndLog("\nValid Indala ID Found!");
+ return 1;
+ }
+ ans=Cmdaskmandemod("");
+ if (ans>0) {
+ PrintAndLog("\nValid EM410x ID Found!");
+ return 1;
+ }
+ PrintAndLog("No Known Tags Found!\n");
+ return 0;
+}
+