using the same hiding of debug logging when performing the magic tests

This commit is contained in:
iceman1001 2023-12-30 21:02:16 +01:00
parent c448205732
commit 68f63ec739
2 changed files with 18 additions and 2 deletions

View file

@ -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)

View file

@ -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") "`");