diff --git a/README.md b/README.md index 9a8e788..66d1495 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ -# ESP32 Marauder v0.10.6 +# ESP32 Marauder v0.10.8

Marauder logo

A suite of WiFi/Bluetooth offensive and defensive tools for the ESP32 diff --git a/User_Setup_marauder_m5stickc.h b/User_Setup_marauder_m5stickc.h index 9956e05..43a70d2 100644 --- a/User_Setup_marauder_m5stickc.h +++ b/User_Setup_marauder_m5stickc.h @@ -18,6 +18,8 @@ // Display type - only define if RPi display //#define RPI_DRIVER +#define CGRAM_OFFSET + // Only define one driver, the other ones must be commented out //#define ILI9341_DRIVER // OG Marauder //#define ST7735_DRIVER // Marauder Mini // Define additional parameters below for this display @@ -52,10 +54,10 @@ // For ST7789, ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation // #define TFT_WIDTH 80 - #define TFT_WIDTH 240 // Marauder Mini + #define TFT_WIDTH 135 // Marauder Mini // #define TFT_WIDTH 240 // ST7789 240 x 240 and 240 x 320 // #define TFT_HEIGHT 160 - #define TFT_HEIGHT 135 // Marauder Mini + #define TFT_HEIGHT 240 // Marauder Mini // #define TFT_HEIGHT 240 // ST7789 240 x 240 // #define TFT_HEIGHT 320 // ST7789 240 x 320 @@ -168,11 +170,11 @@ #define TFT_CS 5 // Chip select control pin D8 #define TFT_DC 23 // Data Command control pin #define TFT_RST 18 // Reset pin (could connect to NodeMCU RST, see next line) -#define TOUCH_CS -1 +#define TOUCH_CS 10 //#define TFT_MISO 19 #define TFT_MOSI 15 #define TFT_SCLK 13 -//#define TFT_BL 32 +#define TFT_BL 10 /* // ESP32 Marauder diff --git a/esp32_marauder/CommandLine.cpp b/esp32_marauder/CommandLine.cpp index cdab132..1febd9f 100644 --- a/esp32_marauder/CommandLine.cpp +++ b/esp32_marauder/CommandLine.cpp @@ -214,6 +214,7 @@ void CommandLine::runCommand(String input) { Serial.println(HELP_REBOOT_CMD); Serial.println(HELP_UPDATE_CMD_A); Serial.println(HELP_LS_CMD); + Serial.println(HELP_LED_CMD); // WiFi sniff/scan Serial.println(HELP_SIGSTREN_CMD); @@ -269,18 +270,39 @@ void CommandLine::runCommand(String input) { menu_function_obj.changeMenu(menu_function_obj.current_menu); #endif } - // ls command - else if (cmd_args.get(0) == LS_CMD) { - #ifdef HAS_SD - if (cmd_args.size() > 1) - sd_obj.listDir(cmd_args.get(1)); - else - Serial.println("You did not provide a dir to list"); - #else - Serial.println("SD support disabled, cannot use command"); - return; + // LED command + else if (cmd_args.get(0) == LED_CMD) { + int hex_arg = this->argSearch(&cmd_args, "-s"); + int pat_arg = this->argSearch(&cmd_args, "-p"); + #ifdef PIN + if (hex_arg != 0) { + String hexstring = cmd_args.get(hex_arg + 1); + int number = (int)strtol(&hexstring[1], NULL, 16); + int r = number >> 16; + int g = number >> 8 & 0xFF; + int b = number & 0xFF; + //Serial.println(r); + //Serial.println(g); + //Serial.println(b); + led_obj.setColor(r, g, b); + led_obj.setMode(MODE_CUSTOM); } - #endif + #else + Serial.println("This hardware does not support neopixel"); + #endif + } + // ls command + else if (cmd_args.get(0) == LS_CMD) { + #ifdef HAS_SD + if (cmd_args.size() > 1) + sd_obj.listDir(cmd_args.get(1)); + else + Serial.println("You did not provide a dir to list"); + #else + Serial.println("SD support disabled, cannot use command"); + return; + #endif + } // Channel command else if (cmd_args.get(0) == CH_CMD) { diff --git a/esp32_marauder/CommandLine.h b/esp32_marauder/CommandLine.h index 3dde2c8..551afc5 100644 --- a/esp32_marauder/CommandLine.h +++ b/esp32_marauder/CommandLine.h @@ -14,6 +14,7 @@ #include "SDInterface.h" #endif #include "settings.h" +#include "LedInterface.h" #ifdef HAS_SCREEN extern MenuFunctions menu_function_obj; @@ -26,6 +27,7 @@ extern Web web_obj; extern SDInterface sd_obj; #endif extern Settings settings_obj; +extern LedInterface led_obj; extern LinkedList* access_points; extern LinkedList* ssids; extern LinkedList* stations; @@ -42,6 +44,7 @@ const char PROGMEM UPDATE_CMD[] = "update"; const char PROGMEM HELP_CMD[] = "help"; const char PROGMEM SETTINGS_CMD[] = "settings"; const char PROGMEM LS_CMD[] = "ls"; +const char PROGMEM LED_CMD[] = "led"; // WiFi sniff/scan const char PROGMEM SIGSTREN_CMD[] = "sigmon"; @@ -83,6 +86,7 @@ const char PROGMEM HELP_REBOOT_CMD[] = "reboot"; const char PROGMEM HELP_UPDATE_CMD_A[] = "update -s/-w"; const char PROGMEM HELP_SETTINGS_CMD[] = "settings [-s enable/disable>]/[-r]"; const char PROGMEM HELP_LS_CMD[] = "ls "; +const char PROGMEM HELP_LED_CMD[] = "led -s /-p "; // WiFi sniff/scan const char PROGMEM HELP_SIGSTREN_CMD[] = "sigmon"; diff --git a/esp32_marauder/LedInterface.cpp b/esp32_marauder/LedInterface.cpp index 63ff7b2..f332234 100644 --- a/esp32_marauder/LedInterface.cpp +++ b/esp32_marauder/LedInterface.cpp @@ -33,6 +33,9 @@ void LedInterface::main(uint32_t currentTime) { else if (this->current_mode == MODE_SNIFF) { this->sniffLed(); } + else if (this->current_mode == MODE_CUSTOM) { + return; + } else { this->ledOff(); } @@ -46,19 +49,21 @@ uint8_t LedInterface::getMode() { return this->current_mode; } +void LedInterface::setColor(int r, int g, int b) { + strip.setPixelColor(0, strip.Color(r, g, b)); + strip.show(); +} + void LedInterface::sniffLed() { - strip.setPixelColor(0, strip.Color(0, 0, 255)); - strip.show(); + this->setColor(0, 0, 255); } void LedInterface::attackLed() { - strip.setPixelColor(0, strip.Color(255, 0, 0)); - strip.show(); + this->setColor(255, 0, 0); } void LedInterface::ledOff() { - strip.setPixelColor(0, strip.Color(0, 0, 0)); - strip.show(); + this->setColor(0, 0, 0); } void LedInterface::rainbow() { diff --git a/esp32_marauder/LedInterface.h b/esp32_marauder/LedInterface.h index 27d5ec7..28368e4 100644 --- a/esp32_marauder/LedInterface.h +++ b/esp32_marauder/LedInterface.h @@ -12,6 +12,7 @@ #define MODE_RAINBOW 1 #define MODE_ATTACK 2 #define MODE_SNIFF 3 +#define MODE_CUSTOM 4 extern Settings settings_obj; extern Adafruit_NeoPixel strip; @@ -41,6 +42,7 @@ class LedInterface { void main(uint32_t currentTime); void setMode(uint8_t); + void setColor(int r, int g, int b); uint8_t getMode(); diff --git a/esp32_marauder/configs.h b/esp32_marauder/configs.h index c991a36..6919786 100644 --- a/esp32_marauder/configs.h +++ b/esp32_marauder/configs.h @@ -15,13 +15,13 @@ //#define MARAUDER_V6 //#define MARAUDER_KIT //#define GENERIC_ESP32 - //#define MARAUDER_FLIPPER + #define MARAUDER_FLIPPER //#define ESP32_LDDB //#define MARAUDER_DEV_BOARD_PRO //#define XIAO_ESP32_S3 //// END BOARD TARGETS - #define MARAUDER_VERSION "v0.10.7" + #define MARAUDER_VERSION "v0.10.8" //// BOARD FEATURES #ifdef MARAUDER_M5STICKC @@ -32,6 +32,7 @@ #define HAS_PWR_MGMT #define HAS_SCREEN #define HAS_SD + #define USE_SD #define HAS_TEMP_SENSOR #endif @@ -44,6 +45,7 @@ //#define HAS_PWR_MGMT #define HAS_SCREEN #define HAS_SD + #define USE_SD #define HAS_TEMP_SENSOR #endif @@ -51,11 +53,12 @@ //#define FLIPPER_ZERO_HAT #define HAS_BATTERY #define HAS_BT - #define HAS_BUTTONS + //#define HAS_BUTTONS //#define HAS_NEOPIXEL_LED //#define HAS_PWR_MGMT #define HAS_SCREEN #define HAS_SD + #define USE_SD #define HAS_TEMP_SENSOR #endif @@ -63,11 +66,12 @@ //#define FLIPPER_ZERO_HAT #define HAS_BATTERY #define HAS_BT - #define HAS_BUTTONS + //#define HAS_BUTTONS //#define HAS_NEOPIXEL_LED //#define HAS_PWR_MGMT #define HAS_SCREEN #define HAS_SD + #define USE_SD #define HAS_TEMP_SENSOR #endif @@ -75,11 +79,12 @@ //#define FLIPPER_ZERO_HAT #define HAS_BATTERY #define HAS_BT - #define HAS_BUTTONS + //#define HAS_BUTTONS //#define HAS_NEOPIXEL_LED //#define HAS_PWR_MGMT #define HAS_SCREEN #define HAS_SD + #define USE_SD #define HAS_TEMP_SENSOR #endif @@ -116,6 +121,7 @@ //#define HAS_PWR_MGMT //#define HAS_SCREEN #define HAS_SD + #define USE_SD //#define HAS_TEMP_SENSOR #endif @@ -124,10 +130,11 @@ //#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 #endif