Skip to content

Commit

Permalink
Merge pull request #377 from justcallmekoko/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
justcallmekoko authored Oct 30, 2023
2 parents 7557f19 + 495222a commit 1c47db7
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 17 deletions.
4 changes: 4 additions & 0 deletions esp32_marauder/MenuFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,8 @@ void MenuFunctions::main(uint32_t currentTime)
(wifi_scan_obj.currentScanMode == WIFI_SCAN_EAPOL)) {
if (wifi_scan_obj.set_channel < 14)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel + 1);
else
wifi_scan_obj.changeChannel(1);
}
}
#endif
Expand Down Expand Up @@ -719,6 +721,8 @@ void MenuFunctions::main(uint32_t currentTime)
(wifi_scan_obj.currentScanMode == WIFI_SCAN_EAPOL)) {
if (wifi_scan_obj.set_channel > 1)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel - 1);
else
wifi_scan_obj.changeChannel(14);
}
}
if(c_btn_press){
Expand Down
55 changes: 46 additions & 9 deletions esp32_marauder/WiFiScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,8 @@ void WiFiScan::startWiFiAttacks(uint8_t scan_mode, uint16_t color, String title_
flipper_led.attackLED();
#elif defined(XIAO_ESP32_S3)
xiao_led.attackLED();
#elif defined(MARAUDER_M5STICKC)
stickc_led.attackLED();
#else
led_obj.setMode(MODE_ATTACK);
#endif
Expand All @@ -578,6 +580,8 @@ bool WiFiScan::shutdownWiFi() {
flipper_led.offLED();
#elif defined(XIAO_ESP32_S3)
xiao_led.offLED();
#elif defined(MARAUDER_M5STICKC)
stickc_led.offLED();
#else
led_obj.setMode(MODE_OFF);
#endif
Expand All @@ -603,6 +607,8 @@ bool WiFiScan::shutdownBLE() {
flipper_led.offLED();
#elif defined(XIAO_ESP32_S3)
xiao_led.offLED();
#elif defined(MARAUDER_M5STICKC)
stickc_led.offLED();
#else
led_obj.setMode(MODE_OFF);
#endif
Expand Down Expand Up @@ -839,6 +845,8 @@ void WiFiScan::RunEvilPortal(uint8_t scan_mode, uint16_t color)
flipper_led.sniffLED();
#elif defined(XIAO_ESP32_S3)
xiao_led.sniffLED();
#elif defined(MARAUDER_M5STICKC)
stickc_led.sniffLED();
#else
led_obj.setMode(MODE_SNIFF);
#endif
Expand Down Expand Up @@ -886,6 +894,8 @@ void WiFiScan::RunAPScan(uint8_t scan_mode, uint16_t color)
flipper_led.sniffLED();
#elif defined(XIAO_ESP32_S3)
xiao_led.sniffLED();
#elif defined(MARAUDER_M5STICKC)
stickc_led.sniffLED();
#else
led_obj.setMode(MODE_SNIFF);
#endif
Expand Down Expand Up @@ -1169,6 +1179,8 @@ void WiFiScan::RunPacketMonitor(uint8_t scan_mode, uint16_t color)
flipper_led.sniffLED();
#elif defined(XIAO_ESP32_S3)
xiao_led.sniffLED();
#elif defined(MARAUDER_M5STICKC)
stickc_led.sniffLED();
#else
led_obj.setMode(MODE_SNIFF);
#endif
Expand Down Expand Up @@ -1252,6 +1264,8 @@ void WiFiScan::RunEapolScan(uint8_t scan_mode, uint16_t color)
flipper_led.sniffLED();
#elif defined(XIAO_ESP32_S3)
xiao_led.sniffLED();
#elif defined(MARAUDER_M5STICKC)
stickc_led.sniffLED();
#else
led_obj.setMode(MODE_SNIFF);
#endif
Expand All @@ -1267,7 +1281,7 @@ void WiFiScan::RunEapolScan(uint8_t scan_mode, uint16_t color)

#ifdef WRITE_PACKETS_SERIAL
buffer_obj.open();
#else
#elif defined(HAS_SD)
sd_obj.openCapture("eapol");
#endif

Expand Down Expand Up @@ -1407,6 +1421,8 @@ void WiFiScan::RunPwnScan(uint8_t scan_mode, uint16_t color)
flipper_led.sniffLED();
#elif defined(XIAO_ESP32_S3)
xiao_led.sniffLED();
#elif defined(MARAUDER_M5STICKC)
stickc_led.sniffLED();
#else
led_obj.setMode(MODE_SNIFF);
#endif
Expand Down Expand Up @@ -1591,6 +1607,8 @@ void WiFiScan::RunBeaconScan(uint8_t scan_mode, uint16_t color)
flipper_led.sniffLED();
#elif defined(XIAO_ESP32_S3)
xiao_led.sniffLED();
#elif defined(MARAUDER_M5STICKC)
stickc_led.sniffLED();
#else
led_obj.setMode(MODE_SNIFF);
#endif
Expand Down Expand Up @@ -1654,6 +1672,8 @@ void WiFiScan::RunStationScan(uint8_t scan_mode, uint16_t color)
flipper_led.sniffLED();
#elif defined(XIAO_ESP32_S3)
xiao_led.sniffLED();
#elif defined(MARAUDER_M5STICKC)
stickc_led.sniffLED();
#else
led_obj.setMode(MODE_SNIFF);
#endif
Expand Down Expand Up @@ -1702,6 +1722,8 @@ void WiFiScan::RunRawScan(uint8_t scan_mode, uint16_t color)
flipper_led.sniffLED();
#elif defined(XIAO_ESP32_S3)
xiao_led.sniffLED();
#elif defined(MARAUDER_M5STICKC)
stickc_led.sniffLED();
#else
led_obj.setMode(MODE_SNIFF);
#endif
Expand Down Expand Up @@ -1752,6 +1774,8 @@ void WiFiScan::RunDeauthScan(uint8_t scan_mode, uint16_t color)
flipper_led.sniffLED();
#elif defined(XIAO_ESP32_S3)
xiao_led.sniffLED();
#elif defined(MARAUDER_M5STICKC)
stickc_led.sniffLED();
#else
led_obj.setMode(MODE_SNIFF);
#endif
Expand Down Expand Up @@ -1811,6 +1835,8 @@ void WiFiScan::RunProbeScan(uint8_t scan_mode, uint16_t color)
flipper_led.sniffLED();
#elif defined(XIAO_ESP32_S3)
xiao_led.sniffLED();
#elif defined(MARAUDER_M5STICKC)
stickc_led.sniffLED();
#else
led_obj.setMode(MODE_SNIFF);
#endif
Expand Down Expand Up @@ -1932,10 +1958,16 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
#elif defined(HAS_SD)
#ifdef HAS_GPS
if (gps_obj.getGpsModuleStatus()) {
if (scan_mode == BT_SCAN_WAR_DRIVE)
sd_obj.openLog("bt_wardrive");
else if (scan_mode == BT_SCAN_WAR_DRIVE_CONT)
sd_obj.openLog("bt_wardrive_cont");
if (scan_mode == BT_SCAN_WAR_DRIVE) {
#ifdef HAS_SD
sd_obj.openLog("bt_wardrive");
#endif
}
else if (scan_mode == BT_SCAN_WAR_DRIVE_CONT) {
#ifdef HAS_SD
sd_obj.openLog("bt_wardrive_cont");
#endif
}
String header_line = "WigleWifi-1.4,appRelease=" + (String)MARAUDER_VERSION + ",model=ESP32 Marauder,release=" + (String)MARAUDER_VERSION + ",device=ESP32 Marauder,display=SPI TFT,board=ESP32 Marauder,brand=JustCallMeKoko\nMAC,SSID,AuthMode,FirstSeen,Channel,RSSI,CurrentLatitude,CurrentLongitude,AltitudeMeters,AccuracyMeters,Type\n";
evil_portal_obj.addLog(header_line, header_line.length());
}
Expand Down Expand Up @@ -3582,12 +3614,13 @@ void WiFiScan::wifiSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)

//Serial.print(" ");

#ifdef MARAUDER_MINI
#ifdef SCREEN_BUFFER
if (display_obj.display_buffer->size() == 0)
{
display_obj.loading = true;
display_obj.display_buffer->add(display_string);
display_obj.loading = false;
Serial.println(display_string);
}
#endif
#endif
Expand Down Expand Up @@ -3667,7 +3700,7 @@ void WiFiScan::eapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)

Serial.print(" ");

#ifdef MARAUDER_MINI
#ifdef SCREEN_BUFFER
if (display_obj.display_buffer->size() == 0)
{
display_obj.loading = true;
Expand Down Expand Up @@ -3920,7 +3953,9 @@ void WiFiScan::addPacket(wifi_promiscuous_pkt_t *snifferPacket, int len) {
//delay(50);
}

sd_obj.main();
#ifdef HAS_SD
sd_obj.main();
#endif

}

Expand Down Expand Up @@ -4145,7 +4180,9 @@ void WiFiScan::addPacket(wifi_promiscuous_pkt_t *snifferPacket, int len) {
//delay(50);
}

sd_obj.main();
#ifdef HAS_SD
sd_obj.main();
#endif

}

Expand Down
4 changes: 4 additions & 0 deletions esp32_marauder/WiFiScan.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#include "flipperLED.h"
#elif defined(XIAO_ESP32_S3)
#include "xiaoLED.h"
#elif defined(MARAUDER_M5STICKC)
#include "stickcLED.h"
#else
#include "LedInterface.h"
#endif
Expand Down Expand Up @@ -108,6 +110,8 @@ extern Settings settings_obj;
extern flipperLED flipper_led;
#elif defined(XIAO_ESP32_S3)
extern xiaoLED xiao_led;
#elif defined(MARAUDER_M5STICKC)
extern stickcLED stickc_led;
#else
extern LedInterface led_obj;
#endif
Expand Down
15 changes: 10 additions & 5 deletions esp32_marauder/configs.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
//#define XIAO_ESP32_S3
//// END BOARD TARGETS

#define MARAUDER_VERSION "v0.13.3"
#define MARAUDER_VERSION "v0.13.4"

//// BOARD FEATURES
#ifdef MARAUDER_M5STICKC
//#define FLIPPER_ZERO_HAT
#define HAS_BATTERY
#define HAS_BT
#define HAS_BUTTONS
#define HAS_NEOPIXEL_LED
//#define HAS_NEOPIXEL_LED
#define HAS_PWR_MGMT
#define HAS_SCREEN
#define HAS_SD
#define USE_SD
#define HAS_TEMP_SENSOR
//#define HAS_GPS
#define HAS_GPS
#endif

#ifdef MARAUDER_MINI
Expand Down Expand Up @@ -238,8 +238,8 @@
#define TFT_CS 5
#define TFT_DC 23
#define TFT_RST 18
#define TFT_BL 10
#define TOUCH_CS 10
#define TFT_BL -1
#define TOUCH_CS -1
//#define SD_CS 1

#define SCREEN_BUFFER
Expand Down Expand Up @@ -825,6 +825,11 @@
#define GPS_TX 9
#define GPS_RX 21
#define mac_history_len 512
#elif defined(MARAUDER_M5STICKC)
#define GPS_SERIAL_INDEX 1
#define GPS_TX 33
#define GPS_RX 32
#define mac_history_len 512
#endif
#else
#define mac_history_len 512
Expand Down
12 changes: 9 additions & 3 deletions esp32_marauder/esp32_marauder.ino
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ https://www.online-utility.org/image/convert/to/XBM
#include "flipperLED.h"
#elif defined(XIAO_ESP32_S3)
#include "xiaoLED.h"
#elif defined(MARAUDER_M5STICKC)
#include "stickcLED.h"
#else
#include "LedInterface.h"
#endif
Expand Down Expand Up @@ -121,6 +123,8 @@ CommandLine cli_obj;
flipperLED flipper_led;
#elif defined(XIAO_ESP32_S3)
xiaoLED xiao_led;
#elif defined(MARAUDER_M5STICKC)
stickcLED stickc_led;
#else
LedInterface led_obj;
#endif
Expand Down Expand Up @@ -305,8 +309,6 @@ void setup()
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
#endif
}
#else
return;
#endif

#ifdef HAS_BATTERY
Expand Down Expand Up @@ -341,6 +343,8 @@ void setup()
flipper_led.RunSetup();
#elif defined(XIAO_ESP32_S3)
xiao_led.RunSetup();
#elif defined(MARAUDER_M5STICKC)
stickc_led.RunSetup();
#else
led_obj.RunSetup();
#endif
Expand Down Expand Up @@ -389,7 +393,7 @@ void loop()
currentTime = millis();
bool mini = false;

#ifdef MARAUDER_MINI
#ifdef SCREEN_BUFFER
mini = true;
#endif

Expand Down Expand Up @@ -437,6 +441,8 @@ void loop()
flipper_led.main();
#elif defined(XIAO_ESP32_S3)
xiao_led.main();
#elif defined(MARAUDER_M5STICKC)
stickc_led.main();
#else
led_obj.main(currentTime);
#endif
Expand Down
53 changes: 53 additions & 0 deletions esp32_marauder/stickcLED.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#include "stickcLED.h"
// NB M5Stick C Plus LED is active low, so digitalWrite() calls are inverted
void stickcLED::RunSetup() {
pinMode(STICKC_LED_PIN, OUTPUT);

if (!settings_obj.loadSetting<bool>("EnableLED")) {
digitalWrite(STICKC_LED_PIN, HIGH);
return;
}

delay(50);

digitalWrite(STICKC_LED_PIN, LOW);
delay(500);
digitalWrite(STICKC_LED_PIN, HIGH);
delay(250);
digitalWrite(STICKC_LED_PIN, LOW);
delay(500);
digitalWrite(STICKC_LED_PIN, HIGH);
delay(250);
digitalWrite(STICKC_LED_PIN, LOW);
delay(500);
digitalWrite(STICKC_LED_PIN, HIGH);
}

void stickcLED::attackLED() {
if (!settings_obj.loadSetting<bool>("EnableLED"))
return;

digitalWrite(STICKC_LED_PIN, LOW);
delay(300);
digitalWrite(STICKC_LED_PIN, HIGH);
}

void stickcLED::sniffLED() {
if (!settings_obj.loadSetting<bool>("EnableLED"))
return;

digitalWrite(STICKC_LED_PIN, LOW);
delay(300);
digitalWrite(STICKC_LED_PIN, HIGH);
}

void stickcLED::offLED() {
if (!settings_obj.loadSetting<bool>("EnableLED"))
return;

digitalWrite(STICKC_LED_PIN, HIGH);
}

void stickcLED::main() {
// do nothing
}
Loading

0 comments on commit 1c47db7

Please sign in to comment.