diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index 7fd97ea80..afcc555c8 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2706,11 +2706,11 @@ OUT: void MifareHasStaticEncryptedNonce(uint8_t block_no, uint8_t key_type, uint8_t *key) { FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); + LEDsoff(); clear_trace(); set_tracing(true); int retval = PM3_SUCCESS; - uint8_t *uid = BigBuf_calloc(10); uint64_t ui64key = bytes_to_num(key, 6); uint8_t data[1] = { NONCE_FAIL }; @@ -2722,7 +2722,7 @@ void MifareHasStaticEncryptedNonce(uint8_t block_no, uint8_t key_type, uint8_t * iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN); uint32_t cuid = 0; - if (!iso14443a_select_card(uid, NULL, &cuid, true, 0, true)) { + if (iso14443a_select_card(NULL, NULL, &cuid, true, 0, true) == false) { retval = PM3_ESOFT; goto OUT; } @@ -2745,14 +2745,16 @@ void MifareHasStaticEncryptedNonce(uint8_t block_no, uint8_t key_type, uint8_t * goto OUT; }; - if (g_dbglevel >= DBG_INFO) + if (g_dbglevel >= DBG_INFO) { Dbprintf("nt: %x, nt encoded: %x", nt, ntenc); + } - if (oldntenc == 0) + if (oldntenc == 0) { oldntenc = ntenc; - else if (ntenc == oldntenc) + } else if (ntenc == oldntenc) { enc_counter++; } + } if (enc_counter) { data[0] = NONCE_STATIC_ENC; diff --git a/client/src/cmdlf.c b/client/src/cmdlf.c index d16c07c87..ac3985ae0 100644 --- a/client/src/cmdlf.c +++ b/client/src/cmdlf.c @@ -75,7 +75,7 @@ static int CmdHelp(const char *Cmd); // if key event, send break loop cmd to Pm3 int lfsim_wait_check(uint32_t cmd) { PrintAndLogEx(NORMAL, ""); - PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or press " _GREEN_("") " to abort simulation"); + PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or " _GREEN_("") " to abort simulation"); for (;;) { if (kbd_enter_pressed()) { @@ -163,7 +163,7 @@ static int CmdLFTune(const char *Cmd) { style = STYLE_VALUE; PrintAndLogEx(INFO, "Measuring LF antenna at " _YELLOW_("%.2f") " kHz", LF_DIV2FREQ(divisor)); - PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or press " _GREEN_("") " to exit"); + PrintAndLogEx(INFO, "Press " _GREEN_("pm3 button") " or " _GREEN_("") " to exit"); uint8_t params[] = {1, 0}; params[1] = divisor;