Skip to content

Commit

Permalink
using the same hiding of debug logging when performing the magic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iceman1001 committed Dec 30, 2023
1 parent c448205 commit 68f63ec
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 15 additions & 0 deletions client/src/cmdhf14a.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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") "`");

Expand Down

0 comments on commit 68f63ec

Please sign in to comment.