From e6ba05569d437c41142a36d6fe1507fa7ab0806a Mon Sep 17 00:00:00 2001 From: Eric Betts Date: Wed, 20 Dec 2023 03:39:24 -0800 Subject: [PATCH] Picopass config se problem (#90) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: あく --- .catalog/changelog.md | 2 ++ scenes/picopass_scene_read_card_success.c | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.catalog/changelog.md b/.catalog/changelog.md index ab6a29f25e1..8482c04d201 100644 --- a/.catalog/changelog.md +++ b/.catalog/changelog.md @@ -2,6 +2,8 @@ - Update working with keys with new API - Display more tag information - Add additional keys to elite dict + - Correct config card detection so it doesn't happen for SE cards (read using nr-mac partial read) + - Have back button go to start menu instead of read retry ## 1.10 - Fix missing folder in readme - Allow partial save for any read failure diff --git a/scenes/picopass_scene_read_card_success.c b/scenes/picopass_scene_read_card_success.c index a2b602a328a..4b6a61ce51a 100644 --- a/scenes/picopass_scene_read_card_success.c +++ b/scenes/picopass_scene_read_card_success.c @@ -52,7 +52,6 @@ void picopass_scene_read_card_success_on_enter(void* context) { if(pacs->se_enabled) { furi_string_cat_printf(credential_str, "SE enabled"); - } else if(!hid_csn) { furi_string_cat_printf(credential_str, "Non-HID CSN"); } @@ -69,6 +68,15 @@ void picopass_scene_read_card_success_on_enter(void* context) { "More", picopass_scene_read_card_success_widget_callback, picopass); + } else if(pacs->se_enabled) { + furi_string_cat_printf(credential_str, "SE enabled"); + furi_string_cat_printf(wiegand_str, "SIO"); + widget_add_button_element( + widget, + GuiButtonTypeRight, + "More", + picopass_scene_read_card_success_widget_callback, + picopass); } else if(configCard) { furi_string_cat_printf(wiegand_str, "Config Card"); } else if(empty) { @@ -86,9 +94,6 @@ void picopass_scene_read_card_success_on_enter(void* context) { } else { furi_string_cat_printf(wiegand_str, "Invalid PACS"); } - if(pacs->se_enabled) { - furi_string_cat_printf(credential_str, "SE enabled"); - } widget_add_button_element( widget, GuiButtonTypeCenter, @@ -190,6 +195,10 @@ bool picopass_scene_read_card_success_on_event(void* context, SceneManagerEvent consumed = scene_manager_search_and_switch_to_another_scene( picopass->scene_manager, PicopassSceneStart); } + } else if(event.type == SceneManagerEventTypeBack) { + scene_manager_search_and_switch_to_previous_scene( + picopass->scene_manager, PicopassSceneStart); + consumed = true; } return consumed; }