diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c447b941..193b98e0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,9 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] - - Changed `hf 14a info` magic detection to better detect different GDM/USCUID configurations and improved Gen2/CUID detection when default keys are used (@nvx) - - Changed `hf_cardhopper` standalone mode to allow running over the internal Proxmark3 USB-CDC serial port (@nvx) + - Changed `hf 14a info` - disabled debug logging while performing the magic tests @iceman1001 + - Changed `hf 14a info` - magic detection to better detect different GDM/USCUID configurations and improved Gen2/CUID detection when default keys are used (@nvx) + - Changed `hf_cardhopper` - standalone mode to allow running over the internal Proxmark3 USB-CDC serial port (@nvx) - Fixed CLI prompt - Update connection type prompt after running `hw connect` (@wh201906) - Changed `uart_receive()` - Check if TCP connection is lost (@wh201906) - Change `data detectclock` - now tries all clocks if called w/o any params (@iceman1001) diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index 5fe74d6b9..b4428e01f 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -42,6 +42,7 @@ #include "desfire.h" // desfire enums #include "mifare/desfirecore.h" // desfire context #include "mifare/mifaredefault.h" +#include "preferences.h" // get/set device debug level static bool g_apdu_in_framing_enable = true; bool Get_apdu_in_framing(void) { @@ -1862,6 +1863,12 @@ static void get_compact_tlv(uint8_t *d, uint8_t n) { } int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) { + + uint8_t dbg_curr = DBG_NONE; + if (getDeviceDebugLevel(&dbg_curr) != PM3_SUCCESS) { + return PM3_EFAILED; + } + clearCommandBuffer(); SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_CONNECT | ISO14A_NO_DISCONNECT, 0, 0, NULL, 0); PacketResponseNG resp; @@ -2397,6 +2404,10 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) { select_status = 2; } + if (setDeviceDebugLevel(verbose ? DBG_INFO : DBG_NONE, false) != PM3_SUCCESS) { + return PM3_EFAILED; + } + int isMagic = 0; if (isMifareClassic) { isMagic = detect_mf_magic(true); @@ -2436,6 +2447,10 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) { PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf mf`") " commands"); } + if (setDeviceDebugLevel(dbg_curr, false) != PM3_SUCCESS) { + return PM3_EFAILED; + } + if (isMifareUltralight) PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf mfu info") "`");