Update wifi marauder

This commit is contained in:
MX 2023-05-20 09:52:00 +03:00
parent a4d72e0fee
commit 87ebbc9901
No known key found for this signature in database
GPG Key ID: 7CCC66B7DBDD1C83
6 changed files with 134 additions and 10 deletions

View File

@ -12,3 +12,4 @@ ADD_SCENE(wifi_marauder, script_confirm_delete, ScriptConfirmDelete)
ADD_SCENE(wifi_marauder, script_stage_edit, ScriptStageEdit)
ADD_SCENE(wifi_marauder, script_stage_add, ScriptStageAdd)
ADD_SCENE(wifi_marauder, script_stage_edit_list, ScriptStageEditList)
ADD_SCENE(wifi_marauder, sniffpmkid_options, SniffPmkidOptions)

View File

@ -0,0 +1,117 @@
#include "../wifi_marauder_app_i.h"
enum SubmenuIndex {
SubmenuIndexPassive,
SubmenuIndexActive,
SubmenuIndexTargetedPassive,
SubmenuIndexTargetedActive,
SubmenuIndexChannelPassive,
SubmenuIndexChannelActive,
};
static void wifi_marauder_scene_sniffpmkid_options_callback(void* context, uint32_t index) {
WifiMarauderApp* app = context;
app->is_custom_tx_string = false; // this will be set if needed by text input
switch(index) {
case SubmenuIndexPassive:
app->selected_tx_string = "sniffpmkid";
scene_manager_set_scene_state(
app->scene_manager, WifiMarauderSceneSniffPmkidOptions, index);
scene_manager_next_scene(app->scene_manager, WifiMarauderSceneConsoleOutput);
break;
case SubmenuIndexActive:
app->selected_tx_string = "sniffpmkid -d";
scene_manager_set_scene_state(
app->scene_manager, WifiMarauderSceneSniffPmkidOptions, index);
scene_manager_next_scene(app->scene_manager, WifiMarauderSceneConsoleOutput);
break;
case SubmenuIndexTargetedPassive:
app->selected_tx_string = "sniffpmkid -l";
scene_manager_set_scene_state(
app->scene_manager, WifiMarauderSceneSniffPmkidOptions, index);
scene_manager_next_scene(app->scene_manager, WifiMarauderSceneConsoleOutput);
break;
case SubmenuIndexTargetedActive:
app->selected_tx_string = "sniffpmkid -d -l";
scene_manager_set_scene_state(
app->scene_manager, WifiMarauderSceneSniffPmkidOptions, index);
scene_manager_next_scene(app->scene_manager, WifiMarauderSceneConsoleOutput);
break;
case SubmenuIndexChannelPassive:
app->selected_tx_string = "sniffpmkid -c";
scene_manager_set_scene_state(
app->scene_manager, WifiMarauderSceneSniffPmkidOptions, index);
scene_manager_next_scene(app->scene_manager, WifiMarauderSceneTextInput);
break;
case SubmenuIndexChannelActive:
app->selected_tx_string = "sniffpmkid -d -c";
scene_manager_set_scene_state(
app->scene_manager, WifiMarauderSceneSniffPmkidOptions, index);
scene_manager_next_scene(app->scene_manager, WifiMarauderSceneTextInput);
break;
}
}
void wifi_marauder_scene_sniffpmkid_options_on_enter(void* context) {
WifiMarauderApp* app = context;
Submenu* submenu = app->submenu;
submenu_set_header(submenu, "Sniff PMKID");
submenu_add_item(
submenu,
"Passive",
SubmenuIndexPassive,
wifi_marauder_scene_sniffpmkid_options_callback,
app);
submenu_add_item(
submenu,
"Active (Force Deauth)",
SubmenuIndexActive,
wifi_marauder_scene_sniffpmkid_options_callback,
app);
submenu_add_item(
submenu,
"Targeted Passive (List)",
SubmenuIndexTargetedPassive,
wifi_marauder_scene_sniffpmkid_options_callback,
app);
submenu_add_item(
submenu,
"Targeted Active (List)",
SubmenuIndexTargetedActive,
wifi_marauder_scene_sniffpmkid_options_callback,
app);
submenu_add_item(
submenu,
"On Channel # - Passive",
SubmenuIndexChannelPassive,
wifi_marauder_scene_sniffpmkid_options_callback,
app);
submenu_add_item(
submenu,
"On Channel # - Active",
SubmenuIndexChannelActive,
wifi_marauder_scene_sniffpmkid_options_callback,
app);
submenu_set_selected_item(
submenu,
scene_manager_get_scene_state(app->scene_manager, WifiMarauderSceneSniffPmkidOptions));
view_dispatcher_switch_to_view(app->view_dispatcher, WifiMarauderAppViewSubmenu);
}
bool wifi_marauder_scene_sniffpmkid_options_on_event(void* context, SceneManagerEvent event) {
//WifiMarauderApp* app = context;
UNUSED(context);
UNUSED(event);
bool consumed = false;
return consumed;
}
void wifi_marauder_scene_sniffpmkid_options_on_exit(void* context) {
WifiMarauderApp* app = context;
submenu_reset(app->submenu);
}

View File

@ -97,13 +97,6 @@ const WifiMarauderItem items[NUM_MENU_ITEMS] = {
NO_ARGS,
FOCUS_CONSOLE_END,
SHOW_STOPSCAN_TIP},
{"Sniff PMKID",
{"ap", "channel"},
2,
{"sniffpmkid -d -l", "sniffpmkid -c"},
TOGGLE_ARGS,
FOCUS_CONSOLE_END,
SHOW_STOPSCAN_TIP},
{"Channel",
{"get", "set"},
2,
@ -161,6 +154,14 @@ static void wifi_marauder_scene_start_var_list_enter_callback(void* context, uin
return;
}
if(app->selected_tx_string &&
strncmp("sniffpmkid", app->selected_tx_string, strlen("sniffpmkid")) == 0) {
// sniffpmkid submenu
view_dispatcher_send_custom_event(
app->view_dispatcher, WifiMarauderEventStartSniffPmkidOptions);
return;
}
// Select automation script
if(index == NUM_MENU_ITEMS - 2) {
view_dispatcher_send_custom_event(
@ -254,6 +255,10 @@ bool wifi_marauder_scene_start_on_event(void* context, SceneManagerEvent event)
scene_manager_set_scene_state(
app->scene_manager, WifiMarauderSceneStart, app->selected_menu_index);
scene_manager_next_scene(app->scene_manager, WifiMarauderSceneScriptSelect);
} else if(event.event == WifiMarauderEventStartSniffPmkidOptions) {
scene_manager_set_scene_state(
app->scene_manager, WifiMarauderSceneStart, app->selected_menu_index);
scene_manager_next_scene(app->scene_manager, WifiMarauderSceneSniffPmkidOptions);
}
consumed = true;
} else if(event.type == SceneManagerEventTypeTick) {

View File

@ -4,7 +4,7 @@
extern "C" {
#endif
#define WIFI_MARAUDER_APP_VERSION "v0.3.5"
#define WIFI_MARAUDER_APP_VERSION "v0.3.6"
typedef struct WifiMarauderApp WifiMarauderApp;

View File

@ -26,7 +26,7 @@
#include <lib/toolbox/path.h>
#include <dialogs/dialogs.h>
#define NUM_MENU_ITEMS (18)
#define NUM_MENU_ITEMS (17)
#define WIFI_MARAUDER_TEXT_BOX_STORE_SIZE (4096)
#define WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE (512)

View File

@ -8,5 +8,6 @@ typedef enum {
WifiMarauderEventSaveDestinationMac,
WifiMarauderEventStartSettingsInit,
WifiMarauderEventStartLogViewer,
WifiMarauderEventStartScriptSelect
WifiMarauderEventStartScriptSelect,
WifiMarauderEventStartSniffPmkidOptions
} WifiMarauderCustomEvent;