From 312e4b358c9749ec71c74c691b12ae4c10b86938 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 11 Sep 2019 16:36:41 +0200 Subject: [PATCH] fix: 'hf iclass reader 1' - now turns off --- client/cmdhficlass.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/client/cmdhficlass.c b/client/cmdhficlass.c index 6de758d31..4d6af964b 100644 --- a/client/cmdhficlass.c +++ b/client/cmdhficlass.c @@ -2806,25 +2806,27 @@ int readIclass(bool loop, bool verbose) { uint8_t *data = resp.data.asBytes; if (verbose) PrintAndLogEx(INFO, "Readstatus:%02x", readStatus); + // no tag found or button pressed if ((readStatus == 0 && !loop) || readStatus == 0xFF) { // abort - if (verbose) { - PrintAndLogEx(FAILED, "Quitting..."); - DropField(); - return PM3_EOPABORTED; - } + DropField(); + return PM3_EOPABORTED; } + if (readStatus & FLAG_ICLASS_READER_CSN) { PrintAndLogEx(NORMAL, " CSN: %s", sprint_hex(data, 8)); tagFound = true; } + if (readStatus & FLAG_ICLASS_READER_CC) { PrintAndLogEx(NORMAL, " CC: %s", sprint_hex(data + 16, 8)); } + if (readStatus & FLAG_ICLASS_READER_CONF) { printIclassDumpInfo(data); } + if (readStatus & FLAG_ICLASS_READER_AIA) { bool legacy = (memcmp((uint8_t *)(data + 8 * 5), "\xff\xff\xff\xff\xff\xff\xff\xff", 8) == 0);