From 41ff9191d6e1271c33edd495614c199b1e9d241c Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 24 Jul 2023 21:04:21 +0200 Subject: [PATCH] text --- client/src/cmdhf14b.c | 2 +- client/src/cmdhf15.c | 50 ++++++++++++++++++++++------------------ client/src/cmdhficlass.c | 2 +- client/src/cmdhflegic.c | 2 +- client/src/cmdhfmfp.c | 1 - client/src/cmdhfmfu.c | 1 - client/src/cmdlfem4x05.c | 14 +++++------ client/src/cmdlfem4x70.c | 2 -- client/src/cmdlfhitag.c | 1 - doc/colors_notes.md | 1 - 10 files changed, 37 insertions(+), 39 deletions(-) diff --git a/client/src/cmdhf14b.c b/client/src/cmdhf14b.c index 29a985b29..e8d48751a 100644 --- a/client/src/cmdhf14b.c +++ b/client/src/cmdhf14b.c @@ -861,7 +861,7 @@ static bool HF14B_Std_Info(bool verbose, bool do_aid_search) { switch (status) { case 0: { PrintAndLogEx(NORMAL, ""); - PrintAndLogEx(INFO, "-------------------- " _CYAN_("Tag information") " --------------------"); + PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " ---------------------------"); PrintAndLogEx(SUCCESS, " UID : " _GREEN_("%s"), sprint_hex(card.uid, card.uidlen)); PrintAndLogEx(SUCCESS, " ATQB : %s", sprint_hex(card.atqb, sizeof(card.atqb))); PrintAndLogEx(SUCCESS, " CHIPID : %02X", card.chipid); diff --git a/client/src/cmdhf15.c b/client/src/cmdhf15.c index 792692773..ad63bd3b8 100644 --- a/client/src/cmdhf15.c +++ b/client/src/cmdhf15.c @@ -671,11 +671,9 @@ static int NxpTestEAS(uint8_t *uid) { SendCommandMIX(CMD_HF_ISO15693_COMMAND, reqlen, fast, reply, req, reqlen); if (WaitForResponseTimeout(CMD_HF_ISO15693_COMMAND, &resp, 2000) == false) { - PrintAndLogEx(WARNING, "iso15693 timeout"); + PrintAndLogEx(DEBUG, "iso15693 timeout"); } else { - PrintAndLogEx(NORMAL, ""); - - + PrintAndLogEx(INFO, ""); if (resp.length < 2) { PrintAndLogEx(INFO, " EAS (Electronic Article Surveillance) is not active"); } else { @@ -687,7 +685,6 @@ static int NxpTestEAS(uint8_t *uid) { } } } - return PM3_SUCCESS; } @@ -712,7 +709,7 @@ static int NxpCheckSig(uint8_t *uid) { SendCommandMIX(CMD_HF_ISO15693_COMMAND, reqlen, fast, reply, req, reqlen); if (WaitForResponseTimeout(CMD_HF_ISO15693_COMMAND, &resp, 2000) == false) { - PrintAndLogEx(WARNING, "iso15693 timeout"); + PrintAndLogEx(DEBUG, "iso15693 timeout"); DropField(); return PM3_ETIMEOUT; } @@ -732,10 +729,9 @@ static int NxpCheckSig(uint8_t *uid) { } uint8_t signature[32] = {0x00}; - memcpy(signature, recv + 1, 32); + memcpy(signature, recv + 1, sizeof(signature)); nxp_15693_print_signature(uid, signature); - return PM3_SUCCESS; } @@ -764,7 +760,7 @@ static int NxpSysInfo(uint8_t *uid) { clearCommandBuffer(); SendCommandMIX(CMD_HF_ISO15693_COMMAND, reqlen, fast, reply, req, reqlen); if (WaitForResponseTimeout(CMD_HF_ISO15693_COMMAND, &resp, 2000) == false) { - PrintAndLogEx(WARNING, "iso15693 timeout"); + PrintAndLogEx(DEBUG, "iso15693 timeout"); DropField(); return PM3_ETIMEOUT; } @@ -790,21 +786,29 @@ static int NxpSysInfo(uint8_t *uid) { bool support_signature = (recv[5] & 0x01); bool support_easmode = (recv[4] & 0x04); - PrintAndLogEx(INFO, "--------- " _CYAN_("NXP Sysinfo") " ---------"); - PrintAndLogEx(INFO, " raw : %s", sprint_hex(recv, 8)); - PrintAndLogEx(INFO, " Password protection configuration:"); - PrintAndLogEx(INFO, " * Page L read%s password protected", ((recv[2] & 0x01) ? "" : " not")); - PrintAndLogEx(INFO, " * Page L write%s password protected", ((recv[2] & 0x02) ? "" : " not")); - PrintAndLogEx(INFO, " * Page H read%s password protected", ((recv[2] & 0x10) ? "" : " not")); - PrintAndLogEx(INFO, " * Page H write%s password protected", ((recv[2] & 0x20) ? "" : " not")); + PrintAndLogEx(INFO, ""); + PrintAndLogEx(INFO, "--- " _CYAN_("NXP Sysinfo")); + PrintAndLogEx(INFO, " raw... %s", sprint_hex(recv, 8)); + PrintAndLogEx(INFO, " " _CYAN_("Password protection configuration:")); + PrintAndLogEx(INFO, " * Page L read%s password protected", ((recv[2] & 0x01) ? "" : _GREEN_(" not"))); + PrintAndLogEx(INFO, " * Page L write%s password protected", ((recv[2] & 0x02) ? "" : _GREEN_(" not"))); + PrintAndLogEx(INFO, " * Page H read%s password protected", ((recv[2] & 0x10) ? "" : _GREEN_(" not"))); + PrintAndLogEx(INFO, " * Page H write%s password protected", ((recv[2] & 0x20) ? "" : _GREEN_(" not"))); - PrintAndLogEx(INFO, " Lock bits:"); - PrintAndLogEx(INFO, " * AFI%s locked", ((recv[3] & 0x01) ? "" : " not")); // AFI lock bit - PrintAndLogEx(INFO, " * EAS%s locked", ((recv[3] & 0x02) ? "" : " not")); // EAS lock bit - PrintAndLogEx(INFO, " * DSFID%s locked", ((recv[3] & 0x03) ? "" : " not")); // DSFID lock bit - PrintAndLogEx(INFO, " * Password protection configuration%s locked", ((recv[3] & 0x04) ? "" : " not")); // Password protection pointer address and access conditions lock bit + PrintAndLogEx(INFO, " " _CYAN_("Lock bits:")); + // AFI lock bit + PrintAndLogEx(INFO, " * AFI%s locked", ((recv[3] & 0x01) ? "" : _GREEN_(" not"))); - PrintAndLogEx(INFO, " Features:"); + // EAS lock bit + PrintAndLogEx(INFO, " * EAS%s locked", ((recv[3] & 0x02) ? "" : _GREEN_(" not"))); + + // DSFID lock bit + PrintAndLogEx(INFO, " * DSFID%s locked", ((recv[3] & 0x03) ? "" : _GREEN_(" not"))); + + // Password protection pointer address and access conditions lock bit + PrintAndLogEx(INFO, " * Password protection configuration%s locked", ((recv[3] & 0x04) ? "" : _GREEN_(" not"))); + + PrintAndLogEx(INFO, " " _CYAN_("Features:")); PrintAndLogEx(INFO, " * User memory password protection%s supported", ((recv[4] & 0x01) ? "" : " not")); PrintAndLogEx(INFO, " * Counter feature%s supported", ((recv[4] & 0x02) ? "" : " not")); PrintAndLogEx(INFO, " * EAS ID%s supported by EAS ALARM command", support_easmode ? "" : " not"); @@ -827,6 +831,7 @@ static int NxpSysInfo(uint8_t *uid) { NxpCheckSig(uid); } + PrintAndLogEx(NORMAL, ""); return PM3_SUCCESS; } @@ -925,7 +930,6 @@ static int CmdHF15Info(const char *Cmd) { memcpy(uid, data + 2, sizeof(uid)); PrintAndLogEx(NORMAL, ""); PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " ---------------------------"); - PrintAndLogEx(INFO, "-------------------------------------------------------------"); PrintAndLogEx(SUCCESS, " TYPE: " _YELLOW_("%s"), getTagInfo_15(data + 2)); PrintAndLogEx(SUCCESS, " UID: " _GREEN_("%s"), iso15693_sprintUID(NULL, uid)); PrintAndLogEx(SUCCESS, " SYSINFO: %s", sprint_hex(data, resp.length - 2)); diff --git a/client/src/cmdhficlass.c b/client/src/cmdhficlass.c index 11bec0d16..1a96fbacb 100644 --- a/client/src/cmdhficlass.c +++ b/client/src/cmdhficlass.c @@ -4282,7 +4282,7 @@ int info_iclass(bool shallow_mod) { picopass_ns_hdr_t *ns_hdr = &r->header.ns_hdr; PrintAndLogEx(NORMAL, ""); - PrintAndLogEx(INFO, "--------------------- " _CYAN_("Tag Information") " ----------------------"); + PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " ----------------------------------------"); if ((r->status & FLAG_ICLASS_CSN) == FLAG_ICLASS_CSN) { PrintAndLogEx(SUCCESS, " CSN: " _GREEN_("%s") " uid", sprint_hex(hdr->csn, sizeof(hdr->csn))); diff --git a/client/src/cmdhflegic.c b/client/src/cmdhflegic.c index 160eac05b..2398aa8dc 100644 --- a/client/src/cmdhflegic.c +++ b/client/src/cmdhflegic.c @@ -83,7 +83,7 @@ static int decode_and_print_memory(uint16_t card_size, const uint8_t *input_buff int crc = data[4]; uint32_t calc_crc = CRC8Legic(data, 4); - PrintAndLogEx(INFO, "--------------------- " _CYAN_("Tag Information") " ----------------------"); + PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " ----------------------------------------"); PrintAndLogEx(NORMAL, ""); PrintAndLogEx(SUCCESS, " " _CYAN_("CDF: System Area")); PrintAndLogEx(INFO, "------------------------------------------------------"); diff --git a/client/src/cmdhfmfp.c b/client/src/cmdhfmfp.c index e8e2c7226..01f529b99 100644 --- a/client/src/cmdhfmfp.c +++ b/client/src/cmdhfmfp.c @@ -283,7 +283,6 @@ static int CmdHFMFPInfo(const char *Cmd) { PrintAndLogEx(NORMAL, ""); PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " ---------------------------"); - PrintAndLogEx(INFO, "-------------------------------------------------------------"); // Mifare Plus info SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_CONNECT, 0, 0, NULL, 0); diff --git a/client/src/cmdhfmfu.c b/client/src/cmdhfmfu.c index 6762d0b1c..d5fcd3ac0 100644 --- a/client/src/cmdhfmfu.c +++ b/client/src/cmdhfmfu.c @@ -1785,7 +1785,6 @@ static int CmdHF14AMfUInfo(const char *Cmd) { PrintAndLogEx(NORMAL, ""); PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " --------------------------"); - PrintAndLogEx(INFO, "-------------------------------------------------------------"); ul_print_type(tagtype, 6); // Swap endianness diff --git a/client/src/cmdlfem4x05.c b/client/src/cmdlfem4x05.c index c21540f45..665518a40 100644 --- a/client/src/cmdlfem4x05.c +++ b/client/src/cmdlfem4x05.c @@ -2162,14 +2162,14 @@ static command_t CommandTable[] = { {"help", CmdHelp, AlwaysAvailable, "This help"}, {"brute", CmdEM4x05Brute, IfPm3Lf, "Bruteforce password"}, {"chk", CmdEM4x05Chk, IfPm3Lf, "Check passwords from dictionary"}, - {"demod", CmdEM4x05Demod, AlwaysAvailable, "demodulate a EM4x05/EM4x69 tag from the GraphBuffer"}, - {"dump", CmdEM4x05Dump, IfPm3Lf, "dump EM4x05/EM4x69 tag"}, - {"info", CmdEM4x05Info, IfPm3Lf, "tag information EM4x05/EM4x69"}, - {"read", CmdEM4x05Read, IfPm3Lf, "read word data from EM4x05/EM4x69"}, + {"demod", CmdEM4x05Demod, AlwaysAvailable, "Demodulate a EM4x05/EM4x69 tag from the GraphBuffer"}, + {"dump", CmdEM4x05Dump, IfPm3Lf, "Dump EM4x05/EM4x69 tag"}, + {"info", CmdEM4x05Info, IfPm3Lf, "Tag information"}, + {"read", CmdEM4x05Read, IfPm3Lf, "Read word data from EM4x05/EM4x69"}, {"sniff", CmdEM4x05Sniff, AlwaysAvailable, "Attempt to recover em4x05 commands from sample buffer"}, - {"unlock", CmdEM4x05Unlock, IfPm3Lf, "execute tear off against EM4x05/EM4x69"}, - {"wipe", CmdEM4x05Wipe, IfPm3Lf, "wipe EM4x05/EM4x69 tag"}, - {"write", CmdEM4x05Write, IfPm3Lf, "write word data to EM4x05/EM4x69"}, + {"unlock", CmdEM4x05Unlock, IfPm3Lf, "Execute tear off against EM4x05/EM4x69"}, + {"wipe", CmdEM4x05Wipe, IfPm3Lf, "Wipe EM4x05/EM4x69 tag"}, + {"write", CmdEM4x05Write, IfPm3Lf, "Write word data to EM4x05/EM4x69"}, {NULL, NULL, NULL, NULL} }; diff --git a/client/src/cmdlfem4x70.c b/client/src/cmdlfem4x70.c index d7bc3811a..c1e2aff03 100644 --- a/client/src/cmdlfem4x70.c +++ b/client/src/cmdlfem4x70.c @@ -35,8 +35,6 @@ static void print_info_result(const uint8_t *data) { PrintAndLogEx(NORMAL, ""); PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " ---------------------------"); - PrintAndLogEx(INFO, "-----------------------------------------------"); - PrintAndLogEx(INFO, "Block | data | info"); PrintAndLogEx(INFO, "------+----------+-----------------------------"); diff --git a/client/src/cmdlfhitag.c b/client/src/cmdlfhitag.c index 4df9ca4a7..1cbae7bd3 100644 --- a/client/src/cmdlfhitag.c +++ b/client/src/cmdlfhitag.c @@ -514,7 +514,6 @@ static int CmdLFHitagInfo(const char *Cmd) { PrintAndLogEx(NORMAL, ""); PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " ---------------------------"); - PrintAndLogEx(INFO, "-------------------------------------------------------------"); PrintAndLogEx(SUCCESS, " UID: " _GREEN_("%08X"), uid); PrintAndLogEx(SUCCESS, " TYPE: " _GREEN_("%s"), getHitagTypeStr(uid)); diff --git a/doc/colors_notes.md b/doc/colors_notes.md index dac993585..b25a7d7c9 100644 --- a/doc/colors_notes.md +++ b/doc/colors_notes.md @@ -43,7 +43,6 @@ The following definition has be crystallized out from these experiments. Its no ``` PrintAndLogEx(NORMAL, ""); PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " ---------------------------"); - PrintAndLogEx(INFO, "-------------------------------------------------------------"); ``` For more examples, see also all **-h** helptext now in the LUA scripts. For the command help texts using _YELLOW_ for the example makes it very easy to see what is the command vs the description.