From 8b4eba0d277d206681b80292012deb4cc3efcea2 Mon Sep 17 00:00:00 2001 From: zinongli <131403964+zinongli@users.noreply.github.com> Date: Sat, 11 Oct 2025 00:25:57 +0400 Subject: [PATCH] Update cmdhf14b.c --- client/src/cmdhf14b.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/client/src/cmdhf14b.c b/client/src/cmdhf14b.c index 56648c63c..ed7cdefad 100644 --- a/client/src/cmdhf14b.c +++ b/client/src/cmdhf14b.c @@ -2797,12 +2797,12 @@ static int CmdHF14BCalypsoRead(const char *Cmd) { } uint16_t sw = get_sw(response, resplen); - if (sw != ISO7816_OK) { - PrintAndLogEx(INFO, "%s - command failed (%04x - %s).", cmds[i].desc, sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); - continue; + if (sw == ISO7816_OK) { + PrintAndLogEx(SUCCESS, "%-22s - %s", cmds[i].desc, sprint_hex(response, resplen - 2)); + } else { + PrintAndLogEx(INFO, "%-22s - Sending command failed (%04x - %s).", cmds[i].desc, sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); } - - PrintAndLogEx(INFO, "%-22s - %s", cmds[i].desc, sprint_hex(response, resplen - 2)); + activate_field = false; } @@ -2968,12 +2968,11 @@ static int CmdHF14BMobibRead(const char *Cmd) { } uint16_t sw = get_sw(response, resplen); - if (sw != ISO7816_OK) { - PrintAndLogEx(ERR, "Sending command failed (%04x - %s).", sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); - switch_off_field_14b(); - return PM3_ESOFT; + if (sw == ISO7816_OK) { + PrintAndLogEx(SUCCESS, "%-22s - %s", cmds[i].desc, sprint_hex(response, resplen - 2)); + } else { + PrintAndLogEx(INFO, "%-22s - Sending command failed (%04x - %s).", cmds[i].desc, sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); } - PrintAndLogEx(INFO, "%-22s - %s", cmds[i].desc, sprint_hex(response, resplen - 2)); activate_field = false; }