Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Curious ] - Thoughts? #174

Open
Rali0s opened this issue Jan 19, 2025 · 0 comments
Open

[ Curious ] - Thoughts? #174

Rali0s opened this issue Jan 19, 2025 · 0 comments

Comments

@Rali0s
Copy link

Rali0s commented Jan 19, 2025

RAND HEX Concept

  1. I am wondering if the use of RAND is possible here?
  2. If the current code pulls a HARD_Address from the ESP32 Chip?
  3. 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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant