Skip to content

Commit

Permalink
Remove debug messages from the info command
Browse files Browse the repository at this point in the history
  • Loading branch information
merlokk committed Dec 11, 2023
1 parent ebe9d72 commit 784e110
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion client/src/cmdhfmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "cmdhw.h" // set_fpga_mode
#include "loclass/cipherutils.h" // BitstreamOut_t
#include "proxendian.h"
#include "preferences.h"
#include "mifare/gen4.h"

static int CmdHelp(const char *Cmd);
Expand Down Expand Up @@ -8816,6 +8817,10 @@ static int CmdHF14AMfInfo(const char *Cmd) {
bool verbose = arg_get_lit(ctx, 3);
CLIParserFree(ctx);

uint8_t dbg_curr = DBG_NONE;
if (getDeviceDebugLevel(&dbg_curr) != PM3_SUCCESS)
return PM3_EFAILED;

clearCommandBuffer();
SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_CONNECT, 0, 0, NULL, 0);
PacketResponseNG resp;
Expand Down Expand Up @@ -8855,6 +8860,9 @@ static int CmdHF14AMfInfo(const char *Cmd) {
PrintAndLogEx(SUCCESS, "ATQA: " _GREEN_("%02X %02X"), card.atqa[1], card.atqa[0]);
PrintAndLogEx(SUCCESS, " SAK: " _GREEN_("%02X [%" PRIu64 "]"), card.sak, resp.oldarg[0]);

if (setDeviceDebugLevel(DBG_NONE, false) != PM3_SUCCESS)
return PM3_EFAILED;

PrintAndLogEx(INFO, "--- " _CYAN_("RNG Information") "---------------------");

int res = detect_classic_static_nonce();
Expand Down Expand Up @@ -8938,7 +8946,8 @@ static int CmdHF14AMfInfo(const char *Cmd) {
mfc_ev1_print_signature(card.uid, card.uidlen, signature, sizeof(signature));
}


if (setDeviceDebugLevel(dbg_curr, false) != PM3_SUCCESS)
return PM3_EFAILED;

PrintAndLogEx(NORMAL, "done...");
return PM3_SUCCESS;
Expand Down

0 comments on commit 784e110

Please sign in to comment.