mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 05:06:30 +04:00
Update wifi marauder
This commit is contained in:
@@ -34,7 +34,7 @@ void wifi_marauder_scene_console_output_on_enter(void* context) {
|
|||||||
app->text_box_store_strlen = 0;
|
app->text_box_store_strlen = 0;
|
||||||
if(0 == strncmp("help", app->selected_tx_string, strlen("help"))) {
|
if(0 == strncmp("help", app->selected_tx_string, strlen("help"))) {
|
||||||
const char* help_msg =
|
const char* help_msg =
|
||||||
"Marauder companion v0.2.2\nFor app support/feedback,\nreach out to me:\n@cococode#6011 (discord)\n0xchocolate (github)\n";
|
"Marauder companion v0.3.0\nFor app support/feedback,\nreach out to me:\n@cococode#6011 (discord)\n0xchocolate (github)\n";
|
||||||
furi_string_cat_str(app->text_box_store, help_msg);
|
furi_string_cat_str(app->text_box_store, help_msg);
|
||||||
app->text_box_store_strlen += strlen(help_msg);
|
app->text_box_store_strlen += strlen(help_msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,13 @@ typedef struct {
|
|||||||
// NUM_MENU_ITEMS defined in wifi_marauder_app_i.h - if you add an entry here, increment it!
|
// NUM_MENU_ITEMS defined in wifi_marauder_app_i.h - if you add an entry here, increment it!
|
||||||
const WifiMarauderItem items[NUM_MENU_ITEMS] = {
|
const WifiMarauderItem items[NUM_MENU_ITEMS] = {
|
||||||
{"View Log from", {"start", "end"}, 2, {"", ""}, NO_ARGS, FOCUS_CONSOLE_TOGGLE, NO_TIP},
|
{"View Log from", {"start", "end"}, 2, {"", ""}, NO_ARGS, FOCUS_CONSOLE_TOGGLE, NO_TIP},
|
||||||
{"Scan AP", {""}, 1, {"scanap"}, NO_ARGS, FOCUS_CONSOLE_END, SHOW_STOPSCAN_TIP},
|
{"Scan",
|
||||||
|
{"ap", "station"},
|
||||||
|
2,
|
||||||
|
{"scanap", "scansta"},
|
||||||
|
NO_ARGS,
|
||||||
|
FOCUS_CONSOLE_END,
|
||||||
|
SHOW_STOPSCAN_TIP},
|
||||||
{"SSID",
|
{"SSID",
|
||||||
{"add rand", "add name", "remove"},
|
{"add rand", "add name", "remove"},
|
||||||
3,
|
3,
|
||||||
@@ -34,12 +40,24 @@ const WifiMarauderItem items[NUM_MENU_ITEMS] = {
|
|||||||
INPUT_ARGS,
|
INPUT_ARGS,
|
||||||
FOCUS_CONSOLE_START,
|
FOCUS_CONSOLE_START,
|
||||||
NO_TIP},
|
NO_TIP},
|
||||||
{"List", {"ap", "ssid"}, 2, {"list -a", "list -s"}, NO_ARGS, FOCUS_CONSOLE_START, NO_TIP},
|
{"List",
|
||||||
{"Select", {"ap", "ssid"}, 2, {"select -a", "select -s"}, INPUT_ARGS, FOCUS_CONSOLE_END, NO_TIP},
|
{"ap", "ssid", "station"},
|
||||||
|
3,
|
||||||
|
{"list -a", "list -s", "list -c"},
|
||||||
|
NO_ARGS,
|
||||||
|
FOCUS_CONSOLE_START,
|
||||||
|
NO_TIP},
|
||||||
|
{"Select",
|
||||||
|
{"ap", "ssid", "station"},
|
||||||
|
3,
|
||||||
|
{"select -a", "select -s", "select -c"},
|
||||||
|
INPUT_ARGS,
|
||||||
|
FOCUS_CONSOLE_END,
|
||||||
|
NO_TIP},
|
||||||
{"Clear List",
|
{"Clear List",
|
||||||
{"ap", "ssid"},
|
{"ap", "ssid", "station"},
|
||||||
2,
|
3,
|
||||||
{"clearlist -a", "clearlist -s"},
|
{"clearlist -a", "clearlist -s", "clearlist -c"},
|
||||||
NO_ARGS,
|
NO_ARGS,
|
||||||
FOCUS_CONSOLE_END,
|
FOCUS_CONSOLE_END,
|
||||||
NO_TIP},
|
NO_TIP},
|
||||||
@@ -50,6 +68,13 @@ const WifiMarauderItem items[NUM_MENU_ITEMS] = {
|
|||||||
NO_ARGS,
|
NO_ARGS,
|
||||||
FOCUS_CONSOLE_END,
|
FOCUS_CONSOLE_END,
|
||||||
SHOW_STOPSCAN_TIP},
|
SHOW_STOPSCAN_TIP},
|
||||||
|
{"Targeted Deauth",
|
||||||
|
{"station", "manual"},
|
||||||
|
2,
|
||||||
|
{"attack -t deauth -c", "attack -t deauth -s"},
|
||||||
|
TOGGLE_ARGS,
|
||||||
|
FOCUS_CONSOLE_END,
|
||||||
|
SHOW_STOPSCAN_TIP},
|
||||||
{"Beacon Spam",
|
{"Beacon Spam",
|
||||||
{"ap list", "ssid list", "random"},
|
{"ap list", "ssid list", "random"},
|
||||||
3,
|
3,
|
||||||
@@ -87,18 +112,19 @@ const WifiMarauderItem items[NUM_MENU_ITEMS] = {
|
|||||||
FOCUS_CONSOLE_END,
|
FOCUS_CONSOLE_END,
|
||||||
NO_TIP},
|
NO_TIP},
|
||||||
{"Settings",
|
{"Settings",
|
||||||
{"display", "restore", "ForcePMKID", "ForceProbe", "SavePCAP", "other"},
|
{"display", "restore", "ForcePMKID", "ForceProbe", "SavePCAP", "EnableLED", "other"},
|
||||||
6,
|
7,
|
||||||
{"settings",
|
{"settings",
|
||||||
"settings -r",
|
"settings -r",
|
||||||
"settings -s ForcePMKID enable",
|
"settings -s ForcePMKID enable",
|
||||||
"settings -s ForceProbe enable",
|
"settings -s ForceProbe enable",
|
||||||
"settings -s SavePCAP enable",
|
"settings -s SavePCAP enable",
|
||||||
|
"settings -s EnableLED enable",
|
||||||
"settings -s"},
|
"settings -s"},
|
||||||
TOGGLE_ARGS,
|
TOGGLE_ARGS,
|
||||||
FOCUS_CONSOLE_START,
|
FOCUS_CONSOLE_START,
|
||||||
NO_TIP},
|
NO_TIP},
|
||||||
{"Update", {""}, 1, {"update -w"}, NO_ARGS, FOCUS_CONSOLE_END, NO_TIP},
|
{"Update", {"ota", "sd"}, 2, {"update -w", "update -s"}, NO_ARGS, FOCUS_CONSOLE_END, NO_TIP},
|
||||||
{"Reboot", {""}, 1, {"reboot"}, NO_ARGS, FOCUS_CONSOLE_END, NO_TIP},
|
{"Reboot", {""}, 1, {"reboot"}, NO_ARGS, FOCUS_CONSOLE_END, NO_TIP},
|
||||||
{"Help", {""}, 1, {"help"}, NO_ARGS, FOCUS_CONSOLE_START, SHOW_STOPSCAN_TIP},
|
{"Help", {""}, 1, {"help"}, NO_ARGS, FOCUS_CONSOLE_START, SHOW_STOPSCAN_TIP},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,13 +3,34 @@
|
|||||||
void wifi_marauder_scene_text_input_callback(void* context) {
|
void wifi_marauder_scene_text_input_callback(void* context) {
|
||||||
WifiMarauderApp* app = context;
|
WifiMarauderApp* app = context;
|
||||||
|
|
||||||
view_dispatcher_send_custom_event(app->view_dispatcher, WifiMarauderEventStartConsole);
|
switch(app->special_case_input_step) {
|
||||||
|
case 0: // most commands
|
||||||
|
view_dispatcher_send_custom_event(app->view_dispatcher, WifiMarauderEventStartConsole);
|
||||||
|
break;
|
||||||
|
case 1: // special case for deauth: save source MAC
|
||||||
|
view_dispatcher_send_custom_event(app->view_dispatcher, WifiMarauderEventSaveSourceMac);
|
||||||
|
break;
|
||||||
|
case 2: // special case for deauth: save destination MAC
|
||||||
|
view_dispatcher_send_custom_event(
|
||||||
|
app->view_dispatcher, WifiMarauderEventSaveDestinationMac);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wifi_marauder_scene_text_input_on_enter(void* context) {
|
void wifi_marauder_scene_text_input_on_enter(void* context) {
|
||||||
WifiMarauderApp* app = context;
|
WifiMarauderApp* app = context;
|
||||||
|
|
||||||
if(false == app->is_custom_tx_string) {
|
if(0 ==
|
||||||
|
strncmp("attack -t deauth -s", app->selected_tx_string, strlen("attack -t deauth -s"))) {
|
||||||
|
// Special case for manual deauth input
|
||||||
|
app->special_case_input_step = 1;
|
||||||
|
bzero(app->text_input_store, WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE);
|
||||||
|
} else if(false == app->is_custom_tx_string) {
|
||||||
|
// Most commands
|
||||||
|
app->special_case_input_step = 0;
|
||||||
|
|
||||||
// Fill text input with selected string so that user can add to it
|
// Fill text input with selected string so that user can add to it
|
||||||
size_t length = strlen(app->selected_tx_string);
|
size_t length = strlen(app->selected_tx_string);
|
||||||
furi_assert(length < WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE);
|
furi_assert(length < WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE);
|
||||||
@@ -25,7 +46,9 @@ void wifi_marauder_scene_text_input_on_enter(void* context) {
|
|||||||
// Setup view
|
// Setup view
|
||||||
TextInput* text_input = app->text_input;
|
TextInput* text_input = app->text_input;
|
||||||
// Add help message to header
|
// Add help message to header
|
||||||
if(0 == strncmp("ssid -a -g", app->selected_tx_string, strlen("ssid -a -g"))) {
|
if(app->special_case_input_step == 1) {
|
||||||
|
text_input_set_header_text(text_input, "Enter source MAC");
|
||||||
|
} else if(0 == strncmp("ssid -a -g", app->selected_tx_string, strlen("ssid -a -g"))) {
|
||||||
text_input_set_header_text(text_input, "Enter # SSIDs to generate");
|
text_input_set_header_text(text_input, "Enter # SSIDs to generate");
|
||||||
} else if(0 == strncmp("ssid -a -n", app->selected_tx_string, strlen("ssid -a -n"))) {
|
} else if(0 == strncmp("ssid -a -n", app->selected_tx_string, strlen("ssid -a -n"))) {
|
||||||
text_input_set_header_text(text_input, "Enter SSID name to add");
|
text_input_set_header_text(text_input, "Enter SSID name to add");
|
||||||
@@ -59,6 +82,65 @@ bool wifi_marauder_scene_text_input_on_event(void* context, SceneManagerEvent ev
|
|||||||
app->selected_tx_string = app->text_input_store;
|
app->selected_tx_string = app->text_input_store;
|
||||||
scene_manager_next_scene(app->scene_manager, WifiMarauderAppViewConsoleOutput);
|
scene_manager_next_scene(app->scene_manager, WifiMarauderAppViewConsoleOutput);
|
||||||
consumed = true;
|
consumed = true;
|
||||||
|
} else if(event.event == WifiMarauderEventSaveSourceMac) {
|
||||||
|
if(12 != strlen(app->text_input_store)) {
|
||||||
|
text_input_set_header_text(app->text_input, "MAC must be 12 hex chars!");
|
||||||
|
} else {
|
||||||
|
snprintf(
|
||||||
|
app->special_case_input_src_addr,
|
||||||
|
sizeof(app->special_case_input_src_addr),
|
||||||
|
"%c%c:%c%c:%c%c:%c%c:%c%c:%c%c",
|
||||||
|
app->text_input_store[0],
|
||||||
|
app->text_input_store[1],
|
||||||
|
app->text_input_store[2],
|
||||||
|
app->text_input_store[3],
|
||||||
|
app->text_input_store[4],
|
||||||
|
app->text_input_store[5],
|
||||||
|
app->text_input_store[6],
|
||||||
|
app->text_input_store[7],
|
||||||
|
app->text_input_store[8],
|
||||||
|
app->text_input_store[9],
|
||||||
|
app->text_input_store[10],
|
||||||
|
app->text_input_store[11]);
|
||||||
|
|
||||||
|
// Advance scene to input destination MAC, clear text input
|
||||||
|
app->special_case_input_step = 2;
|
||||||
|
bzero(app->text_input_store, WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE);
|
||||||
|
text_input_set_header_text(app->text_input, "Enter destination MAC");
|
||||||
|
}
|
||||||
|
consumed = true;
|
||||||
|
} else if(event.event == WifiMarauderEventSaveDestinationMac) {
|
||||||
|
if(12 != strlen(app->text_input_store)) {
|
||||||
|
text_input_set_header_text(app->text_input, "MAC must be 12 hex chars!");
|
||||||
|
} else {
|
||||||
|
snprintf(
|
||||||
|
app->special_case_input_dst_addr,
|
||||||
|
sizeof(app->special_case_input_dst_addr),
|
||||||
|
"%c%c:%c%c:%c%c:%c%c:%c%c:%c%c",
|
||||||
|
app->text_input_store[0],
|
||||||
|
app->text_input_store[1],
|
||||||
|
app->text_input_store[2],
|
||||||
|
app->text_input_store[3],
|
||||||
|
app->text_input_store[4],
|
||||||
|
app->text_input_store[5],
|
||||||
|
app->text_input_store[6],
|
||||||
|
app->text_input_store[7],
|
||||||
|
app->text_input_store[8],
|
||||||
|
app->text_input_store[9],
|
||||||
|
app->text_input_store[10],
|
||||||
|
app->text_input_store[11]);
|
||||||
|
|
||||||
|
// Construct command with source and destination MACs
|
||||||
|
snprintf(
|
||||||
|
app->text_input_store,
|
||||||
|
WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE,
|
||||||
|
"attack -t deauth -s %18s -d %18s",
|
||||||
|
app->special_case_input_src_addr,
|
||||||
|
app->special_case_input_dst_addr);
|
||||||
|
app->selected_tx_string = app->text_input_store;
|
||||||
|
scene_manager_next_scene(app->scene_manager, WifiMarauderAppViewConsoleOutput);
|
||||||
|
}
|
||||||
|
consumed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ WifiMarauderApp* wifi_marauder_app_alloc() {
|
|||||||
app->selected_option_index[i] = 0;
|
app->selected_option_index[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app->special_case_input_step = 0;
|
||||||
|
|
||||||
app->text_box = text_box_alloc();
|
app->text_box = text_box_alloc();
|
||||||
view_dispatcher_add_view(
|
view_dispatcher_add_view(
|
||||||
app->view_dispatcher, WifiMarauderAppViewConsoleOutput, text_box_get_view(app->text_box));
|
app->view_dispatcher, WifiMarauderAppViewConsoleOutput, text_box_get_view(app->text_box));
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
#include <gui/modules/text_input.h>
|
#include <gui/modules/text_input.h>
|
||||||
#include <gui/modules/variable_item_list.h>
|
#include <gui/modules/variable_item_list.h>
|
||||||
|
|
||||||
#define NUM_MENU_ITEMS (15)
|
#define NUM_MENU_ITEMS (16)
|
||||||
|
|
||||||
#define WIFI_MARAUDER_TEXT_BOX_STORE_SIZE (4096)
|
#define WIFI_MARAUDER_TEXT_BOX_STORE_SIZE (4096)
|
||||||
#define WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE (512)
|
#define WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE (512)
|
||||||
@@ -41,6 +41,11 @@ struct WifiMarauderApp {
|
|||||||
bool is_custom_tx_string;
|
bool is_custom_tx_string;
|
||||||
bool focus_console_start;
|
bool focus_console_start;
|
||||||
bool show_stopscan_tip;
|
bool show_stopscan_tip;
|
||||||
|
|
||||||
|
// For input source and destination MAC in targeted deauth attack
|
||||||
|
int special_case_input_step;
|
||||||
|
char special_case_input_src_addr[20];
|
||||||
|
char special_case_input_dst_addr[20];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Supported commands:
|
// Supported commands:
|
||||||
|
|||||||
@@ -4,4 +4,6 @@ typedef enum {
|
|||||||
WifiMarauderEventRefreshConsoleOutput = 0,
|
WifiMarauderEventRefreshConsoleOutput = 0,
|
||||||
WifiMarauderEventStartConsole,
|
WifiMarauderEventStartConsole,
|
||||||
WifiMarauderEventStartKeyboard,
|
WifiMarauderEventStartKeyboard,
|
||||||
|
WifiMarauderEventSaveSourceMac,
|
||||||
|
WifiMarauderEventSaveDestinationMac
|
||||||
} WifiMarauderCustomEvent;
|
} WifiMarauderCustomEvent;
|
||||||
|
|||||||
Reference in New Issue
Block a user