diff --git a/armsrc/appmain.c b/armsrc/appmain.c index d3a722fadc..b258b4ff5d 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -2789,7 +2789,7 @@ static void PacketReceived(PacketCommandNG *packet) { LED_B_OFF(); break; } - if (page < spi_flash_pages64k-1) { + if (page < spi_flash_pages64k - 1) { isok = Flash_WipeMemoryPage(page); // let spiffs check and update its info post flash erase rdv40_spiffs_check(); diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index e40d74f2d4..f80005c639 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -9697,8 +9697,8 @@ static int CmdHF14AMfInfo(const char *Cmd) { } if (fKeyType != 0xFF) { - PrintAndLogEx(SUCCESS, "Block 0.... %s | " NOLF, sprint_hex_inrow(blockdata, MFBLOCK_SIZE)); - PrintAndLogEx(NORMAL, "%s", sprint_ascii(blockdata + 8, 8)); + PrintAndLogEx(SUCCESS, "Block 0.... %s | " NOLF, sprint_hex_inrow(blockdata, MFBLOCK_SIZE)); + PrintAndLogEx(NORMAL, "%s", sprint_ascii(blockdata + 8, 8)); } PrintAndLogEx(NORMAL, ""); diff --git a/client/src/proxmark3.c b/client/src/proxmark3.c index 1beb93c2a2..1f80acb88b 100644 --- a/client/src/proxmark3.c +++ b/client/src/proxmark3.c @@ -226,7 +226,6 @@ static void showBanner(void) { PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, " [ " _YELLOW_("%s!")" ]", get_quote()); PrintAndLogEx(NORMAL, " Patreon - https://www.patreon.com/iceman1001/"); - PrintAndLogEx(NORMAL, " Paypal - https://www.paypal.me/iceman1001/"); PrintAndLogEx(NORMAL, ""); // PrintAndLogEx(NORMAL, " Monero"); // PrintAndLogEx(NORMAL, " 43mNJLpgBVaTvyZmX9ajcohpvVkaRy1kbZPm8tqAb7itZgfuYecgkRF36rXrKFUkwEGeZedPsASRxgv4HPBHvJwyJdyvQuP"); diff --git a/common/commonutil.c b/common/commonutil.c index 023ba67ca8..ad867be866 100644 --- a/common/commonutil.c +++ b/common/commonutil.c @@ -575,7 +575,7 @@ int char2int(char c) { return -1; // Invalid character for hex } - // returns the number of bytes written +// returns the number of bytes written int hexstr2ByteArr(const char *hexstr, unsigned char *array, size_t asize) { size_t n = 0; while (hexstr[n] != '\0') { @@ -598,4 +598,4 @@ int hexstr2ByteArr(const char *hexstr, unsigned char *array, size_t asize) { array[i >> 1] = (high << 4) | low; } return n >> 1; -} \ No newline at end of file +} diff --git a/common/generator.c b/common/generator.c index 6338fa33cd..8e6d049191 100644 --- a/common/generator.c +++ b/common/generator.c @@ -556,7 +556,7 @@ int mfc_algo_bambu_one(uint8_t *uid, uint8_t sector, uint8_t keytype, uint64_t * const mbedtls_md_info_t *info = mbedtls_md_info_from_type(MBEDTLS_MD_SHA256); if (keytype == 0) { - mbedtls_hkdf(info, bambu_salt, sizeof(bambu_salt), uid, 4, bambu_context_a, sizeof(bambu_context_a), keys, sizeof(keys) ); + mbedtls_hkdf(info, bambu_salt, sizeof(bambu_salt), uid, 4, bambu_context_a, sizeof(bambu_context_a), keys, sizeof(keys)); } else { mbedtls_hkdf(info, bambu_salt, sizeof(bambu_salt), uid, 4, bambu_context_b, sizeof(bambu_context_b), keys, sizeof(keys)); } @@ -571,7 +571,7 @@ int mfc_algo_bambu_all(uint8_t *uid, uint8_t *keys) { // prepare hmac context const mbedtls_md_info_t *info = mbedtls_md_info_from_type(MBEDTLS_MD_SHA256); - mbedtls_hkdf(info, bambu_salt, sizeof(bambu_salt), uid, 4, bambu_context_a, sizeof(bambu_context_a), keys, (16 * 6) ); + mbedtls_hkdf(info, bambu_salt, sizeof(bambu_salt), uid, 4, bambu_context_a, sizeof(bambu_context_a), keys, (16 * 6)); mbedtls_hkdf(info, bambu_salt, sizeof(bambu_salt), uid, 4, bambu_context_b, sizeof(bambu_context_b), keys + (16 * 6), (16 * 6)); return PM3_SUCCESS; } diff --git a/common_arm/flashmem.c b/common_arm/flashmem.c index 2f85f0b8e3..5aa88b0ebc 100644 --- a/common_arm/flashmem.c +++ b/common_arm/flashmem.c @@ -62,7 +62,7 @@ bool Flash_ReadID(flash_device_type_t *result, bool read_jedec) { // 0x9F JEDEC FlashSendByte(JEDECID); - result->manufacturer_id = (FlashSendByte(0xFF) & 0xFF); + result->manufacturer_id = (FlashSendByte(0xFF) & 0xFF); result->device_id = (FlashSendByte(0xFF) & 0xFF); result->device_id2 = (FlashSendLastByte(0xFF) & 0xFF); } else { @@ -127,7 +127,7 @@ uint16_t Flash_ReadDataCont(uint32_t address, uint8_t *out, uint16_t len) { uint16_t i = 0; for (; i < (len - 1); i++) { - out[i] = ( FlashSendByte(0xFF) & 0xFF); + out[i] = (FlashSendByte(0xFF) & 0xFF); } out[i] = (FlashSendLastByte(0xFF) & 0xFF); return len; @@ -271,7 +271,7 @@ bool Flash_WipeMemory(void) { // Each block is 64Kb. Four blocks // one block erase takes 1s ( 1000ms ) - for (uint8_t i=0; i < spi_flash_pages64k; i++) { + for (uint8_t i = 0; i < spi_flash_pages64k; i++) { Flash_WriteEnable(); Flash_Erase64k(i); Flash_CheckBusy(BUSY_TIMEOUT); @@ -352,17 +352,17 @@ void Flashmem_print_status(void) { } DbpString(" Init.................... " _GREEN_("ok")); - if (spi_flash_data.device_id > 0 ) { + if (spi_flash_data.device_id > 0) { Dbprintf(" Mfr ID / Dev ID......... " _YELLOW_("%02X / %02X"), - spi_flash_data.manufacturer_id, - spi_flash_data.device_id + spi_flash_data.manufacturer_id, + spi_flash_data.device_id ); } if (spi_flash_data.jedec_id > 0) { Dbprintf(" JEDEC Mfr ID / Dev ID... " _YELLOW_("%02X / %04X"), - spi_flash_data.manufacturer_id, - spi_flash_data.jedec_id + spi_flash_data.manufacturer_id, + spi_flash_data.jedec_id ); } @@ -427,9 +427,9 @@ bool FlashDetect(void) { // read using 0x9F (JEDEC) if (Flash_ReadID(&flash_data, true)) { spi_flash_data.manufacturer_id = flash_data.manufacturer_id; - spi_flash_data.jedec_id = (flash_data.device_id <<8) + flash_data.device_id2; + spi_flash_data.jedec_id = (flash_data.device_id << 8) + flash_data.device_id2; ret = true; - } else{ + } else { if (g_dbglevel > 3) Dbprintf("Flash_ReadID failed reading JEDEC (0x9F)"); } // read using 0x90 (Manufacturer / Device ID) @@ -446,7 +446,7 @@ bool FlashDetect(void) { spi_flash_data.device = SpiFlashTable[0].device; if (ret) { - for (int i=0; i < ARRAYLEN(SpiFlashTable); i++) { + for (int i = 0; i < ARRAYLEN(SpiFlashTable); i++) { if (SpiFlashTable[i].manufacturer_id == spi_flash_data.manufacturer_id) { if (SpiFlashTable[i].jedec_id == spi_flash_data.jedec_id) { spi_flash_pages64k = SpiFlashTable[i].pages64k; diff --git a/common_arm/flashmem.h b/common_arm/flashmem.h index d4bb0b127f..b289896462 100644 --- a/common_arm/flashmem.h +++ b/common_arm/flashmem.h @@ -142,7 +142,7 @@ typedef struct { uint16_t jedec_id; uint8_t pages64k; char *device; -}spi_flash_t; +} spi_flash_t; static const spi_flash_t SpiFlashTable[] = { // first element is the default of 4 * 64kB pages (256kB) diff --git a/doc/commands.json b/doc/commands.json index d4c4bcd5bb..ab4a616668 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -4554,7 +4554,7 @@ "-h, --help This help", "--blk Target block", "-b Target key B instead of default key A", - "-c Target Auth 6x" + "-c Target key type is key A + offset" ], "usage": "hf mf darkside [-hb] [--blk ] [-c ]" }, @@ -13003,6 +13003,6 @@ "metadata": { "commands_extracted": 749, "extracted_by": "PM3Help2JSON v1.00", - "extracted_on": "2024-11-15T13:26:34" + "extracted_on": "2024-11-20T22:31:28" } }