Compare commits

..

34 Commits

Author SHA1 Message Date
Just Call Me Koko
b0a98dbdd6 Merge pull request #781 from justcallmekoko/develop
Add build for CYD 2 USB
2025-05-30 16:15:58 -04:00
Just Call Me Koko
09eab04003 Add build for CYD 2 USB 2025-05-30 16:06:41 -04:00
Just Call Me Koko
bed3de7b41 Merge pull request #780 from justcallmekoko/develop
Fix SD card init for CYD 2 USB
2025-05-30 13:32:55 -04:00
Just Call Me Koko
a4c0569c7f Fix SD card init for CYD 2 USB 2025-05-30 13:26:41 -04:00
Just Call Me Koko
dc404f8766 Merge pull request #779 from justcallmekoko/develop
Update README.md
2025-05-30 13:01:53 -04:00
Just Call Me Koko
3bc65c2e66 Update README.md 2025-05-30 13:01:33 -04:00
Just Call Me Koko
bced58cf4c Merge pull request #778 from justcallmekoko/develop
Add larger Marauder logo
2025-05-30 13:00:21 -04:00
Just Call Me Koko
289c127871 Add larger Marauder logo 2025-05-30 12:59:57 -04:00
Just Call Me Koko
60e228ee6c Merge pull request #777 from justcallmekoko/develop
Add new Marauder logo
2025-05-30 12:56:28 -04:00
Just Call Me Koko
478c677f6a Add new Marauder logo 2025-05-30 12:51:24 -04:00
Just Call Me Koko
1307d71c5d Merge pull request #776 from justcallmekoko/develop
Add support for CYD 2 USB and ST7789
2025-05-30 12:40:59 -04:00
Just Call Me Koko
1f08406c63 Repair setup select 2025-05-30 12:30:12 -04:00
Just Call Me Koko
b41597fdac Add TFT_eSPI setup file for CYD 2 USB 2025-05-30 12:24:26 -04:00
Just Call Me Koko
b6fe3954e6 Create config for CYD 2 USB 2025-05-30 12:22:58 -04:00
Just Call Me Koko
dfa3f5b1f0 Merge pull request #774 from justcallmekoko/develop
Add Pineapple and multiSSID sniff
2025-05-28 12:16:06 -04:00
Just Call Me Koko
d4140ffeab Reformat output strings 2025-05-28 12:10:09 -04:00
Just Call Me Koko
40626ac682 Increment version number 2025-05-28 09:13:10 -04:00
Just Call Me Koko
eb2eadae9f Add icon image files 2025-05-28 09:03:37 -04:00
Just Call Me Koko
3a24619fe8 Add icons for pineapple and multissid 2025-05-28 09:03:09 -04:00
Just Call Me Koko
806238fdb2 Merge pull request #772 from amec0e/develop
Added Pinescan and MultiSSID
2025-05-28 08:42:43 -04:00
amec0e
877fb65ab7 Update WiFiScan.cpp
Fixed RunPineScan
2025-05-28 00:24:42 +01:00
amec0e
c8b429e320 Update MenuFunctions.h
Uncommented and added Pinescan_sniff and Multissid_Sniff definition
2025-05-28 00:01:38 +01:00
amec0e
ba7c05ff73 Update CommandLine.cpp
Added Pinescan and MultiSSID
2025-05-27 23:01:34 +01:00
amec0e
339b9b7c8b Update CommandLine.h
Added Pinescan and MultiSSID
2025-05-27 23:00:22 +01:00
amec0e
aa750ec9b8 Update MenuFunctions.cpp
Added Pinescan and MultiSSID
2025-05-27 22:59:29 +01:00
amec0e
7f68fa3aea Update MenuFunctions.h
Added Pinescan and MultiSSID
2025-05-27 22:57:23 +01:00
amec0e
bcb218124f Merge branch 'justcallmekoko:develop' into develop 2025-05-27 22:55:27 +01:00
amec0e
2631d096c9 Update WiFiScan.cpp
Added Pinescan and MultiSSID
2025-05-27 22:55:05 +01:00
Just Call Me Koko
dc2c8e241a Word wrap signal monitor 2025-05-27 17:53:01 -04:00
amec0e
8f3d0219f0 Update WiFiScan.h
Add Pinescan and MultiSSID
2025-05-27 22:48:50 +01:00
amec0e
650fe84b4e Update lang_var.h
Added Pinescan and MultiSSID
2025-05-27 22:43:51 +01:00
Just Call Me Koko
2d922bac23 Merge pull request #763 from justcallmekoko/develop
Fix SD delete not working on touch hardware
2025-05-19 13:38:14 -04:00
Just Call Me Koko
e918c939f0 Fix SD delete not working on touch hardware 2025-05-19 13:32:45 -04:00
Just Call Me Koko
a0c5349bea Add images to detail BFFB NRF24 fix 2025-05-15 12:31:47 -04:00
26 changed files with 1579 additions and 27 deletions

View File

@@ -32,6 +32,7 @@ jobs:
- { name: "Marauder v7", flag: "MARAUDER_V7", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "marauder_v7", tft: true, tft_file: "User_Setup_dual_nrf24.h", build_dir: "d32", addr: "0x1000" }
- { name: "Marauder CYD 2432S028", flag: "MARAUDER_CYD_MICRO", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "cyd_2432S028", tft: true, tft_file: "User_Setup_cyd_micro.h", build_dir: "d32", addr: "0x1000" }
- { name: "Marauder CYD 2432S024 GUITION", flag: "MARAUDER_CYD_GUITION", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "cyd_2432S024_guition", tft: true, tft_file: "User_Setup_cyd_guition.h", build_dir: "d32", addr: "0x1000" }
- { name: "Marauder CYD 2432S028 2 USB", flag: "MARAUDER_CYD_2USB", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "cyd_2432S028_2usb", tft: true, tft_file: "User_Setup_cyd_2usb.h", build_dir: "d32", addr: "0x1000" }
- { name: "Marauder v7.1", flag: "MARAUDER_V7_1", fbqn: "esp32:esp32:dfrobot_firebeetle2_esp32e:FlashSize=16M,PartitionScheme=min_spiffs,PSRAM=enabled", file_name: "marauder_v7_1", tft: true, tft_file: "User_Setup_dual_nrf24.h", build_dir: "dfrobot_firebeetle2_esp32e", addr: "0x1000" }
steps:

View File

@@ -4,7 +4,7 @@
<!---Shields/Badges https://shields.io/--->
# ESP32 Marauder
<p align="center"><img alt="Marauder logo" src="https://github.com/justcallmekoko/ESP32Marauder/blob/master/pictures/marauder3L.jpg?raw=true" width="300"></p>
<p align="center"><img alt="Marauder logo" src="https://github.com/justcallmekoko/ESP32Marauder/blob/master/pictures/marauder_skull_patch_04_full_final.png?raw=true" width="300"></p>
<p align="center">
<b>A suite of WiFi/Bluetooth offensive and defensive tools for the ESP32</b>
<br><br>

View File

@@ -28,10 +28,11 @@
//#include <User_Setup_marauder_m5stickc.h>
//#include <User_Setup_marauder_m5stickcp2.h>
//#include <User_Setup_pocket_sdr.h>
//#include <User_Setup_dual_nrf24.h>
//#include <User_Setup_pocket_sdr_2.h>
//#include <User_Setup_dual_nrf24.h> // Marauder v7
//#include <User_Setup_pocket_sdr_2.h> // Drone Signal Analyzer
//#include <User_Setup_cyd_micro.h>
//#include <User_Setup_cyd_guition.h>
#include <User_Setup_cyd_2usb.h>
//#include <User_Setups/Setup1_ILI9341.h> // Setup file configured for my ILI9341
//#include <User_Setups/Setup2_ST7735.h> // Setup file configured for my ST7735

316
User_Setup_cyd_2usb.h Normal file
View File

@@ -0,0 +1,316 @@
// USER DEFINED SETTINGS
// Set driver type, fonts to be loaded, pins used and SPI control method etc
//
// See the User_Setup_Select.h file if you wish to be able to define multiple
// setups and then easily select which setup file is used by the compiler.
//
// If this file is edited correctly then all the library example sketches should
// run without the need to make any more changes for a particular hardware setup!
// Note that some sketches are designed for a particular TFT pixel width/height
// ##################################################################################
//
// Section 1. Call up the right driver file and any options for it
//
// ##################################################################################
// Display type - only define if RPi display
//#define RPI_DRIVER
// 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
//#define ILI9163_DRIVER // Define additional parameters below for this display
//#define S6D02A1_DRIVER
//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
//#define HX8357D_DRIVER
//#define ILI9481_DRIVER
//#define ILI9486_DRIVER
//#define ILI9488_DRIVER // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high)
#define ST7789_DRIVER // Full configuration option, define additional parameters below for this display
//#define ST7789_2_DRIVER // Minimal configuration option, define additional parameters below for this display
//#define R61581_DRIVER
//#define RM68140_DRIVER
//#define ST7796_DRIVER
// Some displays support SPI reads via the MISO pin, other displays have a single
// bi-directional SDA pin and the library will try to read this via the MOSI line.
// To use the SDA line for reading data from the TFT uncomment the following line:
// #define TFT_SDA_READ // This option is for ESP32 ONLY, tested with ST7789 display only
// For ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
// Try ONE option at a time to find the correct colour order for your display
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
// For M5Stack ESP32 module with integrated ILI9341 display ONLY, remove // in line below
// #define M5STACK
// For ST7789, ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
// #define TFT_WIDTH 80
// #define TFT_WIDTH 128 // Marauder Mini
#define TFT_WIDTH 240 // ST7789 240 x 240 and 240 x 320
// #define TFT_HEIGHT 160
// #define TFT_HEIGHT 128 // Marauder Mini
// #define TFT_HEIGHT 240 // ST7789 240 x 240
#define TFT_HEIGHT 320 // ST7789 240 x 320
// For ST7735 ONLY, define the type of display, originally this was based on the
// colour of the tab on the screen protector film but this is not always true, so try
// out the different options below if the screen does not display graphics correctly,
// e.g. colours wrong, mirror images, or tray pixels at the edges.
// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this
// this User_Setup file, then rebuild and upload the sketch to the board again:
// #define ST7735_INITB
// #define ST7735_GREENTAB
// #define ST7735_GREENTAB2
// #define ST7735_GREENTAB3
// #define ST7735_GREENTAB128 // For 128 x 128 display
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
// #define ST7735_REDTAB
// #define ST7735_BLACKTAB
// #define ST7735_REDTAB160x80 // For 160 x 80 display with 24 pixel offset
// If colours are inverted (white shows as black) then uncomment one of the next
// 2 lines try both options, one of the options should correct the inversion.
// #define TFT_INVERSION_ON
#define TFT_INVERSION_OFF
// If a backlight control signal is available then define the TFT_BL pin in Section 2
// below. The backlight will be turned ON when tft.begin() is called, but the library
// needs to know if the LEDs are ON with the pin HIGH or LOW. If the LEDs are to be
// driven with a PWM signal or turned OFF/ON then this must be handled by the user
// sketch. e.g. with digitalWrite(TFT_BL, LOW);
// #define TFT_BACKLIGHT_ON LOW // HIGH or LOW are options
// ##################################################################################
//
// Section 2. Define the pins that are used to interface with the display here
//
// ##################################################################################
// We must use hardware SPI, a minimum of 3 GPIO pins is needed.
// Typical setup for ESP8266 NodeMCU ESP-12 is :
//
// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT)
// Display LED to NodeMCU pin VIN (or 5V, see below)
// Display SCK to NodeMCU pin D5
// Display SDI/MOSI to NodeMCU pin D7
// Display DC (RS/AO)to NodeMCU pin D3
// Display RESET to NodeMCU pin D4 (or RST, see below)
// Display CS to NodeMCU pin D8 (or GND, see below)
// Display GND to NodeMCU pin GND (0V)
// Display VCC to NodeMCU 5V or 3.3V
//
// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin
//
// The DC (Data Command) pin may be labeled AO or RS (Register Select)
//
// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more
// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS
// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin
// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected.
//
// The NodeMCU D0 pin can be used for RST
//
//
// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin
// If 5V is not available at a pin you can use 3.3V but backlight brightness
// will be lower.
// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ######
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
//#define TFT_CS PIN_D8 // Chip select control pin D8
//#define TFT_DC PIN_D3 // Data Command control pin
//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V
//#define TFT_BL PIN_D1 // LED back-light (only for ST7789 with backlight control pin)
//#define TOUCH_CS PIN_D2 // Chip select pin (T_CS) of touch screen
//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only
// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ######
// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact
// but saves pins for other functions. It is best not to connect MISO as some displays
// do not tristate that line wjen chip select is high!
// On NodeMCU 1.0 SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode
// On NodeMCU V3 S0 =MISO, S1 =MOSI, S2 =SCLK
// In ESP8266 overlap mode the following must be defined
//#define TFT_SPI_OVERLAP
// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3
//#define TFT_CS PIN_D3
//#define TFT_DC PIN_D5 // Data Command control pin
//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V
// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ######
// For ESP32 Dev board (only tested with ILI9341 display)
// The hardware SPI can be mapped to any pins
// Marauder Mini
/*
#define TFT_CS 17 // Chip select control pin D8
#define TFT_DC 16 // Data Command control pin
#define TFT_RST 5 // Reset pin (could connect to NodeMCU RST, see next line)
//#define TFT_MISO 19
//#define TFT_MOSI 23
//#define TFT_SCLK 18
//#define TFT_BL 32
*/
// ESP32 Marauder
#define TFT_MISO 12
#define TFT_MOSI 13
#define TFT_SCLK 14
#define TFT_CS 15 // Chip select control pin
#define TFT_DC 2 // Data Command control pin
#define TFT_RST -1 // Reset pin (could connect to RST pin)
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
#define TFT_BL 21 // LED back-light (only for ST7789 with backlight control pin)
#define TOUCH_CS 33 // Chip select pin (T_CS) of touch screen
/////////////////////////////
// ESP32 Centauri
/*
#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS 27 // Chip select control pin
#define TFT_DC 26 // Data Command control pin
#define TFT_RST 5 // Reset pin (could connect to RST pin)
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
#define TFT_BL 32 // LED back-light (only for ST7789 with backlight control pin)
#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen
*/
/////////////////////////////
//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only
// For the M5Stack module use these #define lines
//#define TFT_MISO 19
//#define TFT_MOSI 23
//#define TFT_SCLK 18
//#define TFT_CS 14 // Chip select control pin
//#define TFT_DC 27 // Data Command control pin
//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin)
//#define TFT_BL 32 // LED back-light (required for M5Stack)
// ###### EDIT THE PINs BELOW TO SUIT YOUR ESP32 PARALLEL TFT SETUP ######
// The library supports 8 bit parallel TFTs with the ESP32, the pin
// selection below is compatible with ESP32 boards in UNO format.
// Wemos D32 boards need to be modified, see diagram in Tools folder.
// Only ILI9481 and ILI9341 based displays have been tested!
// Parallel bus is only supported on ESP32
// Uncomment line below to use ESP32 Parallel interface instead of SPI
//#define ESP32_PARALLEL
// The ESP32 and TFT the pins used for testing are:
//#define TFT_CS 33 // Chip select control pin (library pulls permanently low
//#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31
//#define TFT_RST 32 // Reset pin, toggles on startup
//#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31
//#define TFT_RD 2 // Read strobe control pin
//#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus
//#define TFT_D1 13 // so a single register write sets/clears all bits.
//#define TFT_D2 26 // Pins can be randomly assigned, this does not affect
//#define TFT_D3 25 // TFT screen update performance.
//#define TFT_D4 17
//#define TFT_D5 16
//#define TFT_D6 27
//#define TFT_D7 14
// ##################################################################################
//
// Section 3. Define the fonts that are to be used here
//
// ##################################################################################
// Comment out the #defines below with // to stop that font being loaded
// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not
// normally necessary. If all fonts are loaded the extra FLASH space required is
// about 17Kbytes. To save FLASH space only enable the fonts you need!
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
// this will save ~20kbytes of FLASH
#define SMOOTH_FONT
// ##################################################################################
//
// Section 4. Other options
//
// ##################################################################################
// Define the SPI clock frequency, this affects the graphics rendering speed. Too
// fast and the TFT driver will not keep up and display corruption appears.
// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails
// With a ST7735 display more than 27MHz may not work (spurious pixels and lines)
// With an ILI9163 display 27 MHz works OK.
// #define SPI_FREQUENCY 1000000
//#define SPI_FREQUENCY 5000000
// #define SPI_FREQUENCY 10000000
// #define SPI_FREQUENCY 20000000
#define SPI_FREQUENCY 27000000 // Marauder // Actually sets it to 26.67MHz = 80/3
// #define SPI_FREQUENCY 40000000
// #define SPI_FREQUENCY 80000000
// Optional reduced SPI frequency for reading TFT
#define SPI_READ_FREQUENCY 20000000
// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here:
#define SPI_TOUCH_FREQUENCY 2500000
// The ESP32 has 2 free SPI ports i.e. VSPI and HSPI, the VSPI is the default.
// If the VSPI port is in use and pins are not accessible (e.g. TTGO T-Beam)
// then uncomment the following line:
#define USE_HSPI_PORT
// Comment out the following #define if "SPI Transactions" do not need to be
// supported. When commented out the code size will be smaller and sketches will
// run slightly faster, so leave it commented out unless you need it!
// Transaction support is needed to work with SD library but not needed with TFT_SdFat
// Transaction support is required if other SPI devices are connected.
// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex)
// so changing it here has no effect
// #define SUPPORT_TRANSACTIONS

View File

@@ -215,7 +215,13 @@ PROGMEM static const unsigned char menu_icons[][66] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
{0xFF, 0xFF, 0x3F, 0xFF, 0xF7, 0x3F, 0x7F, 0x96, 0x3F, 0xFF, 0xED, 0x3F, // PINESCAN_SNIFF: 37
0x3F, 0x25, 0x3F, 0xDF, 0xD2, 0x3E, 0xFF, 0xED, 0x3F, 0x7F, 0x8E, 0x3F,
0x3B, 0x77, 0x37, 0xBD, 0x6A, 0x2F, 0xD6, 0xBD, 0x1A, 0xDA, 0xDA, 0x16,
0x5A, 0x6F, 0x16, 0x9A, 0xF7, 0x16, 0xD6, 0x5A, 0x1A, 0xDD, 0xBD, 0x2E,
0xBB, 0x5A, 0x37, 0x3F, 0x6F, 0x3F, 0x7F, 0xB7, 0x3F, 0xFF, 0xCC, 0x3F,
0xFF, 0xF3, 0x3F, 0xFF, 0xFF, 0x3F}
};
/*#ifndef MARAUDER_MINI

View File

@@ -229,6 +229,8 @@ void CommandLine::runCommand(String input) {
Serial.println(HELP_SNIFF_BEACON_CMD);
Serial.println(HELP_SNIFF_PROBE_CMD);
Serial.println(HELP_SNIFF_PWN_CMD);
Serial.println(HELP_SNIFF_PINESCAN_CMD);
Serial.println(HELP_SNIFF_MULTISSID_CMD);
Serial.println(HELP_SNIFF_ESP_CMD);
Serial.println(HELP_SNIFF_DEAUTH_CMD);
Serial.println(HELP_SNIFF_PMKID_CMD);
@@ -683,6 +685,24 @@ void CommandLine::runCommand(String input) {
#endif
wifi_scan_obj.StartScan(WIFI_SCAN_PWN, TFT_MAGENTA);
}
// PineScan sniff
else if (cmd_args.get(0) == SNIFF_PINESCAN_CMD) {
Serial.println("Starting Pinescan sniff. Stop with " + (String)STOPSCAN_CMD);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(WIFI_SCAN_PINESCAN, TFT_MAGENTA);
}
// MultiSSID sniff
else if (cmd_args.get(0) == SNIFF_MULTISSID_CMD) {
Serial.println("Starting MultiSSID sniff. Stop with " + (String)STOPSCAN_CMD);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(WIFI_SCAN_MULTISSID, TFT_MAGENTA);
}
// Espressif sniff
else if (cmd_args.get(0) == SNIFF_ESP_CMD) {
Serial.println("Starting Espressif device sniff. Stop with " + (String)STOPSCAN_CMD);

View File

@@ -63,6 +63,8 @@ const char PROGMEM SNIFF_RAW_CMD[] = "sniffraw";
const char PROGMEM SNIFF_BEACON_CMD[] = "sniffbeacon";
const char PROGMEM SNIFF_PROBE_CMD[] = "sniffprobe";
const char PROGMEM SNIFF_PWN_CMD[] = "sniffpwn";
const char PROGMEM SNIFF_PINESCAN_CMD[] = "sniffpinescan";
const char PROGMEM SNIFF_MULTISSID_CMD[] = "sniffmultissid";
const char PROGMEM SNIFF_ESP_CMD[] = "sniffesp";
const char PROGMEM SNIFF_DEAUTH_CMD[] = "sniffdeauth";
const char PROGMEM SNIFF_PMKID_CMD[] = "sniffpmkid";
@@ -121,6 +123,8 @@ const char PROGMEM HELP_SNIFF_RAW_CMD[] = "sniffraw";
const char PROGMEM HELP_SNIFF_BEACON_CMD[] = "sniffbeacon";
const char PROGMEM HELP_SNIFF_PROBE_CMD[] = "sniffprobe";
const char PROGMEM HELP_SNIFF_PWN_CMD[] = "sniffpwn";
const char PROGMEM HELP_SNIFF_PINESCAN_CMD[] = "sniffpinescan";
const char PROGMEM HELP_SNIFF_MULTISSID_CMD[] = "sniffmultissid";
const char PROGMEM HELP_SNIFF_ESP_CMD[] = "sniffesp";
const char PROGMEM HELP_SNIFF_DEAUTH_CMD[] = "sniffdeauth";
const char PROGMEM HELP_SNIFF_PMKID_CMD[] = "sniffpmkid [-c <channel>][-d][-l]";

View File

@@ -46,6 +46,10 @@ uint8_t Display::updateTouch(uint16_t *x, uint16_t *y, uint16_t threshold) {
uint8_t rot = this->tft.getRotation();
//#ifdef HAS_CYD_PORTRAIT
// rot = 0;
//#endif
switch (rot) {
case 0: // Standard Protrait
*x = map(p.x, 200, 3700, 1, TFT_WIDTH);
@@ -95,17 +99,24 @@ void Display::RunSetup()
#endif
tft.init();
#ifndef MARAUDER_M5STICKC
tft.setRotation(SCREEN_ORIENTATION);
/*#ifndef MARAUDER_M5STICKC
tft.setRotation(0); // Portrait
#endif
#ifdef HAS_CYD_PORTRAIT
tft.setRotation(3); // Bro these CYDs are so stupid
#endif
#ifdef MARAUDER_M5STICKC
tft.setRotation(1);
#endif
#ifdef MARAUDER_REV_FEATHER
tft.setRotation(1);
#endif
#endif*/
tft.setCursor(0, 0);
@@ -553,7 +564,11 @@ void Display::setupScrollArea(uint16_t tfa, uint16_t bfa) {
//Serial.println(" bfa: " + (String)bfa);
//Serial.println("yStart: " + (String)this->yStart);
#ifdef HAS_ILI9341
tft.writecommand(ILI9341_VSCRDEF); // Vertical scroll definition
#ifdef HAS_ST7789
tft.writecommand(ST7789_VSCRDEF); // Vertical scroll definition
#else
tft.writecommand(ILI9341_VSCRDEF);
#endif
tft.writedata(tfa >> 8); // Top Fixed Area line count
tft.writedata(tfa);
tft.writedata((YMAX-tfa-bfa)>>8); // Vertical Scrolling Area line count
@@ -566,7 +581,11 @@ void Display::setupScrollArea(uint16_t tfa, uint16_t bfa) {
void Display::scrollAddress(uint16_t vsp) {
#ifdef HAS_ILI9341
tft.writecommand(ILI9341_VSCRSADD); // Vertical scrolling pointer
#ifdef HAS_ST7789
tft.writecommand(ST7789_VSCRDEF); // Vertical scroll definition
#else
tft.writecommand(ILI9341_VSCRDEF);
#endif
tft.writedata(vsp>>8);
tft.writedata(vsp);
#endif

View File

@@ -776,6 +776,8 @@ void MenuFunctions::main(uint32_t currentTime)
(wifi_scan_obj.currentScanMode == WIFI_SCAN_TARGET_AP_FULL) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_AP_STA) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PWN) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PINESCAN) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_MULTISSID) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ESPRESSIF) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ALL) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_DEAUTH) ||
@@ -846,6 +848,8 @@ void MenuFunctions::main(uint32_t currentTime)
(wifi_scan_obj.currentScanMode == WIFI_SCAN_TARGET_AP_FULL) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_AP_STA) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PWN) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PINESCAN) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_MULTISSID) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ESPRESSIF) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ALL) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_DEAUTH) ||
@@ -1062,7 +1066,7 @@ void MenuFunctions::main(uint32_t currentTime)
// Menu navigation and paging
#ifdef HAS_BUTTONS
#if !(defined(MARAUDER_V6) || defined(MARAUDER_V6_1) || defined(MARAUDER_CYD_MICRO) || defined(MARAUDER_CYD_GUITION))
#if !(defined(MARAUDER_V6) || defined(MARAUDER_V6_1) || defined(MARAUDER_CYD_MICRO) || defined(MARAUDER_CYD_GUITION) || defined(MARAUDER_CYD_2USB))
#if !defined(MARAUDER_M5STICKC) || defined(MARAUDER_M5STICKCP2)
if (u_btn.justPressed()){
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_OFF) ||
@@ -1527,7 +1531,7 @@ void MenuFunctions::orientDisplay()
{
display_obj.tft.init();
display_obj.tft.setRotation(0); // Portrait
display_obj.tft.setRotation(SCREEN_ORIENTATION); // Portrait
display_obj.tft.setCursor(0, 0);
@@ -1651,13 +1655,13 @@ void MenuFunctions::RunSetup()
#if (!defined(HAS_ILI9341) && defined(HAS_BUTTONS))
miniKbMenu.list = new LinkedList<MenuNode>();
#endif
#ifndef HAS_ILI9341
#ifdef HAS_BUTTONS
//#ifndef HAS_ILI9341
// #ifdef HAS_BUTTONS
#ifdef HAS_SD
sdDeleteMenu.list = new LinkedList<MenuNode>();
#endif
#endif
#endif
// #endif
//#endif
// Bluetooth menu stuff
bluetoothSnifferMenu.list = new LinkedList<MenuNode>();
@@ -1723,9 +1727,9 @@ void MenuFunctions::RunSetup()
miniKbMenu.name = "Mini Keyboard";
#endif
#ifdef HAS_SD
#ifndef HAS_ILI9341
// #ifndef HAS_ILI9341
sdDeleteMenu.name = "Delete SD Files";
#endif
// #endif
#endif
// Build Main Menu
@@ -1832,6 +1836,18 @@ void MenuFunctions::RunSetup()
this->drawStatusBar();
wifi_scan_obj.StartScan(WIFI_SCAN_PWN, TFT_RED);
});
this->addNodes(&wifiSnifferMenu, text_table1[63], TFTYELLOW, NULL, PINESCAN_SNIFF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(WIFI_SCAN_PINESCAN, TFT_YELLOW);
});
this->addNodes(&wifiSnifferMenu, text_table1[64], TFTORANGE, NULL, MULTISSID_SNIFF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(WIFI_SCAN_MULTISSID, TFT_ORANGE);
});
//#ifndef HAS_ILI9341
this->addNodes(&wifiSnifferMenu, text_table1[49], TFTMAGENTA, NULL, BEACON_SNIFF, [this]() {
display_obj.clearScreen();
@@ -2495,20 +2511,98 @@ void MenuFunctions::RunSetup()
}
#endif
#endif
#else
#ifdef HAS_BUTTONS
this->changeMenu(&sdDeleteMenu);
bool deleting = true;
display_obj.tft.setTextWrap(false);
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
display_obj.tft.println("Loading...");
uint16_t t_x = 0, t_y = 0; // To store the touch coordinates
while (deleting) {
// Build list of files
sd_obj.sd_files->clear();
delete sd_obj.sd_files;
sd_obj.sd_files = new LinkedList<String>();
sd_obj.sd_files->add("Back");
sd_obj.listDirToLinkedList(sd_obj.sd_files);
int sd_file_index = 0;
this->sdDeleteMenu.list->set(0, MenuNode{sd_obj.sd_files->get(sd_file_index), false, TFTCYAN, 0, NULL, true, NULL});
this->buildButtons(&sdDeleteMenu);
this->displayCurrentMenu();
// Start button loop
while(true) {
#ifdef HAS_ILI9341
if (!this->disable_touch)
pressed = display_obj.updateTouch(&t_x, &t_y);
#endif
uint8_t menu_button = display_obj.menuButton(&t_x, &t_y, pressed);
#if !defined(MARAUDER_M5STICKC) || defined(MARAUDER_M5STICKCP2)
if (menu_button == UP_BUTTON) {
if (sd_file_index > 0)
sd_file_index--;
else
sd_file_index = sd_obj.sd_files->size() - 1;
this->sdDeleteMenu.list->set(0, MenuNode{sd_obj.sd_files->get(sd_file_index), false, TFTCYAN, 0, NULL, true, NULL});
this->buildButtons(&sdDeleteMenu);
this->displayCurrentMenu();
}
#endif
if (menu_button == DOWN_BUTTON) {
if (sd_file_index < sd_obj.sd_files->size() - 1)
sd_file_index++;
else
sd_file_index = 0;
this->sdDeleteMenu.list->set(0, MenuNode{sd_obj.sd_files->get(sd_file_index), false, TFTCYAN, 0, NULL, true, NULL});
this->buildButtons(&sdDeleteMenu, 0, sd_obj.sd_files->get(sd_file_index));
this->displayCurrentMenu();
}
if (menu_button == SELECT_BUTTON) {
if (sd_obj.sd_files->get(sd_file_index) != "Back") {
if (sd_obj.removeFile("/" + sd_obj.sd_files->get(sd_file_index)))
Serial.println("Successfully Removed File: /" + sd_obj.sd_files->get(sd_file_index));
display_obj.tft.setTextWrap(false);
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
display_obj.tft.println("Deleting /" + sd_obj.sd_files->get(sd_file_index) + "...");
}
else {
this->changeMenu(sdDeleteMenu.parentMenu);
deleting = false;
}
break;
}
}
}
#endif
#endif
});
}
#endif
#ifdef HAS_SD
#ifndef HAS_ILI9341
//#ifndef HAS_ILI9341
#ifdef HAS_BUTTONS
sdDeleteMenu.parentMenu = &deviceMenu;
this->addNodes(&sdDeleteMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
this->changeMenu(sdDeleteMenu.parentMenu);
});
#endif
#endif
//#endif
#endif
// Save Files Menu

View File

@@ -74,6 +74,8 @@ extern Settings settings_obj;
#define DISABLE_TOUCH 34
#define FLIPPER 35
#define BLANK 36
#define PINESCAN_SNIFF 37 // Use blanks icon
#define MULTISSID_SNIFF 37 // Use blanks icon
PROGMEM void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p);
PROGMEM bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data);

View File

@@ -33,7 +33,7 @@ bool SDInterface::initSD() {
*/
#if defined(MARAUDER_M5STICKC)
enum { SPI_SCK = 0, SPI_MISO = 36, SPI_MOSI = 26 };
#elif defined(MARAUDER_CYD_MICRO)
#elif defined(HAS_CYD_TOUCH)
enum { SPI_SCK = SD_SCK, SPI_MISO = SD_MISO, SPI_MOSI = SD_MOSI };
#else
enum { SPI_SCK = 0, SPI_MISO = 36, SPI_MOSI = 26 };

View File

@@ -546,6 +546,14 @@ void WiFiScan::RunSetup() {
stations = new LinkedList<Station>();
airtags = new LinkedList<AirTag>();
flippers = new LinkedList<Flipper>();
// for Pinescan
pinescan_trackers = new LinkedList<PineScanTracker>();
confirmed_pinescan = new LinkedList<ConfirmedPineScan>();
pinescan_list_full_reported = false;
// for MultiSSID
multissid_trackers = new LinkedList<MultiSSIDTracker>();
confirmed_multissid = new LinkedList<ConfirmedMultiSSID>();
multissid_list_full_reported = false;
#ifdef HAS_PSRAM
mac_history = (struct mac_addr*) ps_malloc(mac_history_len * sizeof(struct mac_addr));
@@ -804,6 +812,10 @@ void WiFiScan::StartScan(uint8_t scan_mode, uint16_t color)
RunAPScan(scan_mode, color);
else if (scan_mode == WIFI_SCAN_PWN)
RunPwnScan(scan_mode, color);
else if (scan_mode == WIFI_SCAN_PINESCAN)
RunPineScan(scan_mode, color);
else if (scan_mode == WIFI_SCAN_MULTISSID)
RunMultiSSIDScan(scan_mode, color);
else if (scan_mode == WIFI_SCAN_DEAUTH)
RunDeauthScan(scan_mode, color);
else if (scan_mode == WIFI_PACKET_MONITOR) {
@@ -1003,6 +1015,24 @@ bool WiFiScan::shutdownBLE() {
return true;
}
// Pinescan cleanup
int WiFiScan::clearPineScanTrackers() {
int num_cleared = pinescan_trackers->size() + confirmed_pinescan->size();
pinescan_trackers->clear();
confirmed_pinescan->clear();
pinescan_list_full_reported = false;
return num_cleared;
}
// MultiSSID Cleanup
int WiFiScan::clearMultiSSID() {
int num_cleared = multissid_trackers->size() + confirmed_multissid->size();
multissid_trackers->clear();
confirmed_multissid->clear();
multissid_list_full_reported = false;
return num_cleared;
}
// Function to stop all wifi scans
void WiFiScan::StopScan(uint8_t scan_mode)
{
@@ -1018,6 +1048,8 @@ void WiFiScan::StopScan(uint8_t scan_mode)
(currentScanMode == WIFI_SCAN_TARGET_AP_FULL) ||
(currentScanMode == WIFI_SCAN_AP_STA) ||
(currentScanMode == WIFI_SCAN_PWN) ||
(currentScanMode == WIFI_SCAN_PINESCAN) ||
(currentScanMode == WIFI_SCAN_MULTISSID) ||
(currentScanMode == WIFI_SCAN_EAPOL) ||
(currentScanMode == WIFI_SCAN_ACTIVE_EAPOL) ||
(currentScanMode == WIFI_SCAN_ACTIVE_LIST_EAPOL) ||
@@ -2518,6 +2550,104 @@ void WiFiScan::RunMimicFlood(uint8_t scan_mode, uint16_t color) {
initTime = millis();
}
// Pineapple
void WiFiScan::RunPineScan(uint8_t scan_mode, uint16_t color)
{
this->clearPineScanTrackers();
startPcap("pinescan");
#ifdef HAS_FLIPPER_LED
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
#ifdef HAS_SCREEN
display_obj.TOP_FIXED_AREA_2 = 48;
display_obj.tteBar = true;
display_obj.print_delay_1 = 15;
display_obj.print_delay_2 = 10;
display_obj.initScrollValues(true);
display_obj.tft.setTextWrap(false);
display_obj.tft.setTextColor(TFT_BLACK, color);
#ifdef HAS_FULL_SCREEN
display_obj.tft.fillRect(0,16,240,16, color);
display_obj.tft.drawCentreString(text_table4[48],120,16,2);
#endif
#ifdef HAS_ILI9341
display_obj.touchToExit();
#endif
display_obj.tft.setTextColor(TFT_RED, TFT_BLACK);
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
#endif
esp_wifi_init(&cfg2);
esp_wifi_set_storage(WIFI_STORAGE_RAM);
esp_wifi_set_mode(WIFI_MODE_NULL);
esp_wifi_start();
this->setMac();
esp_wifi_set_promiscuous(true);
esp_wifi_set_promiscuous_filter(&filt);
esp_wifi_set_promiscuous_rx_cb(&pineScanSnifferCallback);
esp_wifi_set_channel(set_channel, WIFI_SECOND_CHAN_NONE);
this->wifi_initialized = true;
initTime = millis();
}
// MultiSSID
void WiFiScan::RunMultiSSIDScan(uint8_t scan_mode, uint16_t color)
{
this->clearMultiSSID();
startPcap("multissid");
#ifdef HAS_FLIPPER_LED
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
#ifdef HAS_SCREEN
display_obj.TOP_FIXED_AREA_2 = 48;
display_obj.tteBar = true;
display_obj.print_delay_1 = 15;
display_obj.print_delay_2 = 10;
display_obj.initScrollValues(true);
display_obj.tft.setTextWrap(false);
display_obj.tft.setTextColor(TFT_BLACK, color);
#ifdef HAS_FULL_SCREEN
display_obj.tft.fillRect(0,16,240,16, color);
display_obj.tft.drawCentreString(text_table4[49],120,16,2);
#endif
#ifdef HAS_ILI9341
display_obj.touchToExit();
#endif
display_obj.tft.setTextColor(TFT_BLUE, TFT_BLACK);
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
#endif
esp_wifi_init(&cfg2);
esp_wifi_set_storage(WIFI_STORAGE_RAM);
esp_wifi_set_mode(WIFI_MODE_NULL);
esp_wifi_start();
this->setMac();
esp_wifi_set_promiscuous(true);
esp_wifi_set_promiscuous_filter(&filt);
esp_wifi_set_promiscuous_rx_cb(&multiSSIDSnifferCallback);
esp_wifi_set_channel(set_channel, WIFI_SECOND_CHAN_NONE);
this->wifi_initialized = true;
initTime = millis();
}
void WiFiScan::RunPwnScan(uint8_t scan_mode, uint16_t color)
{
startPcap("pwnagotchi");
@@ -4141,6 +4271,671 @@ String WiFiScan::processPwnagotchiBeacon(const uint8_t* frame, int length) {
}
}
// PINEAPPLE LOGIC
// Define lookup table for Pineapple OUIs
const WiFiScan::SuspiciousVendor WiFiScan::suspicious_vendors[] = {
// Alfa
{"Alfa Inc", SUSPICIOUS_WHEN_OPEN, {0x00C0CA}, 1},
// Orient Power (Pineapple MK7)
{"Orient Power Home Network Ltd", SUSPICIOUS_ALWAYS, {0x001337}, 1},
// Shenzhen Century
{"Shenzhen Century Xinyang Technology Co Ltd", SUSPICIOUS_WHEN_OPEN, {0x1CBFCE}, 1},
// IEEE
{"IEEE Registration Authority", SUSPICIOUS_WHEN_OPEN, {0x0CEFAF}, 1},
// Hak5 (Locally Administered)
{"Hak5", SUSPICIOUS_WHEN_PROTECTED, {0x02C0CA, 0x021337}, 2},
// MediaTek
{"MediaTek Inc", SUSPICIOUS_ALWAYS, {0x000A00, 0x000C43, 0x000CE7, 0x0017A5}, 4},
// Panda Wireless
{"Panda Wireless Inc", SUSPICIOUS_ALWAYS, {0x9CEFD5, 0x9CE5D5}, 2},
// Unassigned/Spoofed
{"Unassigned/Spoofed", SUSPICIOUS_ALWAYS, {0xDEADBE}, 1}
};
// Total OUI count: 13
// Update the number of vendors constant
const int WiFiScan::NUM_SUSPICIOUS_VENDORS = sizeof(WiFiScan::suspicious_vendors) / sizeof(WiFiScan::suspicious_vendors[0]);
// This fixes picking up a AP on an adjacent channel.
int WiFiScan::extractPineScanChannel(const uint8_t* payload, int len) {
if (len < 38) return -1; // Ensure we have enough data
// Jump to the element fields after the fixed beacon header and SSID field
int pos = 36 + payload[37] + 2; // 36 fixed header bytes + SSID length + 2 bytes for SSID tag info
// Search through the tags for the channel information (DS Parameter Set, tag number 3)
while (pos < len - 2) {
uint8_t tag_num = payload[pos];
uint8_t tag_len = payload[pos + 1];
// Safety check to prevent buffer overruns
if (pos + 2 + tag_len > len) break;
// Found DS Parameter Set (tag 3), channel is the next byte
if (tag_num == 3 && tag_len == 1) {
return payload[pos + 2]; // Return the channel
}
pos += tag_len + 2;
}
// If channel not found in the beacon, return the one from rx_ctrl
return -1;
}
// Function to count tagged parameters in beacon frames
bool countPineScanTaggedParameters(const uint8_t* payload, int len) {
int ssid_len = payload[37];
int pos = 36 + ssid_len + 2;
// Check if next tag is the DS Parameter (channel info) - tag number 3
if (pos < len - 2 && payload[pos] == 3 && payload[pos+1] == 1) {
// Check for end of packet after DS Parameter (no more tags)
int next_pos = pos + 2 + payload[pos+1];
return (next_pos >= len || next_pos + 2 > len);
}
return false;
}
void WiFiScan::pineScanSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type) {
extern WiFiScan wifi_scan_obj;
wifi_promiscuous_pkt_t *snifferPacket = (wifi_promiscuous_pkt_t*)buf;
WifiMgmtHdr *frameControl = (WifiMgmtHdr*)snifferPacket->payload;
wifi_pkt_rx_ctrl_t ctrl = (wifi_pkt_rx_ctrl_t)snifferPacket->rx_ctrl;
int len = snifferPacket->rx_ctrl.sig_len;
String display_string = "";
String essid = "";
if (type == WIFI_PKT_MGMT) {
len -= 4;
int fctl = ntohs(frameControl->fctl);
const wifi_ieee80211_packet_t *ipkt = (wifi_ieee80211_packet_t *)snifferPacket->payload;
const WifiMgmtHdr *hdr = &ipkt->hdr;
#ifdef HAS_SCREEN
int buff = display_obj.display_buffer->size();
#else
int buff = 0;
#endif
if ((snifferPacket->payload[0] == 0x80) && (buff == 0)) {
buffer_obj.append(snifferPacket, len); // Capture all beacons
// Extract MAC address for Pineapple detection
uint8_t mac_addr[6];
for (int i = 0; i < 6; i++) {
mac_addr[i] = snifferPacket->payload[10 + i];
}
// Extract channel from the beacon frame
int ap_channel = WiFiScan::extractPineScanChannel(snifferPacket->payload, len);
if (ap_channel == -1) {
ap_channel = snifferPacket->rx_ctrl.channel;
}
// Extract capability flags
uint16_t capab_info = ((uint16_t)snifferPacket->payload[34] | ((uint16_t)snifferPacket->payload[35] << 8));
bool suspicious_capability = (capab_info == 0x0001);
bool tag_count = countPineScanTaggedParameters(snifferPacket->payload, len);
bool tag_and_susp_cap = suspicious_capability && tag_count;
bool is_protected = (capab_info & 0x10) != 0;
bool is_open = !is_protected;
String auth_type = is_open ? "OPEN" : "PROTECTED";
// Check for suspicious OUIs
uint8_t oui[3] = {snifferPacket->payload[10], snifferPacket->payload[11], snifferPacket->payload[12]};
uint32_t oui_value = ((uint32_t)oui[0] << 16) | ((uint32_t)oui[1] << 8) | oui[2];
bool suspicious_oui = false;
bool pinescan_match = false;
bool pinescan_match_by_oui = false;
const char* vendor_name = "Unknown";
// Check against suspicious vendors list
for (int i = 0; i < WiFiScan::NUM_SUSPICIOUS_VENDORS; i++) {
const WiFiScan::SuspiciousVendor& vendor = WiFiScan::suspicious_vendors[i];
// Check each OUI for this vendor
for (int j = 0; j < vendor.oui_count; j++) {
if (oui_value == vendor.ouis[j]) {
if ((vendor.security_flags & SUSPICIOUS_ALWAYS) ||
(is_open && (vendor.security_flags & SUSPICIOUS_WHEN_OPEN)) ||
(is_protected && (vendor.security_flags & SUSPICIOUS_WHEN_PROTECTED))) {
suspicious_oui = true;
pinescan_match = true;
vendor_name = vendor.vendor_name;
pinescan_match_by_oui = true;
break;
}
}
}
if (pinescan_match_by_oui) break;
}
pinescan_match = pinescan_match || tag_and_susp_cap;
if ((tag_and_susp_cap) && !suspicious_oui) {
vendor_name = "Unknown";
}
// Check if we have already seen this MAC
int ap_index = -1;
bool already_tracked = false;
// Find if have seen this MAC before in the tracking list
for (int i = 0; i < wifi_scan_obj.pinescan_trackers->size(); i++) {
bool mac_match = true;
for (int x = 0; x < 6; x++) {
if (mac_addr[x] != wifi_scan_obj.pinescan_trackers->get(i).mac[x]) {
mac_match = false;
break;
}
}
if (mac_match) {
ap_index = i;
already_tracked = true;
break;
}
}
// Check if already in confirmed list
bool already_confirmed = false;
int confirmed_index = -1;
for (int i = 0; i < wifi_scan_obj.confirmed_pinescan->size(); i++) {
bool mac_match = true;
for (int x = 0; x < 6; x++) {
if (mac_addr[x] != wifi_scan_obj.confirmed_pinescan->get(i).mac[x]) {
mac_match = false;
break;
}
}
if (mac_match) {
already_confirmed = true;
confirmed_index = i;
break;
}
}
// If already confirmed, just update it and return
if (already_confirmed) {
if (snifferPacket->payload[37] <= 0) {
essid = "[hidden]";
} else {
for (int i = 0; i < snifferPacket->payload[37]; i++) {
essid.concat((char)snifferPacket->payload[i + 38]);
}
}
ConfirmedPineScan confirmed = wifi_scan_obj.confirmed_pinescan->get(confirmed_index);
if (snifferPacket->rx_ctrl.rssi > confirmed.rssi) {
confirmed.rssi = snifferPacket->rx_ctrl.rssi;
}
if (essid != "" && essid != "[hidden]") {
confirmed.essid = essid;
}
wifi_scan_obj.confirmed_pinescan->set(confirmed_index, confirmed);
return;
}
// Add to tracking list if new
if (!already_tracked) {
// Check if we've reached the maximum number of tracked APs
if (wifi_scan_obj.pinescan_trackers->size() >= MAX_AP_ENTRIES) {
if (!wifi_scan_obj.pinescan_list_full_reported) {
Serial.println("AP List Full - Clearing list to make room");
wifi_scan_obj.pinescan_list_full_reported = true;
wifi_scan_obj.pinescan_trackers->clear();
Serial.println("AP list cleared, continuing scan");
}
// Add the current AP to the freshly cleared list
PineScanTracker new_tracker;
memcpy(new_tracker.mac, mac_addr, 6);
new_tracker.suspicious_oui = suspicious_oui;
new_tracker.tag_and_susp_cap = tag_and_susp_cap;
new_tracker.channel = ap_channel;
new_tracker.rssi = snifferPacket->rx_ctrl.rssi;
new_tracker.reported = false;
wifi_scan_obj.pinescan_trackers->add(new_tracker);
ap_index = wifi_scan_obj.pinescan_trackers->size() - 1;
// Reset the full reported flag since we've made room
wifi_scan_obj.pinescan_list_full_reported = false;
} else {
// Add to tracking list when there is room
PineScanTracker new_tracker;
memcpy(new_tracker.mac, mac_addr, 6);
new_tracker.suspicious_oui = suspicious_oui;
new_tracker.tag_and_susp_cap = tag_and_susp_cap;
new_tracker.channel = ap_channel;
new_tracker.rssi = snifferPacket->rx_ctrl.rssi;
new_tracker.reported = false;
wifi_scan_obj.pinescan_trackers->add(new_tracker);
ap_index = wifi_scan_obj.pinescan_trackers->size() - 1;
}
} else {
// Update existing tracker
PineScanTracker tracker = wifi_scan_obj.pinescan_trackers->get(ap_index);
if (snifferPacket->rx_ctrl.rssi > tracker.rssi) {
tracker.rssi = snifferPacket->rx_ctrl.rssi;
}
if (!tracker.suspicious_oui && suspicious_oui) {
tracker.suspicious_oui = true;
}
if (!tracker.tag_and_susp_cap && tag_and_susp_cap) {
tracker.tag_and_susp_cap = true;
}
wifi_scan_obj.pinescan_trackers->set(ap_index, tracker);
}
// If we have a match and it is not already in the confirmed list, add it
if (pinescan_match) {
if (wifi_scan_obj.confirmed_pinescan->size() >= MAX_PINESCAN_ENTRIES) {
if (!wifi_scan_obj.pinescan_list_full_reported) {
Serial.println("Confirmed PineScan List Full - Cannot add more");
Serial.println("Stopping PineScan detection until scan is restarted");
wifi_scan_obj.pinescan_list_full_reported = true;
}
return; // Stop processing completely if list is full
}
if (snifferPacket->payload[37] <= 0) {
essid = "[hidden]";
} else {
for (int i = 0; i < snifferPacket->payload[37]; i++) {
essid.concat((char)snifferPacket->payload[i + 38]);
}
}
String detection = "";
if (pinescan_match_by_oui) {
detection = "SUSP_OUI";
} else if (tag_and_susp_cap) {
detection = "TAG+SUSP_CAP";
} else {
detection = "OTHER";
}
char addr[18];
snprintf(addr, sizeof(addr), "%02X:%02X:%02X:%02X:%02X:%02X",
mac_addr[0], mac_addr[1], mac_addr[2],
mac_addr[3], mac_addr[4], mac_addr[5]);
// Add to confirmed Pineapple list
ConfirmedPineScan new_confirmed;
memcpy(new_confirmed.mac, mac_addr, 6);
new_confirmed.detection_type = detection;
new_confirmed.essid = essid;
new_confirmed.channel = ap_channel;
new_confirmed.rssi = snifferPacket->rx_ctrl.rssi;
new_confirmed.displayed = false;
wifi_scan_obj.confirmed_pinescan->add(new_confirmed);
// Mark as reported in the tracker
if (already_tracked) {
PineScanTracker tracker = wifi_scan_obj.pinescan_trackers->get(ap_index);
tracker.reported = true;
wifi_scan_obj.pinescan_trackers->set(ap_index, tracker);
}
// Only display MAX_DISPLAY_ENTRIES entries per MAC
int displayed_count = 0;
for (int i = 0; i < wifi_scan_obj.confirmed_pinescan->size(); i++) {
bool mac_match = true;
for (int x = 0; x < 6; x++) {
if (mac_addr[x] != wifi_scan_obj.confirmed_pinescan->get(i).mac[x]) {
mac_match = false;
break;
}
}
if (mac_match && wifi_scan_obj.confirmed_pinescan->get(i).displayed) {
displayed_count++;
}
}
// Only display if we have not hit the display limit for this MAC
if (displayed_count < MAX_DISPLAY_ENTRIES) {
int idx = wifi_scan_obj.confirmed_pinescan->size() - 1;
ConfirmedPineScan to_display = wifi_scan_obj.confirmed_pinescan->get(idx);
to_display.displayed = true;
wifi_scan_obj.confirmed_pinescan->set(idx, to_display);
// Create display string
String log_line = "MAC: " + String(addr) +
" CH: " + String(ap_channel) +
" RSSI: " + String(snifferPacket->rx_ctrl.rssi) +
" DET: " + detection +
" SSID: " + essid;
log_line += "\n";
delay(random(0, 10));
Serial.print(log_line);
#ifdef HAS_FULL_SCREEN
display_string.concat("MAC: " + String(addr));
display_string.concat(" CH: " + String(ap_channel));
display_string.concat(" RSSI: " + String(snifferPacket->rx_ctrl.rssi));
int temp_len = display_string.length();
for (int i = 0; i < 40 - temp_len; i++) {
display_string.concat(" ");
}
display_obj.display_buffer->add(display_string);
display_string = "";
display_string.concat("DET: " + detection);
display_string.concat(" SSID: " + essid);
temp_len = display_string.length();
for (int i = 0; i < 40 - temp_len; i++) {
display_string.concat(" ");
}
display_obj.display_buffer->add(display_string);
display_string = "";
for (int i = 0; i < 60; i++) {
display_string.concat("-");
}
display_obj.display_buffer->add(display_string);
#elif defined(HAS_MINI_SCREEN)
// Add MAC and channel
display_string.concat("MAC: " + String(addr));
display_string.concat(" CH: " + String(ap_channel));
int temp_len = display_string.length();
for (int i = 0; i < 40 - temp_len; i++) {
display_string.concat(" ");
}
display_obj.display_buffer->add(display_string);
// Add RSSI and Detection method
display_string = "";
display_string.concat("RSSI: " + String(snifferPacket->rx_ctrl.rssi));
display_string.concat(" DET: " + detection);
temp_len = display_string.length();
for (int i = 0; i < 40 - temp_len; i++) {
display_string.concat(" ");
}
display_obj.display_buffer->add(display_string);
// Add SSID
display_string = "";
display_string.concat("SSID: " + essid);
temp_len = display_string.length();
for (int i = 0; i < 40 - temp_len; i++) {
display_string.concat(" ");
}
display_obj.display_buffer->add(display_string);
// Add delin
display_string = "";
for (int i = 0; i < 60; i++) {
display_string.concat("-");
}
display_obj.display_buffer->add(display_string);
#endif
}
}
}
}
}
void WiFiScan::multiSSIDSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type) {
extern WiFiScan wifi_scan_obj;
wifi_promiscuous_pkt_t *snifferPacket = (wifi_promiscuous_pkt_t*)buf;
WifiMgmtHdr *frameControl = (WifiMgmtHdr*)snifferPacket->payload;
wifi_pkt_rx_ctrl_t ctrl = (wifi_pkt_rx_ctrl_t)snifferPacket->rx_ctrl;
int len = snifferPacket->rx_ctrl.sig_len;
String display_string = "";
String essid = "";
if (type == WIFI_PKT_MGMT) {
len -= 4;
int fctl = ntohs(frameControl->fctl);
const wifi_ieee80211_packet_t *ipkt = (wifi_ieee80211_packet_t *)snifferPacket->payload;
const WifiMgmtHdr *hdr = &ipkt->hdr;
#ifdef HAS_SCREEN
int buff = display_obj.display_buffer->size();
#else
int buff = 0;
#endif
if ((snifferPacket->payload[0] == 0x80) && (buff == 0)) {
buffer_obj.append(snifferPacket, len); // Capture all beacons
// Extract MAC address
uint8_t mac_addr[6];
for (int i = 0; i < 6; i++) {
mac_addr[i] = snifferPacket->payload[10 + i];
}
// Extract channel from the beacon frame
int ap_channel = WiFiScan::extractPineScanChannel(snifferPacket->payload, len);
if (ap_channel == -1) {
ap_channel = snifferPacket->rx_ctrl.channel;
}
// Process SSID and compute hash
uint16_t ssid_hash = 0;
if (snifferPacket->payload[37] > 0) {
// Compute Whole SSID hash directly from payload
for (int i = 0; i < (int)snifferPacket->payload[37]; i++) {
char c = snifferPacket->payload[i + 38];
ssid_hash = ((ssid_hash << 5) + ssid_hash) + c;
}
} else {
ssid_hash = 0xFFFF; // hash for hidden SSIDs
}
// Check for multiple unique SSIDs from same MAC
bool multi_ssid_ap = false;
int ap_index = -1;
// Find if have seen this MAC before
for (int i = 0; i < wifi_scan_obj.multissid_trackers->size(); i++) {
bool mac_match = true;
for (int x = 0; x < 6; x++) {
if (mac_addr[x] != wifi_scan_obj.multissid_trackers->get(i).mac[x]) {
mac_match = false;
break;
}
}
if (mac_match) {
ap_index = i;
break;
}
}
bool already_confirmed = false;
int confirmed_index = -1;
for (int i = 0; i < wifi_scan_obj.confirmed_multissid->size(); i++) {
bool mac_match = true;
for (int x = 0; x < 6; x++) {
if (mac_addr[x] != wifi_scan_obj.confirmed_multissid->get(i).mac[x]) {
mac_match = false;
break;
}
}
if (mac_match) {
already_confirmed = true;
confirmed_index = i;
break;
}
}
// If already confirmed, just update and return
if (already_confirmed) {
if (snifferPacket->payload[37] <= 0) {
essid = "[hidden]";
} else {
for (int i = 0; i < snifferPacket->payload[37]; i++) {
essid.concat((char)snifferPacket->payload[i + 38]);
}
}
ConfirmedMultiSSID confirmed = wifi_scan_obj.confirmed_multissid->get(confirmed_index);
if (snifferPacket->rx_ctrl.rssi > confirmed.rssi) {
confirmed.rssi = snifferPacket->rx_ctrl.rssi;
}
if (essid != "" && essid != "[hidden]") {
confirmed.essid = essid;
}
wifi_scan_obj.confirmed_multissid->set(confirmed_index, confirmed);
return;
}
if (ap_index == -1) {
if (wifi_scan_obj.confirmed_multissid->size() >= MAX_MULTISSID_ENTRIES) {
if (!wifi_scan_obj.multissid_list_full_reported) {
Serial.println("Confirmed MultiSSID List Full - Cannot add more");
Serial.println("Stopping MultiSSID detection until scan is restarted");
wifi_scan_obj.multissid_list_full_reported = true;
}
return; // Stop processing completely if list is full
}
// Check if we have reached the maximum number of tracked APs
if (wifi_scan_obj.multissid_trackers->size() >= MAX_AP_ENTRIES) {
if (!wifi_scan_obj.multissid_list_full_reported) {
Serial.println("AP List Full - Clearing list to make room");
wifi_scan_obj.multissid_list_full_reported = true;
wifi_scan_obj.multissid_trackers->clear();
Serial.println("AP list cleared, continuing scan");
}
// Add the current AP to the freshly cleared list
MultiSSIDTracker new_tracker;
memcpy(new_tracker.mac, mac_addr, 6);
new_tracker.ssid_hashes[0] = ssid_hash;
new_tracker.unique_ssid_count = 1;
new_tracker.reported = false;
wifi_scan_obj.multissid_trackers->add(new_tracker);
ap_index = wifi_scan_obj.multissid_trackers->size() - 1;
// Reset the full reported flag since we've made room
wifi_scan_obj.multissid_list_full_reported = false;
} else {
// Add to tracking list when there is room
MultiSSIDTracker new_tracker;
memcpy(new_tracker.mac, mac_addr, 6);
new_tracker.ssid_hashes[0] = ssid_hash;
new_tracker.unique_ssid_count = 1;
new_tracker.reported = false;
wifi_scan_obj.multissid_trackers->add(new_tracker);
ap_index = wifi_scan_obj.multissid_trackers->size() - 1;
}
} else {
MultiSSIDTracker tracker = wifi_scan_obj.multissid_trackers->get(ap_index);
// Check if we have already seen this SSID hash
bool hash_found = false;
for (int i = 0; i < min(MULTISSID_THRESHOLD, (int)tracker.unique_ssid_count); i++) {
if (tracker.ssid_hashes[i] == ssid_hash) {
hash_found = true;
break;
}
}
// Add new hash if not seen before
if (!hash_found && tracker.unique_ssid_count < MULTISSID_THRESHOLD) {
int index = tracker.unique_ssid_count;
tracker.ssid_hashes[index] = ssid_hash;
tracker.unique_ssid_count = min(MULTISSID_THRESHOLD, tracker.unique_ssid_count + 1);
wifi_scan_obj.multissid_trackers->set(ap_index, tracker);
}
// Check if this MAC now has enough unique SSIDs
if (tracker.unique_ssid_count >= MULTISSID_THRESHOLD) {
multi_ssid_ap = true;
}
}
// If we found a multi SSID AP, report it
if (multi_ssid_ap) {
if (snifferPacket->payload[37] <= 0) {
essid = "[hidden]";
} else {
for (int i = 0; i < snifferPacket->payload[37]; i++) {
essid.concat((char)snifferPacket->payload[i + 38]);
}
}
char addr[18];
snprintf(addr, sizeof(addr), "%02X:%02X:%02X:%02X:%02X:%02X",
mac_addr[0], mac_addr[1], mac_addr[2],
mac_addr[3], mac_addr[4], mac_addr[5]);
// Add to confirmed Multi SSID list
ConfirmedMultiSSID new_confirmed;
memcpy(new_confirmed.mac, mac_addr, 6);
new_confirmed.essid = essid;
new_confirmed.channel = ap_channel;
new_confirmed.rssi = snifferPacket->rx_ctrl.rssi;
new_confirmed.ssid_count = wifi_scan_obj.multissid_trackers->get(ap_index).unique_ssid_count;
new_confirmed.displayed = false;
wifi_scan_obj.confirmed_multissid->add(new_confirmed);
String log_line = "MAC: " + String(addr) +
" CH: " + String(ap_channel) +
" RSSI: " + String(snifferPacket->rx_ctrl.rssi) +
" SSIDs: " + String(new_confirmed.ssid_count) +
" SSID: " + essid;
log_line += "\n";
delay(random(0, 10));
Serial.print(log_line);
display_string.concat("MAC: " + String(addr));
display_string.concat(" CH: " + String(ap_channel));
display_string.concat(" RSSI: " + String(snifferPacket->rx_ctrl.rssi));
display_string.concat(" SSIDs: " + String(new_confirmed.ssid_count));
display_string.concat(" SSID: " + essid);
int temp_len = display_string.length();
for (int i = 0; i < 40 - temp_len; i++) {
display_string.concat(" ");
}
#ifdef HAS_SCREEN
display_obj.display_buffer->add(display_string);
#endif
}
}
}
}
void WiFiScan::beaconSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
{
@@ -4622,8 +5417,10 @@ void WiFiScan::rawSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
access_points->set(targ_index, targ_ap);
Serial.println((String)access_points->get(targ_index).essid + " RSSI: " + (String)access_points->get(targ_index).rssi);
display_string.concat((String)access_points->get(targ_index).essid);
display_string.concat(" RSSI: ");
display_string.concat((String)access_points->get(targ_index).rssi);
#ifndef HAS_MINI_SCREEN
display_string.concat(" RSSI: ");
display_string.concat((String)access_points->get(targ_index).rssi);
#endif
int temp_len = display_string.length();
for (int i = 0; i < 50 - temp_len; i++)
{
@@ -4631,6 +5428,17 @@ void WiFiScan::rawSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
}
#ifdef HAS_SCREEN
display_obj.display_buffer->add(display_string);
#ifdef HAS_MINI_SCREEN
display_string = "";
display_string.concat("RSSI: ");
display_string.concat((String)access_points->get(targ_index).rssi);
temp_len = display_string.length();
for (int i = 0; i < 50 - temp_len; i++)
{
display_string.concat(" ");
}
display_obj.display_buffer->add(display_string);
#endif
#endif
}
else
@@ -6062,7 +6870,7 @@ void WiFiScan::changeChannel()
void WiFiScan::channelHop()
{
this->set_channel = this->set_channel + 1;
if (this->set_channel > 13) {
if (this->set_channel > 14) {
this->set_channel = 1;
}
esp_wifi_set_channel(this->set_channel, WIFI_SECOND_CHAN_NONE);
@@ -6299,6 +7107,8 @@ void WiFiScan::main(uint32_t currentTime)
(currentScanMode == WIFI_SCAN_TARGET_AP) ||
(currentScanMode == WIFI_SCAN_AP_STA) ||
(currentScanMode == WIFI_SCAN_PWN) ||
(currentScanMode == WIFI_SCAN_PINESCAN) ||
(currentScanMode == WIFI_SCAN_MULTISSID) ||
(currentScanMode == WIFI_SCAN_DEAUTH) ||
(currentScanMode == WIFI_SCAN_STATION_WAR_DRIVE) ||
(currentScanMode == WIFI_SCAN_ALL))

View File

@@ -102,11 +102,20 @@
#define BT_SCAN_ANALYZER 47
#define WIFI_SCAN_PACKET_RATE 48
#define WIFI_SCAN_AP_STA 49
#define WIFI_SCAN_PINESCAN 50
#define WIFI_SCAN_MULTISSID 51
#define BASE_MULTIPLIER 4
#define ANALYZER_NAME_REFRESH 100 // Number of events to refresh the name
// PineScan and Multi SSID
#define MULTISSID_THRESHOLD 3 // Threshold For Multi SSID
#define MAX_MULTISSID_ENTRIES 100 // Max number of confirmed MultiSSIDs to store
#define MAX_AP_ENTRIES 100 // Max number of APs to track for analysis
#define MAX_DISPLAY_ENTRIES 1 // Max Unique MACs to display
#define MAX_PINESCAN_ENTRIES 100 // PineScan Max Entries
#define MAX_CHANNEL 14
#define WIFI_SECURITY_OPEN 0
@@ -284,6 +293,74 @@ class WiFiScan
WifiMgmtHdr hdr;
} wifi_ieee80211_packet_t;
// Tracking structures for PineScan (similar to MultiSSID)
struct PineScanTracker {
uint8_t mac[6];
bool suspicious_oui;
bool tag_and_susp_cap;
uint8_t channel;
int8_t rssi;
bool reported;
};
// For confirmed Pineapple devices
struct ConfirmedPineScan {
uint8_t mac[6];
String detection_type;
String essid;
uint8_t channel;
int8_t rssi;
bool displayed;
};
LinkedList<PineScanTracker>* pinescan_trackers;
LinkedList<ConfirmedPineScan>* confirmed_pinescan;
bool pinescan_list_full_reported;
// Security Conditions For Pineapple detection
enum SecurityCondition {
NONE = 0x00,
SUSPICIOUS_WHEN_OPEN = 0x01,
SUSPICIOUS_WHEN_PROTECTED = 0x02,
SUSPICIOUS_ALWAYS = 0x04
};
// SuspiciousVendor struct
struct SuspiciousVendor {
const char* vendor_name;
uint8_t security_flags;
uint32_t ouis[20]; // Array of OUIs (max 20 per vendor)
uint8_t oui_count; // Number of OUIs for this vendor
};
// Declare the table for Pineapple
static const SuspiciousVendor suspicious_vendors[];
static const int NUM_SUSPICIOUS_VENDORS;
// Track for AP list limit (Uninitialised, Done in RunSetup)
bool ap_list_full_reported;
// MULTI SSID STRUCTS
struct MultiSSIDTracker {
uint8_t mac[6];
uint16_t ssid_hashes[MULTISSID_THRESHOLD];
uint8_t unique_ssid_count;
bool reported;
};
// New struct for confirmed MultiSSID devices
struct ConfirmedMultiSSID {
uint8_t mac[6];
String essid;
uint8_t channel;
int8_t rssi;
uint8_t ssid_count;
bool displayed;
};
LinkedList<MultiSSIDTracker>* multissid_trackers;
LinkedList<ConfirmedMultiSSID>* confirmed_multissid;
bool multissid_list_full_reported;
// barebones packet
uint8_t packet[128] = { 0x80, 0x00, 0x00, 0x00, //Frame Control, Duration
/*4*/ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //Destination address
@@ -389,6 +466,8 @@ class WiFiScan
void RunGPSNmea();
void RunMimicFlood(uint8_t scan_mode, uint16_t color);
void RunPwnScan(uint8_t scan_mode, uint16_t color);
void RunPineScan(uint8_t scan_mode, uint16_t color);
void RunMultiSSIDScan(uint8_t scan_mode, uint16_t color);
void RunBeaconScan(uint8_t scan_mode, uint16_t color);
void RunRawScan(uint8_t scan_mode, uint16_t color);
void RunStationScan(uint8_t scan_mode, uint16_t color);
@@ -500,6 +579,8 @@ class WiFiScan
int clearAirtags();
int clearFlippers();
int clearStations();
int clearPineScanTrackers();
int clearMultiSSID();
bool addSSID(String essid);
int generateSSIDs(int count = 20);
bool shutdownWiFi();
@@ -552,6 +633,9 @@ class WiFiScan
static void activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
static void eapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
static void wifiSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
static void pineScanSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type); // Pineapple
static int extractPineScanChannel(const uint8_t* payload, int len); // Pineapple
static void multiSSIDSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type); // MultiSSID
/*#ifdef HAS_BT
enum EBLEPayloadType

View File

@@ -23,10 +23,11 @@
//#define XIAO_ESP32_S3
//#define MARAUDER_REV_FEATHER
//#define MARAUDER_CYD_MICRO // 2432S028
//#define MARAUDER_CYD_2USB // Another 2432S028 but it has tWo UsBs OoOoOoO
//#define MARAUDER_CYD_GUITION // ESP32-2432S024 GUITION
//// END BOARD TARGETS
#define MARAUDER_VERSION "v1.5.0"
#define MARAUDER_VERSION "v1.6.1"
#define GRAPH_REFRESH 100
@@ -51,6 +52,8 @@
#define HARDWARE_NAME "Marauder v6.1"
#elif defined(MARAUDER_CYD_MICRO)
#define HARDWARE_NAME "CYD 2432S028"
#elif defined(MARAUDER_CYD_2USB)
#define HARDWARE_NAME "CYD 2432S028 2USB"
#elif defined(MARAUDER_CYD_GUITION)
#define HARDWARE_NAME "CYD 2432S024 GUITION"
#elif defined(MARAUDER_KIT)
@@ -197,6 +200,25 @@
#define HAS_CYD_TOUCH
#endif
#ifdef MARAUDER_CYD_2USB
#define HAS_FLIPPER_LED
//#define FLIPPER_ZERO_HAT
//#define HAS_BATTERY
#define HAS_BT
#define HAS_BT_REMOTE
#define HAS_BUTTONS
//#define HAS_NEOPIXEL_LED
//#define HAS_PWR_MGMT
#define HAS_SCREEN
#define HAS_FULL_SCREEN
#define HAS_SD
#define USE_SD
#define HAS_TEMP_SENSOR
#define HAS_GPS
#define HAS_CYD_TOUCH
#define HAS_CYD_PORTRAIT
#endif
#ifdef MARAUDER_CYD_GUITION
#define HAS_FLIPPER_LED
//#define FLIPPER_ZERO_HAT
@@ -483,6 +505,26 @@
#define D_PULL true
#endif
#ifdef MARAUDER_CYD_2USB
#define L_BTN -1
#define C_BTN 0
#define U_BTN -1
#define R_BTN -1
#define D_BTN -1
//#define HAS_L
//#define HAS_R
//#define HAS_U
//#define HAS_D
#define HAS_C
#define L_PULL true
#define C_PULL true
#define U_PULL true
#define R_PULL true
#define D_PULL true
#endif
#ifdef MARAUDER_CYD_GUITION
#define L_BTN -1
#define C_BTN 0
@@ -539,6 +581,8 @@
#define EXT_BUTTON_WIDTH 0
#define SCREEN_ORIENTATION 1
#define CHAR_WIDTH 6
#define SCREEN_WIDTH TFT_HEIGHT // Originally 240
#define SCREEN_HEIGHT TFT_WIDTH // Originally 320
@@ -611,6 +655,8 @@
#define EXT_BUTTON_WIDTH 0
#define SCREEN_ORIENTATION 0
#define CHAR_WIDTH 6
#define SCREEN_WIDTH TFT_HEIGHT // Originally 240
#define SCREEN_HEIGHT TFT_WIDTH // Originally 320
@@ -673,6 +719,8 @@
#define EXT_BUTTON_WIDTH 20
#define SCREEN_ORIENTATION 0
#define CHAR_WIDTH 12
#define SCREEN_WIDTH TFT_WIDTH
#define SCREEN_HEIGHT TFT_HEIGHT
@@ -741,6 +789,8 @@
#define SCREEN_BUFFER
#define MAX_SCREEN_BUFFER 22
#define SCREEN_ORIENTATION 0
#define CHAR_WIDTH 12
#define SCREEN_WIDTH TFT_WIDTH
@@ -806,6 +856,76 @@
#define SCREEN_BUFFER
#define MAX_SCREEN_BUFFER 22
#define SCREEN_ORIENTATION 0
#define CHAR_WIDTH 12
#define SCREEN_WIDTH TFT_WIDTH
#define SCREEN_HEIGHT TFT_HEIGHT
#define HEIGHT_1 TFT_WIDTH
#define WIDTH_1 TFT_HEIGHT
#define STANDARD_FONT_CHAR_LIMIT (TFT_WIDTH/6) // number of characters on a single line with normal font
#define TEXT_HEIGHT 16 // Height of text to be printed and scrolled
#define BOT_FIXED_AREA 0 // Number of lines in bottom fixed area (lines counted from bottom of screen)
#define TOP_FIXED_AREA 48 // Number of lines in top fixed area (lines counted from top of screen)
#define YMAX 320 // Bottom of screen area
#define minimum(a,b) (((a) < (b)) ? (a) : (b))
//#define MENU_FONT NULL
#define MENU_FONT &FreeMono9pt7b // Winner
//#define MENU_FONT &FreeMonoBold9pt7b
//#define MENU_FONT &FreeSans9pt7b
//#define MENU_FONT &FreeSansBold9pt7b
#define BUTTON_SCREEN_LIMIT 12
#define BUTTON_ARRAY_LEN BUTTON_SCREEN_LIMIT
#define STATUS_BAR_WIDTH 16
#define LVGL_TICK_PERIOD 6
#define FRAME_X 100
#define FRAME_Y 64
#define FRAME_W 120
#define FRAME_H 50
// Red zone size
#define REDBUTTON_X FRAME_X
#define REDBUTTON_Y FRAME_Y
#define REDBUTTON_W (FRAME_W/2)
#define REDBUTTON_H FRAME_H
// Green zone size
#define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W)
#define GREENBUTTON_Y FRAME_Y
#define GREENBUTTON_W (FRAME_W/2)
#define GREENBUTTON_H FRAME_H
#define STATUSBAR_COLOR 0x4A49
#define KIT_LED_BUILTIN 13
#endif
#if defined(MARAUDER_CYD_2USB)
#define SCREEN_CHAR_WIDTH 40
#define HAS_ILI9341
#define HAS_ST7789
#define BANNER_TEXT_SIZE 2
#ifndef TFT_WIDTH
#define TFT_WIDTH 240
#endif
#ifndef TFT_HEIGHT
#define TFT_HEIGHT 320
#endif
#define GRAPH_VERT_LIM TFT_HEIGHT/2
#define EXT_BUTTON_WIDTH 20
#define SCREEN_BUFFER
#define MAX_SCREEN_BUFFER 22
#define SCREEN_ORIENTATION 0
#define CHAR_WIDTH 12
#define SCREEN_WIDTH TFT_WIDTH
@@ -873,6 +993,8 @@
#define SCREEN_BUFFER
#define MAX_SCREEN_BUFFER 22
#define SCREEN_ORIENTATION 0
#define CHAR_WIDTH 12
#define SCREEN_WIDTH TFT_WIDTH
@@ -940,6 +1062,8 @@
#define MAX_SCREEN_BUFFER 22
#define EXT_BUTTON_WIDTH 0
#define SCREEN_ORIENTATION 0
#define CHAR_WIDTH 12
#define SCREEN_WIDTH TFT_WIDTH
@@ -1007,6 +1131,8 @@
#define MAX_SCREEN_BUFFER 22
#define EXT_BUTTON_WIDTH 0
#define SCREEN_ORIENTATION 0
#define CHAR_WIDTH 12
#define SCREEN_WIDTH TFT_WIDTH
@@ -1071,6 +1197,8 @@
#define KIT
#define EXT_BUTTON_WIDTH 20
#define SCREEN_ORIENTATION 0
#define CHAR_WIDTH 12
#define SCREEN_WIDTH TFT_WIDTH
@@ -1145,6 +1273,8 @@
#define EXT_BUTTON_WIDTH 0
#define SCREEN_ORIENTATION 0
#define CHAR_WIDTH 6
#define SCREEN_WIDTH TFT_WIDTH // Originally 240
#define SCREEN_HEIGHT TFT_HEIGHT // Originally 320
@@ -1216,6 +1346,8 @@
#define EXT_BUTTON_WIDTH 0
#define SCREEN_ORIENTATION 1
#define CHAR_WIDTH 6
#define SCREEN_WIDTH TFT_WIDTH // Originally 240
#define SCREEN_HEIGHT TFT_HEIGHT // Originally 320
@@ -1318,6 +1450,25 @@
//#define BUTTON_ARRAY_LEN 5
#endif
#if defined(MARAUDER_CYD_2USB)
#define BANNER_TIME 100
#define COMMAND_PREFIX "!"
// Keypad start position, key sizes and spacing
#define KEY_X 120 // Centre of key
#define KEY_Y 50
#define KEY_W 240 // Width and height
#define KEY_H 22
#define KEY_SPACING_X 0 // X and Y gap
#define KEY_SPACING_Y 1
#define KEY_TEXTSIZE 1 // Font size multiplier
#define ICON_W 22
#define ICON_H 22
#define BUTTON_PADDING 22
//#define BUTTON_ARRAY_LEN 5
#endif
#if defined(MARAUDER_CYD_GUITION)
#define BANNER_TIME 100
@@ -1468,6 +1619,10 @@
#define SD_CS 5
#endif
#ifdef MARAUDER_CYD_2USB
#define SD_CS 5
#endif
#ifdef MARAUDER_CYD_GUITION
#define SD_CS 5
#endif
@@ -1584,6 +1739,8 @@
#define MEM_LOWER_LIM 10000
#elif defined(MARAUDER_CYD_MICRO)
#define MEM_LOWER_LIM 10000
#elif defined(MARAUDER_CYD_2USB)
#define MEM_LOWER_LIM 10000
#elif defined(MARAUDER_CYD_GUITION)
#define MEM_LOWER_LIM 10000
#elif defined(MARAUDER_KIT)
@@ -1612,6 +1769,8 @@
#define PIN 33
#elif defined(MARAUDER_CYD_MICRO)
#define PIN 4
#elif defined(MARAUDER_CYD_2USB)
#define PIN 4
#else
#define PIN 25
#endif
@@ -1645,6 +1804,10 @@
#define GPS_SERIAL_INDEX 2
#define GPS_TX 27 // Fits the extended I/O
#define GPS_RX 22
#elif defined(MARAUDER_CYD_2USB)
#define GPS_SERIAL_INDEX 2
#define GPS_TX 27 // Fits the extended I/O
#define GPS_RX 22
#elif defined(MARAUDER_CYD_GUITION)
#define GPS_SERIAL_INDEX 2
#define GPS_TX 21 // Fits the extended I/O
@@ -1743,6 +1906,8 @@
#define MARAUDER_TITLE_BYTES 13578
#elif defined(MARAUDER_CYD_MICRO)
#define MARAUDER_TITLE_BYTES 13578
#elif defined(MARAUDER_CYD_2USB)
#define MARAUDER_TITLE_BYTES 13578
#elif defined(MARAUDER_CYD_GUITION)
#define MARAUDER_TITLE_BYTES 13578
#elif defined(MARAUDER_KIT)
@@ -1788,6 +1953,18 @@
#define SD_MOSI 23
#define SD_SCK 18
#endif
#ifdef MARAUDER_CYD_2USB
#define XPT2046_IRQ 36
#define XPT2046_MOSI 32
#define XPT2046_MISO 39
#define XPT2046_CLK 25
#define XPT2046_CS 33
#define SD_MISO 19
#define SD_MOSI 23
#define SD_SCK 18
#endif
#endif
//// END STUPID CYD STUFF
@@ -1806,6 +1983,12 @@
#define R_PIN 4
#endif
#ifdef MARAUDER_CYD_2USB
#define B_PIN 17
#define G_PIN 16
#define R_PIN 4
#endif
#ifdef MARAUDER_CYD_GUITION
#define B_PIN 17
#define G_PIN 16

View File

@@ -350,7 +350,7 @@ void loop()
#endif
#endif
#ifdef HAS_ILI9341
#if (defined(HAS_ILI9341) && !defined(MARAUDER_CYD_2USB))
#ifdef HAS_BUTTONS
if (c_btn.isHeld()) {
if (menu_function_obj.disable_touch)

View File

@@ -103,7 +103,8 @@ PROGMEM const char text1_59[] = "Station Sniff";
PROGMEM const char text1_60[] = "Clear Stations";
PROGMEM const char text1_61[] = "Select Stations";
PROGMEM const char text1_62[] = "Deauth Targeted";
PROGMEM const char text1_63[] = "Detect Pineapple";
PROGMEM const char text1_64[] = "Detect MultiSSID";
//SDInterface.cpp texts
PROGMEM const char text2_0[] = "Error, could not find update.bin";
@@ -179,12 +180,14 @@ PROGMEM const char text4_44[] = " AP Scan ";
PROGMEM const char text4_45[] = "Clearing Stations...";
PROGMEM const char text4_46[] = "Stations Cleared: ";
PROGMEM const char text4_47[] = "Targeted Deauth";
PROGMEM const char text4_48[] = " Detect Pineapple ";
PROGMEM const char text4_49[] = " Detect MultiSSID ";
//Making tables
PROGMEM const char *text_table0[] = {text0_0,text0_1, text0_2, text0_3, text0_4, text0_5, text0_6, text0_7, text0_8};
PROGMEM const char *text_table1[] = {text1_0,text1_1,text1_2,text1_3,text1_4,text1_5,text1_6,text1_7,text1_8,text1_9,text1_10,text1_11,text1_12,text1_13,text1_14,text1_15,text1_16,text1_17,text1_18,text1_19,text1_20,text1_21,text1_22,text1_23,text1_24,text1_25,text1_26,text1_27,text1_28,text1_29,text1_30,text1_31,text1_32,text1_33,text1_34,text1_35,text1_36,text1_37,text1_38,text1_39,text1_40,text1_41,text1_42,text1_43,text1_44,text1_45,text1_46,text1_47,text1_48,text1_49,text1_50,text1_51,text1_52,text1_53,text1_54,text1_55,text1_56,text1_57,text1_58,text1_59,text1_60,text1_61,text1_62};
PROGMEM const char *text_table1[] = {text1_0,text1_1,text1_2,text1_3,text1_4,text1_5,text1_6,text1_7,text1_8,text1_9,text1_10,text1_11,text1_12,text1_13,text1_14,text1_15,text1_16,text1_17,text1_18,text1_19,text1_20,text1_21,text1_22,text1_23,text1_24,text1_25,text1_26,text1_27,text1_28,text1_29,text1_30,text1_31,text1_32,text1_33,text1_34,text1_35,text1_36,text1_37,text1_38,text1_39,text1_40,text1_41,text1_42,text1_43,text1_44,text1_45,text1_46,text1_47,text1_48,text1_49,text1_50,text1_51,text1_52,text1_53,text1_54,text1_55,text1_56,text1_57,text1_58,text1_59,text1_60,text1_61,text1_62,text1_63,text1_64};
PROGMEM const char *text_table2[] = {text2_0,text2_1,text2_2,text2_3,text2_4,text2_5,text2_6,text2_7,text2_8,text2_9,text2_10,text2_11,text2_12,text2_13,text2_14};
PROGMEM const char *text_table3[] = {text3_0,text3_1,text3_2,text3_3,text3_4,text3_5};
PROGMEM const char *text_table4[] = {text4_0,text4_1,text4_2,text4_3,text4_4,text4_5,text4_6,text4_7,text1_54,text4_9,text4_10,text4_11,text4_12,text4_13,text4_14,text4_15,text4_16,text4_17,text4_18,text4_19,text4_20,text4_21,text4_22,text4_23,text4_24,text4_25,text4_26,text4_27,text4_28,text4_29,text4_30,text4_31,text4_32,text4_33,text4_34,text4_35,text4_36,text4_37,text4_38,text4_39,text4_40,text4_41,text4_42,text4_43,text4_44,text4_45,text4_46,text4_47};
PROGMEM const char *text_table4[] = {text4_0,text4_1,text4_2,text4_3,text4_4,text4_5,text4_6,text4_7,text1_54,text4_9,text4_10,text4_11,text4_12,text4_13,text4_14,text4_15,text4_16,text4_17,text4_18,text4_19,text4_20,text4_21,text4_22,text4_23,text4_24,text4_25,text4_26,text4_27,text4_28,text4_29,text4_30,text4_31,text4_32,text4_33,text4_34,text4_35,text4_36,text4_37,text4_38,text4_39,text4_40,text4_41,text4_42,text4_43,text4_44,text4_45,text4_46,text4_47,text4_48,text4_49};
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 KiB

View File

@@ -0,0 +1,9 @@
#define be52a82b6ef24281d57d9491aef1484cv5n1Pq988C5WdKha_width 22
#define be52a82b6ef24281d57d9491aef1484cv5n1Pq988C5WdKha_height 22
static char be52a82b6ef24281d57d9491aef1484cv5n1Pq988C5WdKha_bits[] = {
0xFF, 0xFF, 0x3F, 0xFF, 0xF7, 0x3F, 0x7F, 0x96, 0x3F, 0xFF, 0xED, 0x3F,
0x3F, 0x25, 0x3F, 0xDF, 0xD2, 0x3E, 0xFF, 0xED, 0x3F, 0x7F, 0x8E, 0x3F,
0x3B, 0x77, 0x37, 0xBD, 0x6A, 0x2F, 0xD6, 0xBD, 0x1A, 0xDA, 0xDA, 0x16,
0x5A, 0x6F, 0x16, 0x9A, 0xF7, 0x16, 0xD6, 0x5A, 0x1A, 0xDD, 0xBD, 0x2E,
0xBB, 0x5A, 0x37, 0x3F, 0x6F, 0x3F, 0x7F, 0xB7, 0x3F, 0xFF, 0xCC, 0x3F,
0xFF, 0xF3, 0x3F, 0xFF, 0xFF, 0x3F, };