From 78511df9f28dd7b067176ed9a0052f302adf489e Mon Sep 17 00:00:00 2001 From: tharexde Date: Sun, 28 Jun 2020 21:41:21 +0200 Subject: [PATCH] integrated 'lread' into 'lf search' process and renamed 'lread' to 'read' --- client/src/cmdlf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/src/cmdlf.c b/client/src/cmdlf.c index 748c9557a..35ce4c1b7 100644 --- a/client/src/cmdlf.c +++ b/client/src/cmdlf.c @@ -30,6 +30,7 @@ #include "cmddata.h" // for `lf search` #include "cmdlfawid.h" // for awid menu #include "cmdlfem4x.h" // for em4x menu +#include "cmdlfem4x50.h" // for em4x50 #include "cmdlfhid.h" // for hid menu #include "cmdlfhitag.h" // for hitag menu #include "cmdlfio.h" // for ioprox menu @@ -1250,6 +1251,13 @@ int CmdLFfind(const char *Cmd) { } } + if (IfPm3EM4x50()) { + if (EM4x50Read("", false) == PM3_SUCCESS) { + PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("EM4x50 ID") " found!"); + return PM3_SUCCESS; + } + } + // only run if graphbuffer is just noise as it should be for hitag // The improved noise detection will find Cotag. if (getSignalProperties()->isnoise) { @@ -1270,8 +1278,6 @@ int CmdLFfind(const char *Cmd) { } } - if (EM4x50Read("", false) == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("EM4x50 ID") " found!"); return PM3_SUCCESS;} - if (demodHID() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("HID Prox ID") " found!"); goto out;} if (demodAWID() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("AWID ID") " found!"); goto out;} if (demodIOProx() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("IO Prox ID") " found!"); goto out;}