From 06aecb09b79deae925abe73bcbea5680a828b136 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 26 Jun 2020 22:20:32 +0200 Subject: [PATCH] chg: hf iclass reader - textual --- client/src/cmdhficlass.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/client/src/cmdhficlass.c b/client/src/cmdhficlass.c index 3f7dd178d..0505ecb80 100644 --- a/client/src/cmdhficlass.c +++ b/client/src/cmdhficlass.c @@ -465,13 +465,14 @@ static void mem_app_config(const picopass_hdr *hdr) { if (applimit < 6) applimit = 26; if (kb == 2 && (applimit > 0x1f)) applimit = 26; - PrintAndLogEx(INFO, "------ " _CYAN_("Memory") "------"); - PrintAndLogEx(INFO, " %u KBits/%u App Areas (%u * 8 bytes) [%02X]", kb, app_areas, max_blk, mem); - PrintAndLogEx(INFO, " AA1 blocks 06-%02X", applimit); - PrintAndLogEx(INFO, " AA2 blocks %02X-%02X", applimit + 1, max_blk); - PrintAndLogEx(INFO, " OTP 0x%02X%02X", hdr->conf.otp[1], hdr->conf.otp[0]); + PrintAndLogEx(INFO, "------ " _CYAN_("Memory") " ------"); + PrintAndLogEx(INFO, " %u KBits/%u App Areas (%u bytes), max blocks 0x%02X (%02d)", kb, app_areas, max_blk * 8, mem, mem); + PrintAndLogEx(INFO, " AA1 blocks 0x06 - 0x%02X (06 - %02d)", applimit, applimit); + PrintAndLogEx(INFO, " AA2 blocks 0x%02X - 0x%02X (%02d - %02d)", applimit + 1, max_blk, applimit + 1, max_blk); + PrintAndLogEx(INFO, " OTP 0x%02X%02X", hdr->conf.otp[1], hdr->conf.otp[0]); - PrintAndLogEx(INFO, "------ " _CYAN_("KeyAccess") "------"); + PrintAndLogEx(INFO, "------ " _CYAN_("KeyAccess") " ------"); + PrintAndLogEx(INFO, " Kd = Debit key (AA1), Kc = Credit key (AA2)"); uint8_t book = isset(mem, 0x20); if (book) { PrintAndLogEx(INFO, " Read A - Kd"); @@ -2941,9 +2942,12 @@ int readIclass(bool loop, bool verbose) { DropField(); return PM3_EOPABORTED; } + + PrintAndLogEx(NORMAL, ""); + PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " --------------------------"); + PrintAndLogEx(INFO, "-------------------------------------------------------------"); if (readStatus & FLAG_ICLASS_READER_CSN) { - PrintAndLogEx(NORMAL, "\n"); PrintAndLogEx(SUCCESS, " CSN: " _YELLOW_("%s"), sprint_hex(data, 8)); tagFound = true; } @@ -2964,7 +2968,9 @@ int readIclass(bool loop, bool verbose) { bool se_enabled = (memcmp((uint8_t *)(data + 8 * 5), "\xff\xff\xff\x00\x06\xff\xff\xff", 8) == 0); + PrintAndLogEx(INFO, "--------- " _CYAN_("AIA") " ---------"); PrintAndLogEx(SUCCESS, " App IA: %s", sprint_hex(data + 8 * 5, 8)); + PrintAndLogEx(INFO, "------ " _CYAN_("fingerprint") " ------"); if (isHidRange) { @@ -2982,6 +2988,7 @@ int readIclass(bool loop, bool verbose) { } if (tagFound && !loop) { + PrintAndLogEx(NORMAL, ""); DropField(); return PM3_SUCCESS; } @@ -2991,6 +2998,7 @@ int readIclass(bool loop, bool verbose) { } if (!loop) break; } + PrintAndLogEx(NORMAL, ""); DropField(); return res; }