mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-21 06:43:13 -08:00
Capture EAPOL packets
This commit is contained in:
@@ -14,6 +14,7 @@ https://www.online-utility.org/image/convert/to/XBM
|
||||
#include "freertos/task.h"
|
||||
#include "esp_system.h"
|
||||
#include <Arduino.h>
|
||||
#include <Preferences.h>
|
||||
|
||||
|
||||
#include "Assets.h"
|
||||
@@ -23,6 +24,7 @@ https://www.online-utility.org/image/convert/to/XBM
|
||||
#include "SDInterface.h"
|
||||
#include "Web.h"
|
||||
#include "Buffer.h"
|
||||
#include "BatteryInterface.h"
|
||||
//#include "icons.h"
|
||||
|
||||
Display display_obj;
|
||||
@@ -31,21 +33,58 @@ MenuFunctions menu_function_obj;
|
||||
SDInterface sd_obj;
|
||||
Web web_obj;
|
||||
Buffer buffer_obj;
|
||||
BatteryInterface battery_obj;
|
||||
|
||||
Preferences preferences;
|
||||
|
||||
uint32_t currentTime = 0;
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
|
||||
Serial.println("\n\n-------------------------------------\n");
|
||||
|
||||
pinMode(FLASH_BUTTON, INPUT);
|
||||
pinMode(TFT_BL, OUTPUT);
|
||||
digitalWrite(TFT_BL, LOW);
|
||||
|
||||
preferences.begin("my-app", false);
|
||||
|
||||
unsigned int counter = preferences.getUInt("counter", 0);
|
||||
|
||||
if (counter == 0) {
|
||||
counter++;
|
||||
// Print the counter to Serial Monitor
|
||||
Serial.printf("Current counter value: %u\n", counter);
|
||||
|
||||
// Store the counter to the Preferences
|
||||
preferences.putUInt("counter", counter);
|
||||
|
||||
// Close the Preferences
|
||||
preferences.end();
|
||||
|
||||
Serial.println("Initial reboot...");
|
||||
|
||||
ESP.restart();
|
||||
}
|
||||
else {
|
||||
Serial.println("Initial reboot complete");
|
||||
counter = 0;
|
||||
// Print the counter to Serial Monitor
|
||||
Serial.printf("Current counter value: %u\n", counter);
|
||||
|
||||
// Store the counter to the Preferences
|
||||
preferences.putUInt("counter", counter);
|
||||
|
||||
// Close the Preferences
|
||||
preferences.end();
|
||||
}
|
||||
|
||||
// Preset SPI CS pins to avoid bus conflicts
|
||||
digitalWrite(TFT_CS, HIGH);
|
||||
digitalWrite(SD_CS, HIGH);
|
||||
|
||||
Serial.begin(115200);
|
||||
Serial.println("\n\n--------------------------------\n");
|
||||
Serial.println(" ESP32 Marauder \n");
|
||||
Serial.println(" " + display_obj.version_number + "\n");
|
||||
@@ -63,6 +102,16 @@ void setup()
|
||||
|
||||
// Build menus
|
||||
menu_function_obj.RunSetup();
|
||||
|
||||
battery_obj.RunSetup();
|
||||
|
||||
battery_obj.battery_level = battery_obj.getBatteryLevel();
|
||||
|
||||
if (battery_obj.i2c_supported) {
|
||||
Serial.println("IP5306 I2C Supported: true");
|
||||
}
|
||||
else
|
||||
Serial.println("IP5306 I2C Supported: false");
|
||||
}
|
||||
|
||||
|
||||
@@ -80,9 +129,10 @@ void loop()
|
||||
{
|
||||
display_obj.main();
|
||||
wifi_scan_obj.main(currentTime);
|
||||
sd_obj.main();
|
||||
sd_obj.main(currentTime);
|
||||
//if ((wifi_scan_obj.currentScanMode != WIFI_ATTACK_BEACON_SPAM))
|
||||
if (wifi_scan_obj.currentScanMode != WIFI_PACKET_MONITOR)
|
||||
if ((wifi_scan_obj.currentScanMode != WIFI_PACKET_MONITOR) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_EAPOL))
|
||||
menu_function_obj.main();
|
||||
if (wifi_scan_obj.currentScanMode == OTA_UPDATE)
|
||||
web_obj.main();
|
||||
|
||||
Reference in New Issue
Block a user