mifare_nested_scene_about.c 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #include "../mifare_nested_i.h"
  2. void mifare_nested_scene_about_widget_callback(GuiButtonType result, InputType type, void* context) {
  3. MifareNested* mifare_nested = context;
  4. if(type == InputTypeShort) {
  5. view_dispatcher_send_custom_event(mifare_nested->view_dispatcher, result);
  6. }
  7. }
  8. void mifare_nested_scene_about_on_enter(void* context) {
  9. MifareNested* mifare_nested = context;
  10. FuriString* temp_str;
  11. temp_str = furi_string_alloc();
  12. furi_string_printf(temp_str, "\e#%s\n", "Information");
  13. furi_string_cat_printf(temp_str, "Version: %s\n", NESTED_VERSION_APP);
  14. furi_string_cat_printf(temp_str, "Developed by:\n%s\n\n", NESTED_AUTHOR);
  15. furi_string_cat_printf(temp_str, "Github: %s\n\n", NESTED_GITHUB_LINK);
  16. furi_string_cat_printf(temp_str, "\e#%s\n", "Description");
  17. furi_string_cat_printf(
  18. temp_str,
  19. "Ported nested attacks\nfrom proxmark (Iceman fork)\nCurrently supported attacks:\n - nested attack\n - static nested attack\n - hard nested attack\n\n");
  20. furi_string_cat_printf(
  21. temp_str,
  22. "You will need desktop app to recover keys from collected nonces: %s",
  23. NESTED_RECOVER_KEYS_GITHUB_LINK);
  24. widget_add_text_box_element(
  25. mifare_nested->widget,
  26. 0,
  27. 0,
  28. 128,
  29. 14,
  30. AlignCenter,
  31. AlignBottom,
  32. "\e#\e! \e!\n",
  33. false);
  34. widget_add_text_box_element(
  35. mifare_nested->widget,
  36. 0,
  37. 2,
  38. 128,
  39. 14,
  40. AlignCenter,
  41. AlignBottom,
  42. "\e#\e! Flipper (Mifare) Nested \e!\n",
  43. false);
  44. widget_add_text_scroll_element(
  45. mifare_nested->widget, 0, 16, 128, 50, furi_string_get_cstr(temp_str));
  46. furi_string_free(temp_str);
  47. view_dispatcher_switch_to_view(mifare_nested->view_dispatcher, MifareNestedViewWidget);
  48. }
  49. bool mifare_nested_scene_about_on_event(void* context, SceneManagerEvent event) {
  50. MifareNested* mifare_nested = context;
  51. bool consumed = false;
  52. UNUSED(mifare_nested);
  53. UNUSED(event);
  54. return consumed;
  55. }
  56. void mifare_nested_scene_about_on_exit(void* context) {
  57. MifareNested* mifare_nested = context;
  58. // Clear views
  59. widget_reset(mifare_nested->widget);
  60. }