all-the-plugins
all-the-plugins copied to clipboard
[ Curious ] - Thoughts?
RAND HEX Concept
- I am wondering if the use of RAND is possible here?
- If the current code pulls a HARD_Address from the ESP32 Chip?
- If the DeAuth or other 802.11 Features are broadcasting this string?
- My code isn't tested, but this is the idea.
#include <time.h>
#include "../wifi_marauder_app_i.h"
//...
void pseudoGen() {
int i, length;
char hexChars[] = "0123456789ABCDEF";
// Seed the random number generator
srand(time(NULL));
length=12;
for (i = 0; i < length; i++) {
int randomIndex = rand() % 16;
wtf=("%c", hexChars[randomIndex]);
}
return wtf;
}
bool wifi_marauder_scene_text_input_on_event(void* context, SceneManagerEvent event) {
WifiMarauderApp* app = context;
bool consumed = false;
if(event.type == SceneManagerEventTypeCustom) {
if(event.event == WifiMarauderEventStartConsole) {
// Point to custom string to send
app->selected_tx_string = app->text_input_store;
scene_manager_next_scene(app->scene_manager, WifiMarauderSceneConsoleOutput);
consumed = true;
} else if(event.event == WifiMarauderEventSaveSourceMac) {
if(12 != strlen(app->text_input_store)) {
wifi_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]);
app->text_input_store=pseudoGen.wtf;
// 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);
wifi_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)) {
wifi_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, WifiMarauderSceneConsoleOutput);
}
consumed = true;
}
}
return consumed;
}