diff --git a/README.md b/README.md
index 09566266898..f6f422b114d 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
-# ESP32 Marauder v0.9.16
+# ESP32 Marauder v0.9.17
A suite of WiFi/Bluetooth offensive and defensive tools for the ESP32
diff --git a/esp32_marauder/MenuFunctions.cpp b/esp32_marauder/MenuFunctions.cpp
index 4a76bb98cf2..d176f0f07a1 100644
--- a/esp32_marauder/MenuFunctions.cpp
+++ b/esp32_marauder/MenuFunctions.cpp
@@ -1030,7 +1030,8 @@ void MenuFunctions::main(uint32_t currentTime)
if (current_menu->selected > 0) {
current_menu->selected--;
this->buttonSelected(current_menu->selected);
- this->buttonNotSelected(current_menu->selected + 1);
+ if (!current_menu->list->get(current_menu->selected + 1).selected)
+ this->buttonNotSelected(current_menu->selected + 1);
}
}
else if ((wifi_scan_obj.currentScanMode == WIFI_PACKET_MONITOR) ||
@@ -1045,7 +1046,8 @@ void MenuFunctions::main(uint32_t currentTime)
if (current_menu->selected < current_menu->list->size() - 1) {
current_menu->selected++;
this->buttonSelected(current_menu->selected);
- this->buttonNotSelected(current_menu->selected - 1);
+ if (!current_menu->list->get(current_menu->selected - 1).selected)
+ this->buttonNotSelected(current_menu->selected - 1);
}
}
else if ((wifi_scan_obj.currentScanMode == WIFI_PACKET_MONITOR) ||
@@ -1408,6 +1410,8 @@ void MenuFunctions::displaySetting(String key, Menu* menu, int index) {
// Function to build the menus
void MenuFunctions::RunSetup()
{
+ extern LinkedList* access_points;
+
#ifndef MARAUDER_MINI
this->initLVGL();
#endif
@@ -1437,6 +1441,7 @@ void MenuFunctions::RunSetup()
wifiSnifferMenu.list = new LinkedList();
wifiAttackMenu.list = new LinkedList();
wifiGeneralMenu.list = new LinkedList();
+ wifiAPMenu.list = new LinkedList();
// Bluetooth menu stuff
bluetoothSnifferMenu.list = new LinkedList();
@@ -1474,6 +1479,7 @@ void MenuFunctions::RunSetup()
generateSSIDsMenu.name = text_table1[27];
clearSSIDsMenu.name = text_table1[28];
clearAPsMenu.name = text_table1[29];
+ wifiAPMenu.name = "Access Points";
// Build Main Menu
@@ -1654,12 +1660,49 @@ void MenuFunctions::RunSetup()
wifi_scan_obj.RunClearAPs();
});
#ifndef MARAUDER_MINI
+ // Select APs on OG
addNodes(&wifiGeneralMenu, text_table1[56], TFT_NAVY, NULL, KEYBOARD_ICO, [this](){
display_obj.clearScreen();
wifi_scan_obj.currentScanMode = LV_ADD_SSID;
wifi_scan_obj.StartScan(LV_ADD_SSID, TFT_RED);
addAPGFX();
});
+ #else
+ // Select APs on Mini
+ addNodes(&wifiGeneralMenu, text_table1[56], TFT_NAVY, NULL, KEYBOARD_ICO, [this](){
+ wifiAPMenu.list->clear();
+ addNodes(&wifiAPMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
+ changeMenu(wifiAPMenu.parentMenu);
+ });
+ for (int i = 0; i < access_points->size(); i++) {
+ addNodes(&wifiAPMenu, access_points->get(i).essid, TFT_CYAN, NULL, KEYBOARD_ICO, [this, i](){
+ AccessPoint new_ap = access_points->get(i);
+ new_ap.selected = !access_points->get(i).selected;
+
+ // Change selection status of menu node
+ MenuNode new_node = current_menu->list->get(i + 1);
+ new_node.selected = !current_menu->list->get(i + 1).selected;
+ current_menu->list->set(i + 1, new_node);
+
+ // Change selection status of button key
+ if (new_ap.selected) {
+ this->buttonSelected(i + 1);
+ //changeMenu(current_menu);
+ } else {
+ this->buttonNotSelected(i + 1);
+ //changeMenu(current_menu);
+ }
+ access_points->set(i, new_ap);
+ //changeMenu(wifiAPMenu.parentMenu);
+ }, access_points->get(i).selected);
+ }
+ changeMenu(&wifiAPMenu);
+ });
+
+ wifiAPMenu.parentMenu = &wifiGeneralMenu;
+ addNodes(&wifiAPMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
+ changeMenu(wifiAPMenu.parentMenu);
+ });
#endif
// Build shutdown wifi menu
@@ -1933,7 +1976,7 @@ void MenuFunctions::addNodes(Menu * menu, String name, uint16_t color, Menu * ch
//menu->list->add(MenuNode{name, color, place, callable});
}
-void MenuFunctions::buildButtons(Menu * menu)
+void MenuFunctions::buildButtons(Menu * menu, int starting_index)
{
//Serial.println("Bulding buttons...");
if (menu->list != NULL)
@@ -1943,8 +1986,8 @@ void MenuFunctions::buildButtons(Menu * menu)
for (uint8_t i = 0; i < menu->list->size(); i++)
{
TFT_eSPI_Button new_button;
- char buf[menu->list->get(i).name.length() + 1] = {};
- menu->list->get(i).name.toCharArray(buf, menu->list->get(i).name.length() + 1);
+ char buf[menu->list->get(starting_index + i).name.length() + 1] = {};
+ menu->list->get(starting_index + i).name.toCharArray(buf, menu->list->get(starting_index + i).name.length() + 1);
display_obj.key[i].initButton(&display_obj.tft,
KEY_X + 0 * (KEY_W + KEY_SPACING_X),
KEY_Y + i * (KEY_H + KEY_SPACING_Y), // x, y, w, h, outline, fill, text
@@ -1952,7 +1995,7 @@ void MenuFunctions::buildButtons(Menu * menu)
KEY_H,
TFT_BLACK, // Outline
TFT_BLACK, // Fill
- menu->list->get(i).color, // Text
+ menu->list->get(starting_index + i).color, // Text
buf,
KEY_TEXTSIZE);
@@ -1999,10 +2042,10 @@ void MenuFunctions::displayCurrentMenu()
#endif
#ifdef MARAUDER_MINI
- if (current_menu->selected != i)
- display_obj.key[i].drawButton(false, current_menu->list->get(i).name);
- else
+ if ((current_menu->selected == i) || (current_menu->list->get(i).selected))
display_obj.key[i].drawButton(true, current_menu->list->get(i).name);
+ else
+ display_obj.key[i].drawButton(false, current_menu->list->get(i).name);
#endif
}
display_obj.tft.setFreeFont(NULL);
diff --git a/esp32_marauder/MenuFunctions.h b/esp32_marauder/MenuFunctions.h
index 86b1d6e386a..8690f804be3 100644
--- a/esp32_marauder/MenuFunctions.h
+++ b/esp32_marauder/MenuFunctions.h
@@ -157,6 +157,7 @@ class MenuFunctions
Menu wifiSnifferMenu;
Menu wifiAttackMenu;
Menu wifiGeneralMenu;
+ Menu wifiAPMenu;
// Bluetooth menu stuff
Menu bluetoothSnifferMenu;
@@ -207,7 +208,7 @@ class MenuFunctions
void displaySettingsGFX();
void writeBadUSB();
- void buildButtons(Menu* menu);
+ void buildButtons(Menu* menu, int starting_index = 0);
void changeMenu(Menu* menu);
void drawStatusBar();
void displayCurrentMenu();
diff --git a/esp32_marauder/configs.h b/esp32_marauder/configs.h
index 505cc0f7cdb..5a653053b43 100644
--- a/esp32_marauder/configs.h
+++ b/esp32_marauder/configs.h
@@ -4,8 +4,8 @@
#define POLISH_POTATO
- #define MARAUDER_MINI
- //#define MARAUDER_V4
+ //#define MARAUDER_MINI
+ #define MARAUDER_V4
//#define MARAUDER_V6
//#define MARAUDER_KIT
//#define GENERIC_ESP32