mifare_nested_scene_about.c 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 Proxmark3 (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\n\n",
  23. NESTED_RECOVER_KEYS_GITHUB_LINK);
  24. furi_string_cat_printf(temp_str, "\e#%s\n", "Quick guide");
  25. furi_string_cat_printf(temp_str, "1. Install key recovery script on PC:\n");
  26. furi_string_cat_printf(temp_str, "pip install FlipperNested\n");
  27. furi_string_cat_printf(temp_str, "2. Connect Flipper Zero to PC\n");
  28. furi_string_cat_printf(temp_str, "3. Run key recovery:\n");
  29. furi_string_cat_printf(temp_str, "FlipperNested");
  30. widget_add_text_box_element(
  31. mifare_nested->widget,
  32. 0,
  33. 0,
  34. 128,
  35. 14,
  36. AlignCenter,
  37. AlignBottom,
  38. "\e#\e! \e!\n",
  39. false);
  40. widget_add_text_box_element(
  41. mifare_nested->widget,
  42. 0,
  43. 2,
  44. 128,
  45. 14,
  46. AlignCenter,
  47. AlignBottom,
  48. "\e#\e! Flipper (Mifare) Nested \e!\n",
  49. false);
  50. widget_add_text_scroll_element(
  51. mifare_nested->widget, 0, 16, 128, 50, furi_string_get_cstr(temp_str));
  52. furi_string_free(temp_str);
  53. view_dispatcher_switch_to_view(mifare_nested->view_dispatcher, MifareNestedViewWidget);
  54. }
  55. bool mifare_nested_scene_about_on_event(void* context, SceneManagerEvent event) {
  56. MifareNested* mifare_nested = context;
  57. bool consumed = false;
  58. UNUSED(mifare_nested);
  59. UNUSED(event);
  60. return consumed;
  61. }
  62. void mifare_nested_scene_about_on_exit(void* context) {
  63. MifareNested* mifare_nested = context;
  64. // Clear views
  65. widget_reset(mifare_nested->widget);
  66. }