From 9e07722292e509a23cfd0dc37c368cc76c1f3d81 Mon Sep 17 00:00:00 2001 From: Just Call Me Koko <25190487+justcallmekoko@users.noreply.github.com> Date: Tue, 24 Mar 2020 00:02:30 -0400 Subject: [PATCH] Add compatibility with hcxtools --- esp32_marauder/Display.h | 2 +- esp32_marauder/MenuFunctions.cpp | 2 +- esp32_marauder/WiFiScan.cpp | 14 +++++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/esp32_marauder/Display.h b/esp32_marauder/Display.h index eecaa4d..f70335b 100644 --- a/esp32_marauder/Display.h +++ b/esp32_marauder/Display.h @@ -56,7 +56,7 @@ class Display TFT_eSPI tft = TFT_eSPI(); TFT_eSprite img = TFT_eSprite(&tft); TFT_eSPI_Button key[BUTTON_ARRAY_LEN]; - String version_number = "v0.6.0"; + String version_number = "v0.6.2"; bool printing = false; bool loading = false; diff --git a/esp32_marauder/MenuFunctions.cpp b/esp32_marauder/MenuFunctions.cpp index 410b778..6dc46f5 100644 --- a/esp32_marauder/MenuFunctions.cpp +++ b/esp32_marauder/MenuFunctions.cpp @@ -241,7 +241,7 @@ void MenuFunctions::RunSetup() wifiScannerMenu.parentMenu = &wifiMenu; // Main Menu is second menu parent addNodes(&wifiScannerMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){changeMenu(wifiScannerMenu.parentMenu);}); addNodes(&wifiScannerMenu, "Packet Monitor", TFT_BLUE, NULL, PACKET_MONITOR, [this](){wifi_scan_obj.StartScan(WIFI_PACKET_MONITOR, TFT_BLUE);}); - addNodes(&wifiScannerMenu, "EAPOL Scan", TFT_VIOLET, NULL, EAPOL, [this](){wifi_scan_obj.StartScan(WIFI_SCAN_EAPOL, TFT_VIOLET);}); + addNodes(&wifiScannerMenu, "EAPOL/PMKID Scan", TFT_VIOLET, NULL, EAPOL, [this](){wifi_scan_obj.StartScan(WIFI_SCAN_EAPOL, TFT_VIOLET);}); // Build WiFi attack menu diff --git a/esp32_marauder/WiFiScan.cpp b/esp32_marauder/WiFiScan.cpp index f54cf53..7e0844c 100644 --- a/esp32_marauder/WiFiScan.cpp +++ b/esp32_marauder/WiFiScan.cpp @@ -335,6 +335,7 @@ void WiFiScan::RunPacketMonitor(uint8_t scan_mode, uint16_t color) void WiFiScan::RunEapolScan(uint8_t scan_mode, uint16_t color) { + num_eapol = 0; display_obj.tft.init(); display_obj.tft.setRotation(1); display_obj.tft.fillScreen(TFT_BLACK); @@ -990,6 +991,11 @@ void WiFiScan::eapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type) wifi_pkt_rx_ctrl_t ctrl = (wifi_pkt_rx_ctrl_t)snifferPacket->rx_ctrl; int len = snifferPacket->rx_ctrl.sig_len; + if (len == 173) { + Serial.println("Maybe the PMKID"); + //sd_obj.addPacket(snifferPacket->payload, len); + } + if (type == WIFI_PKT_MGMT) { len -= 4; @@ -1021,9 +1027,11 @@ void WiFiScan::eapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type) if (( (snifferPacket->payload[30] == 0x88 && snifferPacket->payload[31] == 0x8e)|| ( snifferPacket->payload[32] == 0x88 && snifferPacket->payload[33] == 0x8e) )){ Serial.println("EAPOL!!"); - sd_obj.addPacket(snifferPacket->payload, len); + //sd_obj.addPacket(snifferPacket->payload, len); num_eapol++; } + + sd_obj.addPacket(snifferPacket->payload, len); } void WiFiScan::eapolMonitorMain(uint32_t currentTime) @@ -1183,6 +1191,10 @@ void WiFiScan::eapolMonitorMain(uint32_t currentTime) x_pos += x_scale; initTime = millis(); y_pos_x = ((-num_eapol * (y_scale * 3)) + (HEIGHT_1 - 2)); // GREEN + if (y_pos_x >= HEIGHT_1) { + Serial.println("Max EAPOL number reached. Adjusting..."); + num_eapol = 0; + } //y_pos_y = ((-num_deauth * (y_scale * 3)) + (HEIGHT_1 - 2)); // RED //y_pos_z = ((-num_probe * (y_scale * 3)) + (HEIGHT_1 - 2)); // BLUE