diff --git a/application.fam b/application.fam index 0a2227bf753..3df6703b082 100644 --- a/application.fam +++ b/application.fam @@ -10,7 +10,7 @@ App( ], stack_size=4 * 1024, fap_description="App to communicate with NFC tags using the PicoPass(iClass) format", - fap_version="1.4", + fap_version="1.5", fap_icon="125_10px.png", fap_category="NFC", fap_libs=["mbedtls"], diff --git a/picopass_device.h b/picopass_device.h index 026421193d7..4cd4ba83c43 100644 --- a/picopass_device.h +++ b/picopass_device.h @@ -40,6 +40,7 @@ #define PICOPASS_APP_FOLDER ANY_PATH("picopass") #define PICOPASS_APP_EXTENSION ".picopass" +#define PICOPASS_APP_FILE_PREFIX "Picopass" #define PICOPASS_APP_SHADOW_EXTENSION ".pas" #define PICOPASS_DICT_KEY_BATCH_SIZE 10 diff --git a/picopass_worker.c b/picopass_worker.c index b50e9035e3f..494362cfcdc 100644 --- a/picopass_worker.c +++ b/picopass_worker.c @@ -282,11 +282,10 @@ ReturnCode picopass_auth(PicopassWorker* picopass_worker) { return ERR_NONE; } - FURI_LOG_I(TAG, "Starting user dictionary attack [Elite KDF]"); - err = picopass_auth_dict(picopass_worker, IclassEliteDictTypeUser); - if(err == ERR_NONE) { - return ERR_NONE; - } + /* Because size of the user dictionary and could introduce confusing delay + * to the read screen (since there is no feedback), we omit checking it. + * It will be checked when the user uses Elite Dict. Attack, which has a progress bar + */ FURI_LOG_I(TAG, "Starting system dictionary attack [Elite KDF]"); err = picopass_auth_dict(picopass_worker, IclassEliteDictTypeFlipper); @@ -579,7 +578,18 @@ void picopass_worker_elite_dict_attack(PicopassWorker* picopass_worker) { err = rfalPicoPassPollerCheck(mac, &chkRes); if(err == ERR_NONE) { - FURI_LOG_I(TAG, "Found key"); + FURI_LOG_I( + TAG, + "Found key: %02x%02x%02x%02x%02x%02x%02x%02x", + key[0], + key[1], + key[2], + key[3], + key[4], + key[5], + key[6], + key[7]); + memcpy(pacs->key, key, RFAL_PICOPASS_BLOCK_LEN); pacs->elite_kdf = elite; err = picopass_read_card(AA1); diff --git a/scenes/picopass_scene_key_input.c b/scenes/picopass_scene_key_input.c index 73db7715e50..f2a1f2dfbe1 100644 --- a/scenes/picopass_scene_key_input.c +++ b/scenes/picopass_scene_key_input.c @@ -1,4 +1,5 @@ #include "../picopass_i.h" +#include #include #include diff --git a/scenes/picopass_scene_read_card_success.c b/scenes/picopass_scene_read_card_success.c index 6381b37b3df..f35ac85979e 100644 --- a/scenes/picopass_scene_read_card_success.c +++ b/scenes/picopass_scene_read_card_success.c @@ -37,7 +37,9 @@ void picopass_scene_read_card_success_on_enter(void* context) { furi_string_cat_printf(csn_str, "%02X", csn[i]); } - bool no_key = picopass_is_memset(pacs->key, 0x00, RFAL_PICOPASS_BLOCK_LEN); + // We can't test the pacs->key in case it is intentionally all 0's and we can't test the key block since it is populated with the diversified key before each key test, so we approximate with the PACS config block being blank. + bool no_key = picopass_is_memset( + AA1[PICOPASS_ICLASS_PACS_CFG_BLOCK_INDEX].data, 0x00, RFAL_PICOPASS_BLOCK_LEN); bool empty = picopass_is_memset( AA1[PICOPASS_ICLASS_PACS_CFG_BLOCK_INDEX].data, 0xFF, RFAL_PICOPASS_BLOCK_LEN); diff --git a/scenes/picopass_scene_save_name.c b/scenes/picopass_scene_save_name.c index 935ee841010..9cb14362298 100644 --- a/scenes/picopass_scene_save_name.c +++ b/scenes/picopass_scene_save_name.c @@ -1,5 +1,5 @@ #include "../picopass_i.h" -#include +#include #include #include @@ -16,7 +16,8 @@ void picopass_scene_save_name_on_enter(void* context) { TextInput* text_input = picopass->text_input; bool dev_name_empty = false; if(!strcmp(picopass->dev->dev_name, "")) { - name_generator_make_auto(picopass->text_store, sizeof(picopass->text_store), "PicoPass"); + name_generator_make_auto( + picopass->text_store, sizeof(picopass->text_store), PICOPASS_APP_FILE_PREFIX); dev_name_empty = true; } else { picopass_text_store_set(picopass, picopass->dev->dev_name);