From 7bf6e0d089c8be249d6086f31ab34d70d1b38c2d Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 8 Feb 2018 09:30:34 +0100 Subject: [PATCH] fix: 'hf iclass chk' - checking keys outside the first chunk of 128. --- client/cmdhficlass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cmdhficlass.c b/client/cmdhficlass.c index a24670be3..9f3a5c59b 100644 --- a/client/cmdhficlass.c +++ b/client/cmdhficlass.c @@ -1974,7 +1974,7 @@ int CmdHFiClassCheckKeys(const char *Cmd) { return 1; } - PrintAndLog("[+] Generating diversified keys and MAC"); + PrintAndLog("[+] Generating diversified keys, MAC"); PrintAndLog("[+] CSN | %s", sprint_hex( CSN, sizeof(CSN) )); PrintAndLog("[+] CCNR | %s", sprint_hex( CCNR, sizeof(CCNR) )); res = GenerateMacFromKeyFile( CSN, CCNR, use_raw, use_elite, keyBlock, keycnt, pre ); @@ -2009,7 +2009,7 @@ int CmdHFiClassCheckKeys(const char *Cmd) { lastChunk = true; UsbCommand c = {CMD_ICLASS_CHECK_KEYS, { (lastChunk << 8), keys, 0}}; - memcpy(c.d.asBytes, pre, 4 * keys); + memcpy(c.d.asBytes, pre + i, 4 * keys); clearCommandBuffer(); SendCommand(&c); UsbCommand resp;