From d32c4d5267f6e76f15547dc056d3c89f16d513a6 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 23 May 2019 18:50:24 -0400 Subject: [PATCH] chg: resized flashmem offset for dictionaries to fit --- client/cmdflashmem.c | 6 +++--- include/common.h | 13 +++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/client/cmdflashmem.c b/client/cmdflashmem.c index f9477cdd8..a09ac0ce1 100644 --- a/client/cmdflashmem.c +++ b/client/cmdflashmem.c @@ -307,7 +307,7 @@ static int CmdFlashMemLoad(const char *Cmd) { conn.block_after_ACK = false; free(data); - PrintAndLogEx(SUCCESS, "Wrote %u bytes to offset %u", datalen, start_index); + PrintAndLogEx(SUCCESS, "Wrote "_GREEN_("%u")"bytes to offset "_GREEN_("%u"), datalen, start_index); return PM3_SUCCESS; } static int CmdFlashMemSave(const char *Cmd) { @@ -357,9 +357,9 @@ static int CmdFlashMemSave(const char *Cmd) { return PM3_EMALLOC; } - PrintAndLogEx(NORMAL, "downloading %u bytes from flashmem", len); + PrintAndLogEx(NORMAL, "downloading"_YELLOW_("%u")"bytes from flashmem", len); if (!GetFromDevice(FLASH_MEM, dump, len, start_index, NULL, -1, true)) { - PrintAndLogEx(FAILED, "ERROR; downloading flashmem"); + PrintAndLogEx(FAILED, "ERROR; downloading from flashmemory"); free(dump); return PM3_EFLASH; } diff --git a/include/common.h b/include/common.h index bfb831c2f..eccbc4864 100644 --- a/include/common.h +++ b/include/common.h @@ -90,18 +90,23 @@ extern uint32_t FLASHMEM_SPIBAUDRATE; # define T55XX_CONFIG_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x2000) #endif +// Reserved space for T55XX PWD = 4 kb #ifndef DEFAULT_T55XX_KEYS_OFFSET # define DEFAULT_T55XX_KEYS_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x3000) #endif -#ifndef DEFAULT_MF_KEYS_OFFSET -# define DEFAULT_MF_KEYS_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x4000) +// Reserved space for iClass keys = 4 kb +#ifndef DEFAULT_ICLASS_KEYS_OFFSET +# define DEFAULT_ICLASS_KEYS_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x4000) #endif -#ifndef DEFAULT_ICLASS_KEYS_OFFSET -# define DEFAULT_ICLASS_KEYS_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x5000) +// Reserved space for MIFARE Keys = 8 kb +#ifndef DEFAULT_MF_KEYS_OFFSET +# define DEFAULT_MF_KEYS_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x6000) #endif + + // RDV40, validation structure to help identifying that client/firmware is talking with RDV40 typedef struct { uint8_t magic[4];