Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement for devices without LED, BT, or SD card #629

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions esp32_marauder/CommandLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
#include "SDInterface.h"
#endif
#include "settings.h"
#include "LedInterface.h"
#ifdef HAS_NEOPIXEL_LED
#include "LedInterface.h"
#endif

#ifdef HAS_SCREEN
extern MenuFunctions menu_function_obj;
Expand All @@ -29,7 +31,10 @@ extern WiFiScan wifi_scan_obj;
extern SDInterface sd_obj;
#endif
extern Settings settings_obj;
extern LedInterface led_obj;
#ifdef HAS_NEOPIXEL_LED
extern LedInterface led_obj;
#endif

extern LinkedList<AccessPoint>* access_points;
extern LinkedList<AirTag>* airtags;
extern LinkedList<ssid>* ssids;
Expand Down
5 changes: 5 additions & 0 deletions esp32_marauder/EvilPortal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ void EvilPortal::setupServer() {
inputParam = "email";
this->user_name = inputMessage;
this->name_received = true;
} else if (request->hasParam("username")) {
inputMessage = request->getParam("username")->value();
inputParam = "username";
this->user_name = inputMessage;
this->name_received = true;
}

if (request->hasParam("password")) {
Expand Down
8 changes: 6 additions & 2 deletions esp32_marauder/EvilPortal.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
#include "Display.h"
#include <LinkedList.h>
#endif
#include "SDInterface.h"
#if defined(HAS_SD) || defined(USE_SD)
#include "SDInterface.h"
#endif
#include "Buffer.h"
#include "lang_var.h"

extern Settings settings_obj;
extern SDInterface sd_obj;
#if defined(HAS_SD) || defined(USE_SD)
extern SDInterface sd_obj;
#endif
#ifdef HAS_SCREEN
extern Display display_obj;
#endif
Expand Down
2 changes: 1 addition & 1 deletion esp32_marauder/GpsInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ class GpsInterface {
void setGPSInfo();
};

#endif
#endif
275 changes: 138 additions & 137 deletions esp32_marauder/MenuFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1934,155 +1934,156 @@ void MenuFunctions::RunSetup()
});

// Build Bluetooth Menu
bluetoothMenu.parentMenu = &mainMenu; // Second Menu is third menu parent
this->addNodes(&bluetoothMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(bluetoothMenu.parentMenu);
});
this->addNodes(&bluetoothMenu, text_table1[31], TFT_YELLOW, NULL, SNIFFERS, [this]() {
this->changeMenu(&bluetoothSnifferMenu);
});
this->addNodes(&bluetoothMenu, "Bluetooth Attacks", TFT_RED, NULL, ATTACKS, [this]() {
this->changeMenu(&bluetoothAttackMenu);
});

// Build bluetooth sniffer Menu
bluetoothSnifferMenu.parentMenu = &bluetoothMenu; // Second Menu is third menu parent
this->addNodes(&bluetoothSnifferMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(bluetoothSnifferMenu.parentMenu);
});
this->addNodes(&bluetoothSnifferMenu, text_table1[34], TFT_GREEN, NULL, BLUETOOTH_SNIFF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SCAN_ALL, TFT_GREEN);
});
this->addNodes(&bluetoothSnifferMenu, "Flipper Sniff", TFT_ORANGE, NULL, FLIPPER, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SCAN_FLIPPER, TFT_ORANGE);
});
this->addNodes(&bluetoothSnifferMenu, "Airtag Sniff", TFT_WHITE, NULL, BLUETOOTH_SNIFF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SCAN_AIRTAG, TFT_WHITE);
});
#ifdef HAS_GPS
if (gps_obj.getGpsModuleStatus()) {
this->addNodes(&bluetoothSnifferMenu, "BT Wardrive", TFT_CYAN, NULL, BLUETOOTH_SNIFF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SCAN_WAR_DRIVE, TFT_GREEN);
});
this->addNodes(&bluetoothSnifferMenu, "BT Wardrive Continuous", TFT_RED, NULL, REBOOT, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SCAN_WAR_DRIVE_CONT, TFT_GREEN);
});
}
#endif
this->addNodes(&bluetoothSnifferMenu, text_table1[35], TFT_MAGENTA, NULL, CC_SKIMMERS, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SCAN_SKIMMERS, TFT_MAGENTA);
});
#ifdef HAS_BT
bluetoothMenu.parentMenu = &mainMenu; // Second Menu is third menu parent
this->addNodes(&bluetoothMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(bluetoothMenu.parentMenu);
});
this->addNodes(&bluetoothMenu, text_table1[31], TFT_YELLOW, NULL, SNIFFERS, [this]() {
this->changeMenu(&bluetoothSnifferMenu);
});
this->addNodes(&bluetoothMenu, "Bluetooth Attacks", TFT_RED, NULL, ATTACKS, [this]() {
this->changeMenu(&bluetoothAttackMenu);
});

// Bluetooth Attack menu
bluetoothAttackMenu.parentMenu = &bluetoothMenu; // Second Menu is third menu parent
this->addNodes(&bluetoothAttackMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(bluetoothAttackMenu.parentMenu);
});
this->addNodes(&bluetoothAttackMenu, "Sour Apple", TFT_GREEN, NULL, DEAUTH_SNIFF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_ATTACK_SOUR_APPLE, TFT_GREEN);
});
this->addNodes(&bluetoothAttackMenu, "Swiftpair Spam", TFT_CYAN, NULL, KEYBOARD_ICO, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_ATTACK_SWIFTPAIR_SPAM, TFT_CYAN);
});
this->addNodes(&bluetoothAttackMenu, "Samsung BLE Spam", TFT_RED, NULL, GENERAL_APPS, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_ATTACK_SAMSUNG_SPAM, TFT_RED);
});
this->addNodes(&bluetoothAttackMenu, "Google BLE Spam", TFT_PURPLE, NULL, LANGUAGE, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_ATTACK_GOOGLE_SPAM, TFT_PURPLE);
});
this->addNodes(&bluetoothAttackMenu, "Flipper BLE Spam", TFT_ORANGE, NULL, FLIPPER, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_ATTACK_FLIPPER_SPAM, TFT_ORANGE);
});
this->addNodes(&bluetoothAttackMenu, "BLE Spam All", TFT_MAGENTA, NULL, DEAUTH_SNIFF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_ATTACK_SPAM_ALL, TFT_MAGENTA);
});
// Build bluetooth sniffer Menu
bluetoothSnifferMenu.parentMenu = &bluetoothMenu; // Second Menu is third menu parent
this->addNodes(&bluetoothSnifferMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(bluetoothSnifferMenu.parentMenu);
});
this->addNodes(&bluetoothSnifferMenu, text_table1[34], TFT_GREEN, NULL, BLUETOOTH_SNIFF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SCAN_ALL, TFT_GREEN);
});
this->addNodes(&bluetoothSnifferMenu, "Flipper Sniff", TFT_ORANGE, NULL, FLIPPER, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SCAN_FLIPPER, TFT_ORANGE);
});
this->addNodes(&bluetoothSnifferMenu, "Airtag Sniff", TFT_WHITE, NULL, BLUETOOTH_SNIFF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SCAN_AIRTAG, TFT_WHITE);
});
#ifdef HAS_GPS
if (gps_obj.getGpsModuleStatus()) {
this->addNodes(&bluetoothSnifferMenu, "BT Wardrive", TFT_CYAN, NULL, BLUETOOTH_SNIFF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SCAN_WAR_DRIVE, TFT_GREEN);
});
this->addNodes(&bluetoothSnifferMenu, "BT Wardrive Continuous", TFT_RED, NULL, REBOOT, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SCAN_WAR_DRIVE_CONT, TFT_GREEN);
});
}
#endif
this->addNodes(&bluetoothSnifferMenu, text_table1[35], TFT_MAGENTA, NULL, CC_SKIMMERS, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SCAN_SKIMMERS, TFT_MAGENTA);
});

#ifdef HAS_ILI9341
this->addNodes(&bluetoothAttackMenu, "Spoof Airtag", TFT_WHITE, NULL, ATTACKS, [this](){
// Bluetooth Attack menu
bluetoothAttackMenu.parentMenu = &bluetoothMenu; // Second Menu is third menu parent
this->addNodes(&bluetoothAttackMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(bluetoothAttackMenu.parentMenu);
});
this->addNodes(&bluetoothAttackMenu, "Sour Apple", TFT_GREEN, NULL, DEAUTH_SNIFF, [this]() {
display_obj.clearScreen();
wifi_scan_obj.currentScanMode = LV_ADD_SSID;
wifi_scan_obj.StartScan(LV_ADD_SSID, TFT_WHITE);
addAPGFX("Airtag");
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_ATTACK_SOUR_APPLE, TFT_GREEN);
});
#endif
this->addNodes(&bluetoothAttackMenu, "Swiftpair Spam", TFT_CYAN, NULL, KEYBOARD_ICO, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_ATTACK_SWIFTPAIR_SPAM, TFT_CYAN);
});
this->addNodes(&bluetoothAttackMenu, "Samsung BLE Spam", TFT_RED, NULL, GENERAL_APPS, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_ATTACK_SAMSUNG_SPAM, TFT_RED);
});
this->addNodes(&bluetoothAttackMenu, "Google BLE Spam", TFT_PURPLE, NULL, LANGUAGE, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_ATTACK_GOOGLE_SPAM, TFT_PURPLE);
});
this->addNodes(&bluetoothAttackMenu, "Flipper BLE Spam", TFT_ORANGE, NULL, FLIPPER, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_ATTACK_FLIPPER_SPAM, TFT_ORANGE);
});
this->addNodes(&bluetoothAttackMenu, "BLE Spam All", TFT_MAGENTA, NULL, DEAUTH_SNIFF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_ATTACK_SPAM_ALL, TFT_MAGENTA);
});
#endif //for BT

#ifndef HAS_ILI9341
#ifdef HAS_BT
// Select Airtag on Mini
#ifdef HAS_ILI9341
this->addNodes(&bluetoothAttackMenu, "Spoof Airtag", TFT_WHITE, NULL, ATTACKS, [this](){
// Clear nodes and add back button
airtagMenu.list->clear();
this->addNodes(&airtagMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(airtagMenu.parentMenu);
});
display_obj.clearScreen();
wifi_scan_obj.currentScanMode = LV_ADD_SSID;
wifi_scan_obj.StartScan(LV_ADD_SSID, TFT_WHITE);
addAPGFX("Airtag");
});
#endif

// Add buttons for all airtags
// Find out how big our menu is going to be
int menu_limit;
if (airtags->size() <= BUTTON_ARRAY_LEN)
menu_limit = airtags->size();
else
menu_limit = BUTTON_ARRAY_LEN;

// Create the menu nodes for all of the list items
for (int i = 0; i < menu_limit; i++) {
this->addNodes(&airtagMenu, airtags->get(i).mac, TFT_WHITE, NULL, BLUETOOTH, [this, i](){
AirTag new_at = airtags->get(i);
new_at.selected = true;

airtags->set(i, new_at);

// Set all other airtags to "Not Selected"
for (int x = 0; x < airtags->size(); x++) {
if (x != i) {
AirTag new_atx = airtags->get(x);
new_atx.selected = false;
airtags->set(x, new_atx);
}
}
#ifndef HAS_ILI9341
#ifdef HAS_BT
// Select Airtag on Mini
this->addNodes(&bluetoothAttackMenu, "Spoof Airtag", TFT_WHITE, NULL, ATTACKS, [this](){
// Clear nodes and add back button
airtagMenu.list->clear();
this->addNodes(&airtagMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(airtagMenu.parentMenu);
});

// Start the spoof
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SPOOF_AIRTAG, TFT_WHITE);
// Add buttons for all airtags
// Find out how big our menu is going to be
int menu_limit;
if (airtags->size() <= BUTTON_ARRAY_LEN)
menu_limit = airtags->size();
else
menu_limit = BUTTON_ARRAY_LEN;

// Create the menu nodes for all of the list items
for (int i = 0; i < menu_limit; i++) {
this->addNodes(&airtagMenu, airtags->get(i).mac, TFT_WHITE, NULL, BLUETOOTH, [this, i](){
AirTag new_at = airtags->get(i);
new_at.selected = true;

airtags->set(i, new_at);

// Set all other airtags to "Not Selected"
for (int x = 0; x < airtags->size(); x++) {
if (x != i) {
AirTag new_atx = airtags->get(x);
new_atx.selected = false;
airtags->set(x, new_atx);
}
}

});
}
this->changeMenu(&airtagMenu);
});
// Start the spoof
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SPOOF_AIRTAG, TFT_WHITE);

airtagMenu.parentMenu = &bluetoothAttackMenu;
this->addNodes(&airtagMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(airtagMenu.parentMenu);
});
#endif
});
}
this->changeMenu(&airtagMenu);
});

#endif
airtagMenu.parentMenu = &bluetoothAttackMenu;
this->addNodes(&airtagMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(airtagMenu.parentMenu);
});
#endif

#endif
// Device menu
deviceMenu.parentMenu = &mainMenu;
this->addNodes(&deviceMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
Expand Down
Loading
Loading