From 2d932e49ac62d483a97a868d51f1b160c5708c7b Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Fri, 30 Nov 2018 20:28:34 +0200 Subject: [PATCH 1/2] https://github.com/Proxmark/proxmark3/pull/725 --- client/cmdhffido.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cmdhffido.c b/client/cmdhffido.c index 273982bed..9ce554ce2 100644 --- a/client/cmdhffido.c +++ b/client/cmdhffido.c @@ -456,7 +456,7 @@ int CmdHFFidoAuthenticate(const char *cmd) { // public key CLIGetHexWithReturn(8, hdata, &hdatalen); - if (hdatalen && hdatalen != 130) { + if (hdatalen && hdatalen != 65) { PrintAndLog("ERROR: public key length must be 65 bytes only."); return 1; } From 7c8377839ebf06f9951eff976930b6ff37ddcf6f Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Fri, 30 Nov 2018 20:33:46 +0200 Subject: [PATCH 2/2] 4k fix --- client/cmdhfmf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 48a235ffd..8653a8994 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -554,8 +554,11 @@ int CmdHF14AMfRdBl(const char *Cmd) { if (mfIsSectorTrailer(blockNo) && (data[6] || data[7] || data[8])) { PrintAndLogEx(NORMAL, "Trailer decoded:"); + int bln = mfFirstBlockOfSector(mfSectorNum(blockNo)); + int blinc = (mfNumBlocksPerSector(mfSectorNum(blockNo)) > 4) ? 5 : 1; for (int i = 0; i < 4; i++) { - PrintAndLogEx(NORMAL, "Access block %d: %s", i + mfFirstBlockOfSector(mfSectorNum(blockNo)), mfGetAccessConditionsDesc(i, &data[6])); + PrintAndLogEx(NORMAL, "Access block %d%s: %s", bln, ((blinc > 1) && (i < 3) ? "+" : "") , mfGetAccessConditionsDesc(i, &data[6])); + bln += blinc; } PrintAndLogEx(NORMAL, "UserData: %s", sprint_hex_inrow(&data[9], 1)); } @@ -2775,8 +2778,11 @@ int CmdHF14AMfCGetBlk(const char *Cmd) { PrintAndLogEx(NORMAL, "Trailer decoded:"); PrintAndLogEx(NORMAL, "Key A: %s", sprint_hex_inrow(data, 6)); PrintAndLogEx(NORMAL, "Key B: %s", sprint_hex_inrow(&data[10], 6)); + int bln = mfFirstBlockOfSector(mfSectorNum(blockNo)); + int blinc = (mfNumBlocksPerSector(mfSectorNum(blockNo)) > 4) ? 5 : 1; for (int i = 0; i < 4; i++) { - PrintAndLogEx(NORMAL, "Access block %d: %s", i + mfFirstBlockOfSector(mfSectorNum(blockNo)), mfGetAccessConditionsDesc(i, &data[6])); + PrintAndLogEx(NORMAL, "Access block %d%s: %s", bln, ((blinc > 1) && (i < 3) ? "+" : "") , mfGetAccessConditionsDesc(i, &data[6])); + bln += blinc; } PrintAndLogEx(NORMAL, "UserData: %s", sprint_hex_inrow(&data[9], 1)); }