From 220614ca10b784375cede118ed74d8a9ef623a59 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 8 Feb 2018 12:34:13 +0100 Subject: [PATCH] fix: 'hf iclass reader' - drop field when finished. --- client/cmdhficlass.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/client/cmdhficlass.c b/client/cmdhficlass.c index 02e21cf31..274b3112e 100644 --- a/client/cmdhficlass.c +++ b/client/cmdhficlass.c @@ -527,8 +527,10 @@ int HFiClassReader(const char *Cmd, bool loop, bool verbose) { // no tag found or button pressed if ( (readStatus == 0 && !loop) || readStatus == 0xFF) { // abort - if (verbose) PrintAndLog("[-] Quitting..."); - return 0; + if (verbose) PrintAndLog("[-] Quitting..."); { + DropField(); + return 0; + } } if( readStatus & FLAG_ICLASS_READER_CSN){ PrintAndLog("CSN: %s", sprint_hex(data, 8)); @@ -546,12 +548,16 @@ int HFiClassReader(const char *Cmd, bool loop, bool verbose) { PrintAndLog(" : Possible iClass %s", (legacy) ? "(legacy tag)" : "(NOT legacy tag)"); } - if (tagFound && !loop) return 1; + if (tagFound && !loop) { + DropField(); + return 1; + } } else { if (verbose) PrintAndLog("[!] command execute timeout"); } if (!loop) break; } + DropField(); return 0; }