mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-22 23:26:45 -08:00
Merge branch 'develop' into develop
This commit is contained in:
@@ -214,6 +214,7 @@ void CommandLine::runCommand(String input) {
|
|||||||
Serial.println(HELP_REBOOT_CMD);
|
Serial.println(HELP_REBOOT_CMD);
|
||||||
Serial.println(HELP_UPDATE_CMD_A);
|
Serial.println(HELP_UPDATE_CMD_A);
|
||||||
Serial.println(HELP_LS_CMD);
|
Serial.println(HELP_LS_CMD);
|
||||||
|
Serial.println(HELP_LED_CMD);
|
||||||
|
|
||||||
// WiFi sniff/scan
|
// WiFi sniff/scan
|
||||||
Serial.println(HELP_SIGSTREN_CMD);
|
Serial.println(HELP_SIGSTREN_CMD);
|
||||||
@@ -269,6 +270,27 @@ void CommandLine::runCommand(String input) {
|
|||||||
menu_function_obj.changeMenu(menu_function_obj.current_menu);
|
menu_function_obj.changeMenu(menu_function_obj.current_menu);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
// 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);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
Serial.println("This hardware does not support neopixel")
|
||||||
|
#endif
|
||||||
|
}
|
||||||
// ls command
|
// ls command
|
||||||
else if (cmd_args.get(0) == LS_CMD) {
|
else if (cmd_args.get(0) == LS_CMD) {
|
||||||
#ifdef HAS_SD
|
#ifdef HAS_SD
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "SDInterface.h"
|
#include "SDInterface.h"
|
||||||
#endif
|
#endif
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
#include "LedInterface.h"
|
||||||
|
|
||||||
#ifdef HAS_SCREEN
|
#ifdef HAS_SCREEN
|
||||||
extern MenuFunctions menu_function_obj;
|
extern MenuFunctions menu_function_obj;
|
||||||
@@ -26,6 +27,7 @@ extern Web web_obj;
|
|||||||
extern SDInterface sd_obj;
|
extern SDInterface sd_obj;
|
||||||
#endif
|
#endif
|
||||||
extern Settings settings_obj;
|
extern Settings settings_obj;
|
||||||
|
extern LedInterface led_obj;
|
||||||
extern LinkedList<AccessPoint>* access_points;
|
extern LinkedList<AccessPoint>* access_points;
|
||||||
extern LinkedList<ssid>* ssids;
|
extern LinkedList<ssid>* ssids;
|
||||||
extern LinkedList<Station>* stations;
|
extern LinkedList<Station>* stations;
|
||||||
@@ -42,6 +44,7 @@ const char PROGMEM UPDATE_CMD[] = "update";
|
|||||||
const char PROGMEM HELP_CMD[] = "help";
|
const char PROGMEM HELP_CMD[] = "help";
|
||||||
const char PROGMEM SETTINGS_CMD[] = "settings";
|
const char PROGMEM SETTINGS_CMD[] = "settings";
|
||||||
const char PROGMEM LS_CMD[] = "ls";
|
const char PROGMEM LS_CMD[] = "ls";
|
||||||
|
const char PROGMEM LED_CMD[] = "led";
|
||||||
|
|
||||||
// WiFi sniff/scan
|
// WiFi sniff/scan
|
||||||
const char PROGMEM SIGSTREN_CMD[] = "sigmon";
|
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_UPDATE_CMD_A[] = "update -s/-w";
|
||||||
const char PROGMEM HELP_SETTINGS_CMD[] = "settings [-s <setting> enable/disable>]/[-r]";
|
const char PROGMEM HELP_SETTINGS_CMD[] = "settings [-s <setting> enable/disable>]/[-r]";
|
||||||
const char PROGMEM HELP_LS_CMD[] = "ls <directory>";
|
const char PROGMEM HELP_LS_CMD[] = "ls <directory>";
|
||||||
|
const char PROGMEM HELP_LED_CMD[] = "led -s <hex color>/-p <rainbow>";
|
||||||
|
|
||||||
// WiFi sniff/scan
|
// WiFi sniff/scan
|
||||||
const char PROGMEM HELP_SIGSTREN_CMD[] = "sigmon";
|
const char PROGMEM HELP_SIGSTREN_CMD[] = "sigmon";
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ void LedInterface::main(uint32_t currentTime) {
|
|||||||
else if (this->current_mode == MODE_SNIFF) {
|
else if (this->current_mode == MODE_SNIFF) {
|
||||||
this->sniffLed();
|
this->sniffLed();
|
||||||
}
|
}
|
||||||
|
else if (this->current_mode == MODE_CUSTOM) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
this->ledOff();
|
this->ledOff();
|
||||||
}
|
}
|
||||||
@@ -46,19 +49,21 @@ uint8_t LedInterface::getMode() {
|
|||||||
return this->current_mode;
|
return this->current_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LedInterface::sniffLed() {
|
void LedInterface::setColor(int r, int g, int b) {
|
||||||
strip.setPixelColor(0, strip.Color(0, 0, 255));
|
strip.setPixelColor(0, strip.Color(r, g, b));
|
||||||
strip.show();
|
strip.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LedInterface::sniffLed() {
|
||||||
|
this->setColor(0, 0, 255);
|
||||||
|
}
|
||||||
|
|
||||||
void LedInterface::attackLed() {
|
void LedInterface::attackLed() {
|
||||||
strip.setPixelColor(0, strip.Color(255, 0, 0));
|
this->setColor(255, 0, 0);
|
||||||
strip.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LedInterface::ledOff() {
|
void LedInterface::ledOff() {
|
||||||
strip.setPixelColor(0, strip.Color(0, 0, 0));
|
this->setColor(0, 0, 0);
|
||||||
strip.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LedInterface::rainbow() {
|
void LedInterface::rainbow() {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#define MODE_RAINBOW 1
|
#define MODE_RAINBOW 1
|
||||||
#define MODE_ATTACK 2
|
#define MODE_ATTACK 2
|
||||||
#define MODE_SNIFF 3
|
#define MODE_SNIFF 3
|
||||||
|
#define MODE_CUSTOM 4
|
||||||
|
|
||||||
extern Settings settings_obj;
|
extern Settings settings_obj;
|
||||||
extern Adafruit_NeoPixel strip;
|
extern Adafruit_NeoPixel strip;
|
||||||
@@ -41,6 +42,7 @@ class LedInterface {
|
|||||||
void main(uint32_t currentTime);
|
void main(uint32_t currentTime);
|
||||||
|
|
||||||
void setMode(uint8_t);
|
void setMode(uint8_t);
|
||||||
|
void setColor(int r, int g, int b);
|
||||||
uint8_t getMode();
|
uint8_t getMode();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,12 +16,12 @@
|
|||||||
//#define MARAUDER_KIT
|
//#define MARAUDER_KIT
|
||||||
//#define GENERIC_ESP32
|
//#define GENERIC_ESP32
|
||||||
//#define MARAUDER_FLIPPER
|
//#define MARAUDER_FLIPPER
|
||||||
//#define ESP32_LDDB
|
#define ESP32_LDDB
|
||||||
//#define MARAUDER_DEV_BOARD_PRO
|
//#define MARAUDER_DEV_BOARD_PRO
|
||||||
//#define XIAO_ESP32_S3
|
//#define XIAO_ESP32_S3
|
||||||
//// END BOARD TARGETS
|
//// END BOARD TARGETS
|
||||||
|
|
||||||
#define MARAUDER_VERSION "v0.10.7"
|
#define MARAUDER_VERSION "v0.10.8"
|
||||||
|
|
||||||
//// BOARD FEATURES
|
//// BOARD FEATURES
|
||||||
#ifdef MARAUDER_M5STICKC
|
#ifdef MARAUDER_M5STICKC
|
||||||
|
|||||||
Reference in New Issue
Block a user