uart_terminal_app_i.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //** Includes sniffbt and sniffskim for compatible ESP32-WROOM hardware.
  2. // uart_terminal_scene_start.c also changed **//
  3. #pragma once
  4. #include "uart_terminal_app.h"
  5. #include "scenes/uart_terminal_scene.h"
  6. #include "uart_terminal_custom_event.h"
  7. #include "uart_terminal_uart.h"
  8. #include <gui/gui.h>
  9. #include <gui/view_dispatcher.h>
  10. #include <gui/scene_manager.h>
  11. #include <gui/modules/text_box.h>
  12. //#include <gui/modules/text_input.h>
  13. #include <gui/modules/variable_item_list.h>
  14. #include "uart_text_input.h"
  15. #define NUM_MENU_ITEMS (4)
  16. #define UART_TERMINAL_TEXT_BOX_STORE_SIZE (4096)
  17. #define UART_TERMINAL_TEXT_INPUT_STORE_SIZE (512)
  18. struct UART_TerminalApp {
  19. Gui* gui;
  20. ViewDispatcher* view_dispatcher;
  21. SceneManager* scene_manager;
  22. char text_input_store[UART_TERMINAL_TEXT_INPUT_STORE_SIZE + 1];
  23. FuriString* text_box_store;
  24. size_t text_box_store_strlen;
  25. TextBox* text_box;
  26. UART_TextInput* text_input;
  27. //Widget* widget;
  28. VariableItemList* var_item_list;
  29. UART_TerminalUart* uart;
  30. int selected_menu_index;
  31. int selected_option_index[NUM_MENU_ITEMS];
  32. const char* selected_tx_string;
  33. bool is_command;
  34. bool is_custom_tx_string;
  35. bool focus_console_start;
  36. bool show_stopscan_tip;
  37. };
  38. // Supported commands:
  39. // https://github.com/justcallmekoko/ESP32Marauder/wiki/cli
  40. // Scan
  41. // -> If list is empty, then start a new scanap. (Tap any button to stop.)
  42. // -> If there's a list, provide option to rescan and dump list of targets to select.
  43. // -> Press BACK to go back to top-level.
  44. // Attack
  45. // -> Beacon
  46. // -> Deauth
  47. // -> Probe
  48. // -> Rickroll
  49. // Sniff
  50. // -> Beacon
  51. // -> Deauth
  52. // -> ESP
  53. // -> PMKID
  54. // -> Pwnagotchi
  55. // Channel
  56. // Update
  57. // Reboot
  58. typedef enum {
  59. UART_TerminalAppViewVarItemList,
  60. UART_TerminalAppViewConsoleOutput,
  61. UART_TerminalAppViewTextInput,
  62. } UART_TerminalAppView;