Merge pull request #3000 from zinongli/calypso_mobib_improve

`hf 14b mobib`: Less Strict Loop Logic
This commit is contained in:
Iceman authored and GitHub committed 2025-10-10 23:26:28 +02:00
commit 5e8a831759
1 file changed
+9 -10
+9 -10
View File
@@ -2797,12 +2797,12 @@ static int CmdHF14BCalypsoRead(const char *Cmd) {
} }
uint16_t sw = get_sw(response, resplen); uint16_t sw = get_sw(response, resplen);
if (sw != ISO7816_OK) { if (sw == ISO7816_OK) {
PrintAndLogEx(INFO, "%s - command failed (%04x - %s).", cmds[i].desc, sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); PrintAndLogEx(SUCCESS, "%-22s - %s", cmds[i].desc, sprint_hex(response, resplen - 2));
continue; } 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; activate_field = false;
} }
@@ -2968,12 +2968,11 @@ static int CmdHF14BMobibRead(const char *Cmd) {
} }
uint16_t sw = get_sw(response, resplen); uint16_t sw = get_sw(response, resplen);
if (sw != ISO7816_OK) { if (sw == ISO7816_OK) {
PrintAndLogEx(ERR, "Sending command failed (%04x - %s).", sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); PrintAndLogEx(SUCCESS, "%-22s - %s", cmds[i].desc, sprint_hex(response, resplen - 2));
switch_off_field_14b(); } else {
return PM3_ESOFT; 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; activate_field = false;
} }