|
@@ -1,6 +1,8 @@
|
|
|
#pragma once
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <dialogs/dialogs.h>
|
|
#include <dialogs/dialogs.h>
|
|
|
|
|
+#include <dolphin/dolphin.h>
|
|
|
|
|
+#include <furi.h>
|
|
|
#include <gui/gui.h>
|
|
#include <gui/gui.h>
|
|
|
#include <gui/modules/loading.h>
|
|
#include <gui/modules/loading.h>
|
|
|
#include <gui/modules/text_box.h>
|
|
#include <gui/modules/text_box.h>
|
|
@@ -9,18 +11,24 @@
|
|
|
#include <gui/scene_manager.h>
|
|
#include <gui/scene_manager.h>
|
|
|
#include <gui/view_dispatcher.h>
|
|
#include <gui/view_dispatcher.h>
|
|
|
#include <gui/view_stack.h>
|
|
#include <gui/view_stack.h>
|
|
|
|
|
+#include <input/input.h>
|
|
|
|
|
+#include <notification/notification.h>
|
|
|
|
|
+#include <notification/notification_messages.h>
|
|
|
|
|
+#include <stdio.h>
|
|
|
|
|
|
|
|
#include "blackhat_app.h"
|
|
#include "blackhat_app.h"
|
|
|
#include "blackhat_custom_event.h"
|
|
#include "blackhat_custom_event.h"
|
|
|
#include "blackhat_uart.h"
|
|
#include "blackhat_uart.h"
|
|
|
#include "scenes/blackhat_scene.h"
|
|
#include "scenes/blackhat_scene.h"
|
|
|
|
|
|
|
|
-#define NUM_MENU_ITEMS (16)
|
|
|
|
|
|
|
+#define NUM_MENU_ITEMS (18)
|
|
|
|
|
|
|
|
#define BLACKHAT_TEXT_BOX_STORE_SIZE (4096)
|
|
#define BLACKHAT_TEXT_BOX_STORE_SIZE (4096)
|
|
|
#define UART_CH FuriHalSerialIdUsart
|
|
#define UART_CH FuriHalSerialIdUsart
|
|
|
|
|
|
|
|
#define SHELL_CMD "whoami"
|
|
#define SHELL_CMD "whoami"
|
|
|
|
|
+#define SCAN_CMD "bh scripts"
|
|
|
|
|
+#define RUN_CMD "bh scripts run"
|
|
|
#define WIFI_CON_CMD "bh wifi connect"
|
|
#define WIFI_CON_CMD "bh wifi connect"
|
|
|
#define SET_INET_SSID_CMD "bh set SSID"
|
|
#define SET_INET_SSID_CMD "bh set SSID"
|
|
|
#define SET_INET_PWD_CMD "bh set PASS"
|
|
#define SET_INET_PWD_CMD "bh set PASS"
|
|
@@ -64,6 +72,15 @@ struct BlackhatApp {
|
|
|
SceneManager* scene_manager;
|
|
SceneManager* scene_manager;
|
|
|
|
|
|
|
|
FuriString* text_box_store;
|
|
FuriString* text_box_store;
|
|
|
|
|
+
|
|
|
|
|
+ // For custom scripts
|
|
|
|
|
+ char* script_text;
|
|
|
|
|
+ size_t script_text_ptr;
|
|
|
|
|
+ int num_scripts;
|
|
|
|
|
+ char* cmd[64];
|
|
|
|
|
+ bool scanned;
|
|
|
|
|
+ VariableItemList* script_item_list;
|
|
|
|
|
+
|
|
|
size_t text_box_store_strlen;
|
|
size_t text_box_store_strlen;
|
|
|
TextBox* text_box;
|
|
TextBox* text_box;
|
|
|
|
|
|
|
@@ -79,10 +96,12 @@ struct BlackhatApp {
|
|
|
char text_store[128];
|
|
char text_store[128];
|
|
|
char text_input_ch[ENTER_NAME_LENGTH];
|
|
char text_input_ch[ENTER_NAME_LENGTH];
|
|
|
bool text_input_req;
|
|
bool text_input_req;
|
|
|
|
|
+ bool is_script_scan;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
typedef enum {
|
|
typedef enum {
|
|
|
BlackhatAppViewVarItemList,
|
|
BlackhatAppViewVarItemList,
|
|
|
|
|
+ BlackhatAppViewScriptItemList,
|
|
|
BlackhatAppViewConsoleOutput,
|
|
BlackhatAppViewConsoleOutput,
|
|
|
BlackhatAppViewStartPortal,
|
|
BlackhatAppViewStartPortal,
|
|
|
BlackhatAppViewTextInput,
|
|
BlackhatAppViewTextInput,
|