From bc03b8a2b9158c495bfda010aaf29008179d6179 Mon Sep 17 00:00:00 2001 From: Just Call Me Koko Date: Tue, 21 Apr 2026 17:22:31 -0400 Subject: [PATCH 1/2] Rework attack display output --- esp32_marauder/Display.cpp | 7 +++-- esp32_marauder/Display.h | 2 +- esp32_marauder/WiFiScan.cpp | 58 +++++++++++++++---------------------- 3 files changed, 30 insertions(+), 37 deletions(-) diff --git a/esp32_marauder/Display.cpp b/esp32_marauder/Display.cpp index 4fca3f8..15b783b 100644 --- a/esp32_marauder/Display.cpp +++ b/esp32_marauder/Display.cpp @@ -584,9 +584,12 @@ void Display::displayBuffer(bool do_clear) } } -void Display::showCenterText(String text, int y) +void Display::showCenterText(String text, int y, bool small_pp) { - tft.setCursor((SCREEN_WIDTH - (text.length() * (6 * BANNER_TEXT_SIZE))) / 2, y); + if (!small_pp) + tft.setCursor((SCREEN_WIDTH - (text.length() * (6 * BANNER_TEXT_SIZE))) / 2, y); + else + tft.setCursor((SCREEN_WIDTH - (text.length() * (6))) / 2, y); tft.println(text); } diff --git a/esp32_marauder/Display.h b/esp32_marauder/Display.h index 81c6676..bd01f25 100644 --- a/esp32_marauder/Display.h +++ b/esp32_marauder/Display.h @@ -141,7 +141,7 @@ class Display void getTouchWhileFunction(bool pressed); void init(); void RunSetup(); - void showCenterText(String text, int y); + void showCenterText(String text, int y, bool small_pp = false); void touchToExit(); void twoPartDisplay(String center_text); void updateBanner(String msg); diff --git a/esp32_marauder/WiFiScan.cpp b/esp32_marauder/WiFiScan.cpp index 5bc7424..53f023a 100644 --- a/esp32_marauder/WiFiScan.cpp +++ b/esp32_marauder/WiFiScan.cpp @@ -2439,6 +2439,9 @@ void WiFiScan::setLEDMode(int mode) { void WiFiScan::displayTargetFilter() { #ifdef HAS_SCREEN if (this->filterActive()) { + display_obj.tft.setTextColor(TFT_RED, TFT_BLACK); + display_obj.tft.setTextSize(1); + display_obj.showCenterText("Transmitting...", (STATUS_BAR_WIDTH * 3) + 1, true); display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK); #ifdef HAS_MINI_SCREEN display_obj.tft.setTextSize(1); @@ -2446,13 +2449,14 @@ void WiFiScan::displayTargetFilter() { display_obj.tft.setTextSize(2); #endif - display_obj.showCenterText("Target Networks", (STATUS_BAR_WIDTH * 3) + (CHAR_WIDTH)); + display_obj.showCenterText("Targeted Networks", (STATUS_BAR_WIDTH * 3) + (CHAR_WIDTH) + 1); display_obj.tft.setTextSize(1); + display_obj.tft.println(); display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK); for (int i = 0; i < access_points->size(); i++) { AccessPoint access_point = access_points->get(i); if (access_point.selected) - display_obj.showCenterText(access_point.essid, display_obj.tft.getCursorY()); + display_obj.showCenterText(access_point.essid, display_obj.tft.getCursorY(), true); } } else { display_obj.tft.setTextColor(TFT_RED, TFT_BLACK); @@ -2481,7 +2485,16 @@ void WiFiScan::startWiFiAttacks(uint8_t scan_mode, uint16_t color, String title_ display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK); #endif - if (scan_mode == WIFI_ATTACK_DEAUTH) { + if ((scan_mode == WIFI_ATTACK_DEAUTH) || + (scan_mode == WIFI_ATTACK_DEAUTH_TARGETED) || + (scan_mode == WIFI_ATTACK_AUTH) || + (scan_mode == WIFI_ATTACK_BAD_MSG) || + (scan_mode == WIFI_ATTACK_BAD_MSG_TARGETED) || + (scan_mode == WIFI_ATTACK_SLEEP) || + (scan_mode == WIFI_ATTACK_SLEEP_TARGETED) || + (scan_mode == WIFI_ATTACK_AP_SPAM) || + (scan_mode == WIFI_ATTACK_CSA) || + (scan_mode == WIFI_ATTACK_QUIET)) { this->displayTargetFilter(); } @@ -10374,11 +10387,11 @@ void WiFiScan::main(uint32_t currentTime) for (int i = 0; i < 55; i++) this->sendProbeAttack(currentTime); - if (currentTime - initTime >= 1000) { + /*if (currentTime - initTime >= 1000) { initTime = millis(); this->displayTransmitRate(); packets_sent = 0; - } + }*/ } else if ((currentScanMode == WIFI_ATTACK_BAD_MSG) || (currentScanMode == WIFI_ATTACK_BAD_MSG_TARGETED)) { @@ -10387,7 +10400,7 @@ void WiFiScan::main(uint32_t currentTime) initTime = millis(); - this->displayTransmitRate(); + //this->displayTransmitRate(); } } else if ((currentScanMode == WIFI_ATTACK_SLEEP) || @@ -10397,7 +10410,7 @@ void WiFiScan::main(uint32_t currentTime) initTime = millis(); - this->displayTransmitRate(); + //this->displayTransmitRate(); } } else if (currentScanMode == WIFI_ATTACK_SAE_COMMIT) { @@ -10414,29 +10427,6 @@ void WiFiScan::main(uint32_t currentTime) } } } - - /*if (currentTime - initTime >= 1000) { - initTime = millis(); - - char displayString[64]; // adjust size as needed - - snprintf(displayString, sizeof(displayString), "%s%u", - text18, static_cast(packets_sent)); - - char displayString2[STANDARD_FONT_CHAR_LIMIT + 1]; - for (int x = 0; x < STANDARD_FONT_CHAR_LIMIT; x++) { - displayString2[x] = ' '; - } - displayString2[STANDARD_FONT_CHAR_LIMIT] = '\0'; - - #ifdef HAS_SCREEN - display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK); - display_obj.showCenterText(displayString2, TFT_HEIGHT / 2); - display_obj.showCenterText(displayString, TFT_HEIGHT / 2); - #endif - - packets_sent = 0; - }*/ } else if (currentScanMode == WIFI_ATTACK_DEAUTH_MANUAL) { @@ -10470,11 +10460,11 @@ void WiFiScan::main(uint32_t currentTime) this->sendDeauthFrame(cur_ap.bssid, cur_ap.channel, cur_sta.mac); // Display packets sent on screen - if (currentTime - initTime >= 1000) { + /*if (currentTime - initTime >= 1000) { initTime = millis(); this->displayTransmitRate(); packets_sent = 0; - } + }*/ } } } @@ -10515,11 +10505,11 @@ void WiFiScan::main(uint32_t currentTime) this->broadcastCustomBeacon(currentTime, access_points->get(i), currentScanMode); } - if (currentTime - initTime >= 1000) { + /*if (currentTime - initTime >= 1000) { initTime = millis(); this->displayTransmitRate(); packets_sent = 0; - } + }*/ } else if ((currentScanMode == WIFI_ATTACK_RICK_ROLL)) { // Need this for loop because getTouch causes ~10ms delay From 7c569c60f6b5b43dded2d59400d4cdab9486eacf Mon Sep 17 00:00:00 2001 From: Just Call Me Koko Date: Tue, 21 Apr 2026 17:36:51 -0400 Subject: [PATCH 2/2] Add channel info --- esp32_marauder/WiFiScan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32_marauder/WiFiScan.cpp b/esp32_marauder/WiFiScan.cpp index 53f023a..4401c2f 100644 --- a/esp32_marauder/WiFiScan.cpp +++ b/esp32_marauder/WiFiScan.cpp @@ -2456,7 +2456,7 @@ void WiFiScan::displayTargetFilter() { for (int i = 0; i < access_points->size(); i++) { AccessPoint access_point = access_points->get(i); if (access_point.selected) - display_obj.showCenterText(access_point.essid, display_obj.tft.getCursorY(), true); + display_obj.showCenterText("CH: " + (String)access_point.channel + " " + access_point.essid, display_obj.tft.getCursorY(), true); } } else { display_obj.tft.setTextColor(TFT_RED, TFT_BLACK);