Explorar o código

Add compatibility with hcxtools

Just Call Me Koko %!s(int64=5) %!d(string=hai) anos
pai
achega
9e07722292
Modificáronse 3 ficheiros con 15 adicións e 3 borrados
  1. 1 1
      esp32_marauder/Display.h
  2. 1 1
      esp32_marauder/MenuFunctions.cpp
  3. 13 1
      esp32_marauder/WiFiScan.cpp

+ 1 - 1
esp32_marauder/Display.h

@@ -56,7 +56,7 @@ class Display
     TFT_eSPI tft = TFT_eSPI();
     TFT_eSPI tft = TFT_eSPI();
     TFT_eSprite img = TFT_eSprite(&tft);
     TFT_eSprite img = TFT_eSprite(&tft);
     TFT_eSPI_Button key[BUTTON_ARRAY_LEN];
     TFT_eSPI_Button key[BUTTON_ARRAY_LEN];
-    String version_number = "v0.6.0";
+    String version_number = "v0.6.2";
 
 
     bool printing = false;
     bool printing = false;
     bool loading = false;
     bool loading = false;

+ 1 - 1
esp32_marauder/MenuFunctions.cpp

@@ -241,7 +241,7 @@ void MenuFunctions::RunSetup()
   wifiScannerMenu.parentMenu = &wifiMenu; // Main Menu is second menu parent
   wifiScannerMenu.parentMenu = &wifiMenu; // Main Menu is second menu parent
   addNodes(&wifiScannerMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){changeMenu(wifiScannerMenu.parentMenu);});
   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, "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
   // Build WiFi attack menu

+ 13 - 1
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)
 void WiFiScan::RunEapolScan(uint8_t scan_mode, uint16_t color)
 {
 {
+  num_eapol = 0;
   display_obj.tft.init();
   display_obj.tft.init();
   display_obj.tft.setRotation(1);
   display_obj.tft.setRotation(1);
   display_obj.tft.fillScreen(TFT_BLACK);
   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;
   wifi_pkt_rx_ctrl_t ctrl = (wifi_pkt_rx_ctrl_t)snifferPacket->rx_ctrl;
   int len = snifferPacket->rx_ctrl.sig_len;
   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)
   if (type == WIFI_PKT_MGMT)
   {
   {
     len -= 4;
     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) )){
   if (( (snifferPacket->payload[30] == 0x88 && snifferPacket->payload[31] == 0x8e)|| ( snifferPacket->payload[32] == 0x88 && snifferPacket->payload[33] == 0x8e) )){
     Serial.println("EAPOL!!");
     Serial.println("EAPOL!!");
-    sd_obj.addPacket(snifferPacket->payload, len);
+    //sd_obj.addPacket(snifferPacket->payload, len);
     num_eapol++;
     num_eapol++;
   }
   }
+
+  sd_obj.addPacket(snifferPacket->payload, len);
 }
 }
 
 
 void WiFiScan::eapolMonitorMain(uint32_t currentTime)
 void WiFiScan::eapolMonitorMain(uint32_t currentTime)
@@ -1183,6 +1191,10 @@ void WiFiScan::eapolMonitorMain(uint32_t currentTime)
       x_pos += x_scale;
       x_pos += x_scale;
       initTime = millis();
       initTime = millis();
       y_pos_x = ((-num_eapol * (y_scale * 3)) + (HEIGHT_1 - 2)); // GREEN
       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_y = ((-num_deauth * (y_scale * 3)) + (HEIGHT_1 - 2)); // RED
       //y_pos_z = ((-num_probe * (y_scale * 3)) + (HEIGHT_1 - 2)); // BLUE
       //y_pos_z = ((-num_probe * (y_scale * 3)) + (HEIGHT_1 - 2)); // BLUE