Skip to content

Commit

Permalink
1.2.5 - Add missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
AloneLiberty committed Apr 26, 2023
1 parent 71bdf7c commit f15f924
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mifare_nested_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <lib/nfc/nfc_device.h>
#include "mifare_nested_icons.h"

#define NESTED_VERSION_APP "1.2.4"
#define NESTED_VERSION_APP "1.2.5"
#define NESTED_GITHUB_LINK "https://github.com/AloneLiberty/FlipperNested"
#define NESTED_RECOVER_KEYS_GITHUB_LINK "https://github.com/AloneLiberty/FlipperNestedRecovery"
#define NESTED_NONCE_FORMAT_VERSION "3"
Expand Down
60 changes: 60 additions & 0 deletions scenes/mifare_nested_scene_static_encrypted_nonce.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#include "../mifare_nested_i.h"

void mifare_nested_scene_static_encrypted_nonce_widget_callback(
GuiButtonType result,
InputType type,
void* context) {
MifareNested* mifare_nested = context;
if(type == InputTypeShort) {
view_dispatcher_send_custom_event(mifare_nested->view_dispatcher, result);
}
}

void mifare_nested_scene_static_encrypted_nonce_on_enter(void* context) {
MifareNested* mifare_nested = context;
Widget* widget = mifare_nested->widget;

notification_message(mifare_nested->notifications, &sequence_error);

widget_add_icon_element(widget, 73, 12, &I_DolphinCry);
widget_add_string_element(
widget, 1, 9, AlignLeft, AlignTop, FontPrimary, "Static encrypted nonce");
widget_add_string_element(
widget, 1, 19, AlignLeft, AlignTop, FontSecondary, "This tag can't be");
widget_add_string_element(
widget, 1, 29, AlignLeft, AlignTop, FontSecondary, "used with Nested");
widget_add_string_element(widget, 1, 39, AlignLeft, AlignTop, FontSecondary, "attack.");

widget_add_button_element(
widget,
GuiButtonTypeLeft,
"Back",
mifare_nested_scene_static_encrypted_nonce_widget_callback,
mifare_nested);

// Setup and start worker
view_dispatcher_switch_to_view(mifare_nested->view_dispatcher, MifareNestedViewWidget);
}

bool mifare_nested_scene_static_encrypted_nonce_on_event(void* context, SceneManagerEvent event) {
MifareNested* mifare_nested = context;
bool consumed = false;

if(event.type == SceneManagerEventTypeCustom) {
if(event.event == GuiButtonTypeCenter || event.event == GuiButtonTypeLeft) {
scene_manager_search_and_switch_to_previous_scene(mifare_nested->scene_manager, 0);
consumed = true;
}
} else if(event.type == SceneManagerEventTypeBack) {
scene_manager_search_and_switch_to_previous_scene(mifare_nested->scene_manager, 0);
consumed = true;
}

return consumed;
}

void mifare_nested_scene_static_encrypted_nonce_on_exit(void* context) {
MifareNested* mifare_nested = context;

widget_reset(mifare_nested->widget);
}

0 comments on commit f15f924

Please sign in to comment.