From 8693083747ac853408c1a45cc0b8676074cc393c Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 11 Oct 2020 19:43:56 +0200 Subject: [PATCH] fix em 4x05 dump indexes --- client/src/cmdlfem4x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/cmdlfem4x.c b/client/src/cmdlfem4x.c index e68d83b78..d28a0d899 100644 --- a/client/src/cmdlfem4x.c +++ b/client/src/cmdlfem4x.c @@ -1065,15 +1065,15 @@ static int CmdEM4x05Dump(const char *Cmd) { } // Print blocks 14 and 15 // Both lock bits are protected with bit idx 14 (special case) + addr = 14; if (status14 == PM3_SUCCESS) { - addr = 14; lockbit = (lock_bits >> addr) & 1; PrintAndLogEx(NORMAL, " %02u | %08X | %s | %s | %-10s %s", addr, data[addr], sprint_ascii(bytes, 4), gotLockBits ? (lockbit ? _RED_("x") : " ") : _YELLOW_("?"), info[addr], lockInPW2 ? "" : _GREEN_("active")); } else { PrintAndLogEx(NORMAL, " %02u | | | | %-10s %s", addr, info[addr], status14 == PM3_EFAILED ? _RED_("read denied") : _RED_("read failed")); } + addr = 15; if (status15 == PM3_SUCCESS) { - addr = 15; lockbit = (lock_bits >> 14) & 1; // beware lock bit of word15 is pr14 PrintAndLogEx(NORMAL, " %02u | %08X | %s | %s | %-10s %s", addr, data[addr], sprint_ascii(bytes, 4), gotLockBits ? (lockbit ? _RED_("x") : " ") : _YELLOW_("?"), info[addr], lockInPW2 ? _GREEN_("active") : ""); } else {