"emv reader" - make apdu logging based on verbose flag and honor previous set value. In case we ever do this in Preferences

This commit is contained in:
iceman1001 2024-01-10 15:04:23 +01:00
commit 0b9191185b

View file

@ -2719,6 +2719,9 @@ static int CmdEMVReader(const char *Cmd) {
PrintAndLogEx(INFO, "Press " _GREEN_("<Enter>") " to exit"); PrintAndLogEx(INFO, "Press " _GREEN_("<Enter>") " to exit");
} }
bool old_logging = GetAPDULogging();
SetAPDULogging(verbose);
uint8_t AID[APDU_AID_LEN] = {0}; uint8_t AID[APDU_AID_LEN] = {0};
size_t AIDlen = 0; size_t AIDlen = 0;
uint8_t buf[APDU_RES_LEN] = {0}; uint8_t buf[APDU_RES_LEN] = {0};
@ -2887,6 +2890,8 @@ static int CmdEMVReader(const char *Cmd) {
} while (continuous); } while (continuous);
DropFieldEx(channel); DropFieldEx(channel);
SetAPDULogging(old_logging);
return PM3_SUCCESS; return PM3_SUCCESS;
} }