diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index b83716cb6..bf8957e81 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -1918,11 +1918,10 @@ int detect_nxp_card(uint8_t sak, uint16_t atqa, uint64_t select_status, if ((sak & 0x10) == 0x10) { // SAK b2=0 b4=0 b5=1 - if ((sak & 0x01) == 0x01) { // SAK b2=0 b4=0 b5=1 b1=1, SAK=0x11 + // if ((sak & 0x01) == 0x01) { // SAK b2=0 b4=0 b5=1 b1=1, SAK=0x11 + // } else { // SAK b2=0 b4=0 b5=1 b1=0, SAK=0x10 + // } type |= MTPLUS; - } else { // SAK b2=0 b4=0 b5=1 b1=0, SAK=0x10 - type |= MTPLUS; - } } else { // SAK b2=0 b4=0 b5=0 @@ -2150,7 +2149,7 @@ static int detect_nxp_card_print(uint8_t sak, uint16_t atqa, uint64_t select_sta if (lsize < 1024) { snprintf(size_str, sizeof(size_str), "%u - %uB", usize, lsize); } else { - snprintf(size_str, sizeof(size_str), "%u - %uK", (usize / 1024), (lsize / 1024)); + snprintf(size_str, sizeof(size_str), "%d - %dK", (usize / 1024), (lsize / 1024)); } } else { @@ -2159,7 +2158,7 @@ static int detect_nxp_card_print(uint8_t sak, uint16_t atqa, uint64_t select_sta if (lsize < 1024) { snprintf(size_str, sizeof(size_str), "%uB", lsize); } else { - snprintf(size_str, sizeof(size_str), "%uK", lsize / 1024); + snprintf(size_str, sizeof(size_str), "%dK", (lsize / 1024)); } } @@ -2322,11 +2321,10 @@ static int detect_nxp_card_print(uint8_t sak, uint16_t atqa, uint64_t select_sta if ((sak & 0x01) == 0x01) { // SAK b2=0 b4=0 b5=1 b1=1, SAK=0x11 printTag("MIFARE Plus 4K in SL2"); - type |= MTPLUS; } else { // SAK b2=0 b4=0 b5=1 b1=0, SAK=0x10 printTag("MIFARE Plus 2K in SL2"); - type |= MTPLUS; } + type |= MTPLUS; } else { // SAK b2=0 b4=0 b5=0 diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 7fba40787..68a9eb044 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -3918,7 +3918,7 @@ static int CmdHF14AMfChk_fast(const char *Cmd) { // BigBuf_Clear_ext(false); goto out; } - PrintAndLogEx(INPLACE, "Testing %5i/%5i %02.1f%%", i, keycnt, (float)i * 100 / keycnt); + PrintAndLogEx(INPLACE, "Testing %5i/%5i ( " _YELLOW_("%02.1f%%") " )", i, keycnt, (float)i * 100 / keycnt); uint32_t size = ((keycnt - i) > chunksize) ? chunksize : keycnt - i; // last chunk? @@ -3935,7 +3935,7 @@ static int CmdHF14AMfChk_fast(const char *Cmd) { goto out; } } // end chunks of keys - PrintAndLogEx(INPLACE, "Testing %5i/%5i 100.00%%", keycnt, keycnt); + PrintAndLogEx(INPLACE, "Testing %5i/%5i ( " _YELLOW_("100.00%%") " )", keycnt, keycnt); PrintAndLogEx(NORMAL, ""); firstChunk = true; lastChunk = false; diff --git a/client/src/cmdhfmfu.c b/client/src/cmdhfmfu.c index 7266e23f3..6ee8e2fd2 100644 --- a/client/src/cmdhfmfu.c +++ b/client/src/cmdhfmfu.c @@ -3926,9 +3926,9 @@ static int CmdHF14AMfUAESAuth(const char *Cmd) { CLIParserInit(&ctx, "hf mfu aesauth", "Tests AES key on Mifare Ultralight AES tags.\n" "If no key is specified, null key will be tried.\n" - "Key index 0: DataProtKey (default)\n" - "Key index 1: UIDRetrKey\n" - "Key index 2: OriginalityKey\n", + " Key index 0... DataProtKey (default)\n" + " Key index 1... UIDRetrKey\n" + " Key index 2... OriginalityKey\n", "hf mfu aesauth\n" "hf mfu aesauth --key <16 hex bytes> --index <0..2>" ); diff --git a/client/src/fileutils.c b/client/src/fileutils.c index cf9822848..a9d7cd3af 100644 --- a/client/src/fileutils.c +++ b/client/src/fileutils.c @@ -3043,18 +3043,22 @@ out: int searchFile(char **foundpath, const char *pm3dir, const char *searchname, const char *suffix, bool silent) { - if (foundpath == NULL) + if (foundpath == NULL) { return PM3_EINVARG; + } - if (searchname == NULL || strlen(searchname) == 0) + if (searchname == NULL || strlen(searchname) == 0) { return PM3_EINVARG; + } - if (is_directory(searchname)) + if (is_directory(searchname)) { return PM3_EINVARG; + } char *filename = filenamemcopy(searchname, suffix); - if (filename == NULL) + if (filename == NULL) { return PM3_EMALLOC; + } if (strlen(filename) == 0) { free(filename);