From ef24eefea3113616a36175b4c73b935cf75a9fe9 Mon Sep 17 00:00:00 2001 From: RogueMaster Date: Sat, 17 Sep 2022 05:41:21 -0400 Subject: [PATCH] nfc upd --- ReadMe.md | 6 +- applications/main/nfc/nfc.c | 23 +++ applications/main/nfc/nfc_i.h | 2 + .../main/nfc/scenes/nfc_scene_device_info.c | 4 +- .../scenes/nfc_scene_mf_classic_dict_attack.c | 4 +- .../nfc/scenes/nfc_scene_mf_classic_keys.c | 4 +- .../scenes/nfc_scene_mf_ultralight_emulate.c | 165 +++++++++++++++--- .../nfc_scene_mf_ultralight_key_input.c | 2 +- .../nfc_scene_mf_ultralight_read_auth.c | 8 +- .../nfc_scene_mf_ultralight_read_success.c | 22 ++- .../nfc_scene_mf_ultralight_unlock_menu.c | 2 +- .../nfc_scene_mf_ultralight_unlock_warn.c | 2 +- applications/main/nfc/scenes/nfc_scene_read.c | 4 +- .../main/nfc/scenes/nfc_scene_save_name.c | 2 +- .../main/nfc/scenes/nfc_scene_saved_menu.c | 4 +- applications/main/nfc/views/dict_attack.c | 4 +- 16 files changed, 200 insertions(+), 58 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index bd9173733..8fffd74ea 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -15,12 +15,10 @@
TO DO
-- GPIO: Feature to read EEPROM of SFP Modules using I2C [(By marcusju)](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/pull/198) - Settings: Rename from SD `dolphin/name.txt` [(Thanks to E_Surge)](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/pull/259) - Settings: Scan names will have timestamp instead of random name assigned for [NFC](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/blob/420/lib/toolbox/random_name.c) and [SubGHz](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/blob/420/applications/subghz/scenes/subghz_scene_read_raw.c) (By RogueMaster) - SubGHz: [Add settings to subghz read functionality to allow setting RSSI threshold (raw only) (By PolymerPrints)](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/pull/184) - [NFC: Display UL PWD_AUTH payload / ntag-pwd-capture (Thanks to GMMan)](https://github.com/flipperdevices/flipperzero-firmware/pull/1471) -- [I²C-Scanner #1431 (By GitChris3004)](https://github.com/flipperdevices/flipperzero-firmware/pull/1431) - [Decode RAW recordings #1667 (By qistoph)](https://github.com/flipperdevices/flipperzero-firmware/pull/1667) - [Add new card parsers #1503 (By Astrrra)](https://github.com/flipperdevices/flipperzero-firmware/pull/1503) - [Keynote BT plugin: long press on OK to switch between Space and Retur… #1729 (By coded-with-claws)](https://github.com/flipperdevices/flipperzero-firmware/pull/1729) @@ -180,8 +178,8 @@ $ ./fbt plugin_dist FIRMWARE_APP_SET=ext_apps - [2048 (By OlegSchwann)](https://github.com/OlegSchwann/flipperzero-firmware/tree/hackaton/game_2048/applications/game-2048) [(Score By DevMilanIan)](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/pull/186) - [Arkanoid (By gotnull)](https://github.com/gotnull/flipperzero-firmware-wPlugins) [(Score By DevMilanIan)](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/pull/188) -- [Chess (By Okalachev)](https://github.com/okalachev/flipperzero-firmware/tree/chess) Crashes 1st load if FW <~750KB or every load on larger FW -- [Chip8 Emulator (By mega8bit)](https://github.com/mega8bit/flipperzero-firmware) Updated by ESurge. Add SD folder `chip8`, [Get GAMES HERE](https://johnearnest.github.io/chip8Archive/) (Needs Controls Programmed) +- [Chess (By Okalachev)](https://github.com/okalachev/flipperzero-firmware/tree/chess) Crashes 1st load if FW <~750KB or every load on larger FW `Broken?` +- [Chip8 Emulator (By mega8bit)](https://github.com/mega8bit/flipperzero-firmware) Updated by ESurge. Add SD folder `chip8`, [Get GAMES HERE](https://johnearnest.github.io/chip8Archive/) (Needs Controls Programmed) `HIDDEN because its broken` - [Doom (By p4nic4ttack)](https://github.com/p4nic4ttack/doom-flipper-zero/) - [Dice Roller Including SEX/WAR/8BALL/WEED DICE (By RogueMaster)](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/blob/420/applications/dice/dice.c) - [Flappy Bird (By DroomOne)](https://github.com/DroomOne/flipperzero-firmware/tree/dev/applications/flappy_bird) diff --git a/applications/main/nfc/nfc.c b/applications/main/nfc/nfc.c index 432630204..f47a5bac2 100644 --- a/applications/main/nfc/nfc.c +++ b/applications/main/nfc/nfc.c @@ -231,7 +231,30 @@ void nfc_show_loading_popup(void* context, bool show) { } } +static bool nfc_is_hal_ready() { + if(!furi_hal_nfc_is_init()) { + // No connection to the chip, show an error screen + DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS); + DialogMessage* message = dialog_message_alloc(); + dialog_message_set_text( + message, + "Error!\nNFC chip failed to start\n\n\nSend a photo of this to:\nsupport@flipperzero.one", + 0, + 0, + AlignLeft, + AlignTop); + dialog_message_show(dialogs, message); + dialog_message_free(message); + furi_record_close(RECORD_DIALOGS); + return false; + } else { + return true; + } +} + int32_t nfc_app(void* p) { + if(!nfc_is_hal_ready()) return 0; + Nfc* nfc = nfc_alloc(); char* args = p; diff --git a/applications/main/nfc/nfc_i.h b/applications/main/nfc/nfc_i.h index b5d284d5b..60e1c1997 100644 --- a/applications/main/nfc/nfc_i.h +++ b/applications/main/nfc/nfc_i.h @@ -33,6 +33,8 @@ #include #include +#include + #include "rpc/rpc_app.h" #define NFC_TEXT_STORE_SIZE 128 diff --git a/applications/main/nfc/scenes/nfc_scene_device_info.c b/applications/main/nfc/scenes/nfc_scene_device_info.c index 8228c7ea3..245aea5c5 100644 --- a/applications/main/nfc/scenes/nfc_scene_device_info.c +++ b/applications/main/nfc/scenes/nfc_scene_device_info.c @@ -47,7 +47,9 @@ void nfc_scene_device_info_on_enter(void* context) { } string_clear(country_name); } - } else if(dev_data->protocol == NfcDeviceProtocolMifareClassic) { + } else if( + dev_data->protocol == NfcDeviceProtocolMifareClassic || + dev_data->protocol == NfcDeviceProtocolMifareUl) { string_set(temp_str, nfc->dev->dev_data.parsed_data); } diff --git a/applications/main/nfc/scenes/nfc_scene_mf_classic_dict_attack.c b/applications/main/nfc/scenes/nfc_scene_mf_classic_dict_attack.c index b23f4b8f1..8f40dc0c8 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_classic_dict_attack.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_classic_dict_attack.c @@ -57,7 +57,7 @@ static void nfc_scene_mf_classic_dict_attack_prepare_view(Nfc* nfc, DictAttackSt // If failed to load user dictionary - try flipper dictionary if(!dict) { - FURI_LOG_E(TAG, "User dictionary not found"); + FURI_LOG_E(TAG, "User Dictionary Not Found"); state = DictAttackStateFlipperDictInProgress; } } @@ -66,7 +66,7 @@ static void nfc_scene_mf_classic_dict_attack_prepare_view(Nfc* nfc, DictAttackSt dict_attack_set_header(nfc->dict_attack, "Mf Classic Flipper Dict."); dict = mf_classic_dict_alloc(MfClassicDictTypeFlipper); if(!dict) { - FURI_LOG_E(TAG, "Flipper dictionary not found"); + FURI_LOG_E(TAG, "Flipper Dictionary Not Found"); // Pass through to let worker handle the failure } } diff --git a/applications/main/nfc/scenes/nfc_scene_mf_classic_keys.c b/applications/main/nfc/scenes/nfc_scene_mf_classic_keys.c index fcb8bc189..566adb389 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_classic_keys.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_classic_keys.c @@ -28,9 +28,9 @@ void nfc_scene_mf_classic_keys_on_enter(void* context) { widget_add_string_element( nfc->widget, 0, 0, AlignLeft, AlignTop, FontPrimary, "MF Classic Keys"); char temp_str[32]; - snprintf(temp_str, sizeof(temp_str), "Flipper dict: %ld", flipper_dict_keys_total); + snprintf(temp_str, sizeof(temp_str), "Flipper Dict: %ld", flipper_dict_keys_total); widget_add_string_element(nfc->widget, 0, 20, AlignLeft, AlignTop, FontSecondary, temp_str); - snprintf(temp_str, sizeof(temp_str), "User dict: %ld", user_dict_keys_total); + snprintf(temp_str, sizeof(temp_str), "User Dict: %ld", user_dict_keys_total); widget_add_string_element(nfc->widget, 0, 32, AlignLeft, AlignTop, FontSecondary, temp_str); widget_add_button_element( nfc->widget, GuiButtonTypeCenter, "Add", nfc_scene_mf_classic_keys_widget_callback, nfc); diff --git a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_emulate.c b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_emulate.c index 712ddc077..d964e6b11 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_emulate.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_emulate.c @@ -1,34 +1,109 @@ #include "../nfc_i.h" +#include #include -#define NFC_MF_UL_DATA_NOT_CHANGED (0UL) -#define NFC_MF_UL_DATA_CHANGED (1UL) +#define NFC_SCENE_MF_ULTRALIGHT_EMULATE_LOG_SIZE_MAX (200) + +enum { + // View states + NfcSceneMfUltralightEmulateStateWidget, + NfcSceneMfUltralightEmulateStateTextBox, + NfcSceneMfUltralightEmulateStateMax = 0xFF, + // State flags + NfcSceneMfUltralightEmulateStateDataChanged = 1 << 8, + NfcSceneMfUltralightEmulateStateAuthAttempted = 1 << 9, + NfcSceneMfUltralightEmulateStateLogButtonShown = 1 << 10, +}; bool nfc_mf_ultralight_emulate_worker_callback(NfcWorkerEvent event, void* context) { - UNUSED(event); Nfc* nfc = context; + uint32_t state = + scene_manager_get_scene_state(nfc->scene_manager, NfcSceneMfUltralightEmulate); + + if(event == NfcWorkerEventSuccess) + state |= NfcSceneMfUltralightEmulateStateDataChanged; + else if(event == NfcWorkerEventMfUltralightPwdAuth) { + // Don't update if we're exiting + if(nfc_worker_get_state(nfc->worker) != NfcWorkerStateStop) { + // Event data is only available for the duration of this callback, so we're updating the + // text box right here + MfUltralightAuth* auth = nfc_worker_get_event_data(nfc->worker); + if(auth != NULL && + string_size(nfc->text_box_store) < NFC_SCENE_MF_ULTRALIGHT_EMULATE_LOG_SIZE_MAX) { + string_cat(nfc->text_box_store, "PWD:"); + for(size_t i = 0; i < sizeof(auth->pwd.raw); ++i) { + string_cat_printf(nfc->text_box_store, " %02X", auth->pwd.raw[i]); + } + string_push_back(nfc->text_box_store, '\n'); + text_box_set_text(nfc->text_box, string_get_cstr(nfc->text_box_store)); + } + state |= NfcSceneMfUltralightEmulateStateAuthAttempted; + } + } + scene_manager_set_scene_state(nfc->scene_manager, NfcSceneMfUltralightEmulate, state); + view_dispatcher_send_custom_event(nfc->view_dispatcher, NfcCustomEventWorkerExit); - scene_manager_set_scene_state( - nfc->scene_manager, NfcSceneMfUltralightEmulate, NFC_MF_UL_DATA_CHANGED); return true; } +void nfc_scene_mf_ultralight_emulate_widget_callback( + GuiButtonType result, + InputType type, + void* context) { + furi_assert(context); + Nfc* nfc = context; + if(type == InputTypeShort) { + view_dispatcher_send_custom_event(nfc->view_dispatcher, result); + } +} + +void nfc_scene_mf_ultralight_emulate_widget_config(Nfc* nfc, bool auth_attempted) { + Widget* widget = nfc->widget; + widget_reset(widget); + string_t info_str; + string_init(info_str); + + widget_add_icon_element(widget, 0, 3, &I_RFIDDolphinSend_97x61); + if(strcmp(nfc->dev->dev_name, "")) { + string_printf(info_str, "Emulating\n%s", nfc->dev->dev_name); + } else { + string_printf(info_str, "Emulating\nMf Ultralight"); + } + + widget_add_string_multiline_element( + widget, 56, 31, AlignLeft, AlignTop, FontPrimary, string_get_cstr(info_str)); + string_clear(info_str); + if(auth_attempted) { + widget_add_button_element( + widget, + GuiButtonTypeCenter, + "Log", + nfc_scene_mf_ultralight_emulate_widget_callback, + nfc); + } +} + void nfc_scene_mf_ultralight_emulate_on_enter(void* context) { Nfc* nfc = context; + uint32_t state = + scene_manager_get_scene_state(nfc->scene_manager, NfcSceneMfUltralightEmulate); DOLPHIN_DEED(DolphinDeedNfcEmulate); - // Setup view - Popup* popup = nfc->popup; - if(strcmp(nfc->dev->dev_name, "")) { - nfc_text_store_set(nfc, "Emulating\n%s", nfc->dev->dev_name); - } else { - nfc_text_store_set(nfc, "Emulating\nMf Ultralight", nfc->dev->dev_name); - } - popup_set_icon(popup, 0, 3, &I_RFIDDolphinSend_97x61); - popup_set_header(popup, nfc->text_store, 56, 31, AlignLeft, AlignTop); + // Setup Widget + nfc_scene_mf_ultralight_emulate_widget_config(nfc, false); + state &= ~NfcSceneMfUltralightEmulateStateLogButtonShown; + // Setup TextBox + TextBox* text_box = nfc->text_box; + text_box_set_font(text_box, TextBoxFontHex); + text_box_set_focus(text_box, TextBoxFocusEnd); + string_reset(nfc->text_box_store); - // Setup and start worker - view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup); + // Set Widget state and view + state = (state & ~NfcSceneMfUltralightEmulateStateMax) | + NfcSceneMfUltralightEmulateStateWidget; + scene_manager_set_scene_state(nfc->scene_manager, NfcSceneMfUltralightEmulate, state); + view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewWidget); + // Start worker nfc_worker_start( nfc->worker, NfcWorkerStateMfUltralightEmulate, @@ -40,28 +115,64 @@ void nfc_scene_mf_ultralight_emulate_on_enter(void* context) { bool nfc_scene_mf_ultralight_emulate_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = context; + uint32_t state = + scene_manager_get_scene_state(nfc->scene_manager, NfcSceneMfUltralightEmulate); bool consumed = false; - if(event.type == SceneManagerEventTypeBack) { - // Stop worker - nfc_worker_stop(nfc->worker); - // Check if data changed and save in shadow file - if(scene_manager_get_scene_state(nfc->scene_manager, NfcSceneMfUltralightEmulate) == - NFC_MF_UL_DATA_CHANGED) { - scene_manager_set_scene_state( - nfc->scene_manager, NfcSceneMfUltralightEmulate, NFC_MF_UL_DATA_NOT_CHANGED); - nfc_device_save_shadow(nfc->dev, nfc->dev->dev_name); + if(event.type == SceneManagerEventTypeCustom) { + if(event.event == NfcCustomEventWorkerExit) { + if(state & NfcSceneMfUltralightEmulateStateAuthAttempted) { + if(!(state & NfcSceneMfUltralightEmulateStateLogButtonShown)) { + // Add log button to widget not already showing + nfc_scene_mf_ultralight_emulate_widget_config(nfc, true); + state |= NfcSceneMfUltralightEmulateStateLogButtonShown; + } + // The text box update logic is handled in the worker callback + state &= ~NfcSceneMfUltralightEmulateStateAuthAttempted; + scene_manager_set_scene_state( + nfc->scene_manager, NfcSceneMfUltralightEmulate, state); + consumed = true; + } + } else if( + event.event == GuiButtonTypeCenter && (state & NfcSceneMfUltralightEmulateStateMax) == + NfcSceneMfUltralightEmulateStateWidget) { + view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewTextBox); + state = (state & ~NfcSceneMfUltralightEmulateStateMax) | + NfcSceneMfUltralightEmulateStateTextBox; + scene_manager_set_scene_state(nfc->scene_manager, NfcSceneMfUltralightEmulate, state); + consumed = true; + } + } else if(event.type == SceneManagerEventTypeBack) { + if((state & NfcSceneMfUltralightEmulateStateMax) == + NfcSceneMfUltralightEmulateStateTextBox) { + view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewWidget); + state = (state & ~NfcSceneMfUltralightEmulateStateMax) | + NfcSceneMfUltralightEmulateStateWidget; + scene_manager_set_scene_state(nfc->scene_manager, NfcSceneMfUltralightEmulate, state); + consumed = true; } - consumed = false; } return consumed; } void nfc_scene_mf_ultralight_emulate_on_exit(void* context) { Nfc* nfc = context; + uint32_t state = + scene_manager_get_scene_state(nfc->scene_manager, NfcSceneMfUltralightEmulate); + + // Stop worker + nfc_worker_stop(nfc->worker); + // Check if data changed and save in shadow file + if(state & NfcSceneMfUltralightEmulateStateDataChanged) { + state &= ~NfcSceneMfUltralightEmulateStateDataChanged; + scene_manager_set_scene_state(nfc->scene_manager, NfcSceneMfUltralightEmulate, state); + nfc_device_save_shadow(nfc->dev, nfc->dev->dev_name); + } // Clear view - popup_reset(nfc->popup); + widget_reset(nfc->widget); + text_box_reset(nfc->text_box); + string_reset(nfc->text_box_store); nfc_blink_stop(nfc); } diff --git a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_key_input.c b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_key_input.c index 089187d5b..174d1a406 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_key_input.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_key_input.c @@ -11,7 +11,7 @@ void nfc_scene_mf_ultralight_key_input_on_enter(void* context) { // Setup view ByteInput* byte_input = nfc->byte_input; - byte_input_set_header_text(byte_input, "Enter the password in hex"); + byte_input_set_header_text(byte_input, "Enter The Password In Hex"); byte_input_set_result_callback( byte_input, nfc_scene_mf_ultralight_key_input_byte_input_callback, diff --git a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_read_auth.c b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_read_auth.c index 1a106bdb4..642032244 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_read_auth.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_read_auth.c @@ -26,19 +26,19 @@ void nfc_scene_mf_ultralight_read_auth_set_state(Nfc* nfc, NfcSceneMfUlReadState if(state == NfcSceneMfUlReadStateDetecting) { popup_reset(nfc->popup); popup_set_text( - nfc->popup, "Apply card to\nFlipper's back", 97, 24, AlignCenter, AlignTop); + nfc->popup, "Apply Card To\nFlipper's Back", 97, 24, AlignCenter, AlignTop); popup_set_icon(nfc->popup, 0, 8, &I_NFC_manual); } else if(state == NfcSceneMfUlReadStateReading) { popup_reset(nfc->popup); popup_set_header( - nfc->popup, "Reading card\nDon't move...", 85, 24, AlignCenter, AlignTop); + nfc->popup, "Reading Card\nDon't Move...", 85, 24, AlignCenter, AlignTop); popup_set_icon(nfc->popup, 12, 23, &A_Loading_24); } else if(state == NfcSceneMfUlReadStateNotSupportedCard) { popup_reset(nfc->popup); - popup_set_header(nfc->popup, "Wrong type of card!", 64, 3, AlignCenter, AlignTop); + popup_set_header(nfc->popup, "Wrong Type Of Card!", 64, 3, AlignCenter, AlignTop); popup_set_text( nfc->popup, - "Only MIFARE\nUltralight & NTAG\n are supported", + "Only MIFARE\nUltralight & NTAG\n Are Supported", 4, 22, AlignLeft, diff --git a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_read_success.c b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_read_success.c index 56fa20578..f6dc5984e 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_read_success.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_read_success.c @@ -34,15 +34,19 @@ void nfc_scene_mf_ultralight_read_success_on_enter(void* context) { nfc); string_t temp_str; - string_init_printf(temp_str, "\e#%s\n", nfc_mf_ul_type(mf_ul_data->type, true)); - string_cat_printf(temp_str, "UID:"); - for(size_t i = 0; i < data->uid_len; i++) { - string_cat_printf(temp_str, " %02X", data->uid[i]); - } - string_cat_printf( - temp_str, "\nPages Read: %d/%d", mf_ul_data->data_read / 4, mf_ul_data->data_size / 4); - if(mf_ul_data->data_read != mf_ul_data->data_size) { - string_cat_printf(temp_str, "\nPassword-protected pages!"); + if(string_size(nfc->dev->dev_data.parsed_data)) { + string_init_set(temp_str, nfc->dev->dev_data.parsed_data); + } else { + string_init_printf(temp_str, "\e#%s\n", nfc_mf_ul_type(mf_ul_data->type, true)); + string_cat_printf(temp_str, "UID:"); + for(size_t i = 0; i < data->uid_len; i++) { + string_cat_printf(temp_str, " %02X", data->uid[i]); + } + string_cat_printf( + temp_str, "\nPages Read: %d/%d", mf_ul_data->data_read / 4, mf_ul_data->data_size / 4); + if(mf_ul_data->data_read != mf_ul_data->data_size) { + string_cat_printf(temp_str, "\nPassword-protected pages!"); + } } widget_add_text_scroll_element(widget, 0, 0, 128, 52, string_get_cstr(temp_str)); string_clear(temp_str); diff --git a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_unlock_menu.c b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_unlock_menu.c index 13e3af3eb..648aa31dc 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_unlock_menu.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_unlock_menu.c @@ -26,7 +26,7 @@ void nfc_scene_mf_ultralight_unlock_menu_on_enter(void* context) { nfc); submenu_add_item( submenu, - "Auth As Am11bo", + "Auth As Ameebo", SubmenuIndexMfUlUnlockMenuAmeebo, nfc_scene_mf_ultralight_unlock_menu_submenu_callback, nfc); diff --git a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_unlock_warn.c b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_unlock_warn.c index 58e081db9..708f908cd 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_unlock_warn.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_unlock_warn.c @@ -13,7 +13,7 @@ void nfc_scene_mf_ultralight_unlock_warn_on_enter(void* context) { dialog_ex_set_context(dialog_ex, nfc); dialog_ex_set_result_callback(dialog_ex, nfc_scene_mf_ultralight_unlock_warn_dialog_callback); - dialog_ex_set_header(dialog_ex, "Risky function!", 64, 4, AlignCenter, AlignTop); + dialog_ex_set_header(dialog_ex, "Risky Function!", 64, 4, AlignCenter, AlignTop); dialog_ex_set_text( dialog_ex, "Wrong password\ncan block your\ncard.", 4, 18, AlignLeft, AlignTop); dialog_ex_set_icon(dialog_ex, 73, 20, &I_DolphinCommon_56x48); diff --git a/applications/main/nfc/scenes/nfc_scene_read.c b/applications/main/nfc/scenes/nfc_scene_read.c index da21b9f3d..ca0fd2542 100644 --- a/applications/main/nfc/scenes/nfc_scene_read.c +++ b/applications/main/nfc/scenes/nfc_scene_read.c @@ -25,12 +25,12 @@ void nfc_scene_read_set_state(Nfc* nfc, NfcSceneReadState state) { if(state == NfcSceneReadStateDetecting) { popup_reset(nfc->popup); popup_set_text( - nfc->popup, "Apply card to\nFlipper's back", 97, 24, AlignCenter, AlignTop); + nfc->popup, "Apply Card To\nFlipper's Back", 97, 24, AlignCenter, AlignTop); popup_set_icon(nfc->popup, 0, 8, &I_NFC_manual); } else if(state == NfcSceneReadStateReading) { popup_reset(nfc->popup); popup_set_header( - nfc->popup, "Reading card\nDon't move...", 85, 24, AlignCenter, AlignTop); + nfc->popup, "Reading Card\nDon't Move...", 85, 24, AlignCenter, AlignTop); popup_set_icon(nfc->popup, 12, 23, &A_Loading_24); } scene_manager_set_scene_state(nfc->scene_manager, NfcSceneRead, state); diff --git a/applications/main/nfc/scenes/nfc_scene_save_name.c b/applications/main/nfc/scenes/nfc_scene_save_name.c index d5e05472a..d5a2ada15 100644 --- a/applications/main/nfc/scenes/nfc_scene_save_name.c +++ b/applications/main/nfc/scenes/nfc_scene_save_name.c @@ -22,7 +22,7 @@ void nfc_scene_save_name_on_enter(void* context) { } else { nfc_text_store_set(nfc, nfc->dev->dev_name); } - text_input_set_header_text(text_input, "Name the card"); + text_input_set_header_text(text_input, "Name The Card"); text_input_set_result_callback( text_input, nfc_scene_save_name_text_input_callback, diff --git a/applications/main/nfc/scenes/nfc_scene_saved_menu.c b/applications/main/nfc/scenes/nfc_scene_saved_menu.c index c7aec5d87..c1043b3a7 100644 --- a/applications/main/nfc/scenes/nfc_scene_saved_menu.c +++ b/applications/main/nfc/scenes/nfc_scene_saved_menu.c @@ -91,7 +91,9 @@ bool nfc_scene_saved_menu_on_event(void* context, SceneManagerEvent event) { bool application_info_present = false; if(dev_data->protocol == NfcDeviceProtocolEMV) { application_info_present = true; - } else if(dev_data->protocol == NfcDeviceProtocolMifareClassic) { + } else if( + dev_data->protocol == NfcDeviceProtocolMifareClassic || + dev_data->protocol == NfcDeviceProtocolMifareUl) { application_info_present = nfc_supported_card_verify_and_parse(dev_data); } diff --git a/applications/main/nfc/views/dict_attack.c b/applications/main/nfc/views/dict_attack.c index b4674fd31..7473d9449 100644 --- a/applications/main/nfc/views/dict_attack.c +++ b/applications/main/nfc/views/dict_attack.c @@ -31,7 +31,7 @@ static void dict_attack_draw_callback(Canvas* canvas, void* model) { DictAttackViewModel* m = model; if(m->state == DictAttackStateCardRemoved) { canvas_set_font(canvas, FontPrimary); - canvas_draw_str_aligned(canvas, 64, 4, AlignCenter, AlignTop, "Lost the tag!"); + canvas_draw_str_aligned(canvas, 64, 4, AlignCenter, AlignTop, "Lost The Tag!"); canvas_set_font(canvas, FontSecondary); elements_multiline_text_aligned( canvas, 64, 23, AlignCenter, AlignTop, "Make sure the tag is\npositioned correctly."); @@ -51,7 +51,7 @@ static void dict_attack_draw_callback(Canvas* canvas, void* model) { } elements_progress_bar(canvas, 5, 15, 120, progress); canvas_set_font(canvas, FontSecondary); - snprintf(draw_str, sizeof(draw_str), "Keys found: %d/%d", m->keys_found, m->keys_total); + snprintf(draw_str, sizeof(draw_str), "Keys Found: %d/%d", m->keys_found, m->keys_total); canvas_draw_str_aligned(canvas, 1, 28, AlignLeft, AlignTop, draw_str); snprintf( draw_str, sizeof(draw_str), "Sectors Read: %d/%d", m->sectors_read, m->sectors_total);