diff --git a/esp32_marauder/MenuFunctions.cpp b/esp32_marauder/MenuFunctions.cpp index 5a7fd68..7a96b40 100644 --- a/esp32_marauder/MenuFunctions.cpp +++ b/esp32_marauder/MenuFunctions.cpp @@ -1279,6 +1279,7 @@ void MenuFunctions::RunSetup() generateSSIDsMenu.list = new LinkedList(); clearSSIDsMenu.list = new LinkedList(); clearAPsMenu.list = new LinkedList(); + saveSSIDsMenu.list = new LinkedList(); // Work menu names mainMenu.name = text_table1[6]; @@ -1295,6 +1296,7 @@ void MenuFunctions::RunSetup() wifiSnifferMenu.name = text_table1[20]; wifiAttackMenu.name = text_table1[21]; wifiGeneralMenu.name = text_table1[22]; + saveSSIDsMenu.name = "Save SSIDs"; bluetoothSnifferMenu.name = text_table1[23]; bluetoothAttackMenu.name = "Bluetooth Attacks"; generateSSIDsMenu.name = text_table1[27]; @@ -1486,6 +1488,10 @@ void MenuFunctions::RunSetup() this->changeMenu(&generateSSIDsMenu); wifi_scan_obj.RunGenerateSSIDs(); }); + this->addNodes(&wifiGeneralMenu, "Save SSIDs", TFT_CYAN, NULL, SD_UPDATE, [this]() { + this->changeMenu(&saveSSIDsMenu); + wifi_scan_obj.RunSaveSSIDList(true); + }); #ifdef HAS_ILI9341 this->addNodes(&wifiGeneralMenu, text_table1[1], TFT_NAVY, NULL, KEYBOARD_ICO, [this](){ display_obj.clearScreen(); @@ -1585,6 +1591,11 @@ void MenuFunctions::RunSetup() this->changeMenu(htmlMenu.parentMenu); }); + saveSSIDsMenu.parentMenu = &wifiGeneralMenu; + this->addNodes(&saveSSIDsMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() { + this->changeMenu(saveSSIDsMenu.parentMenu); + }); + // Select APs on Mini this->addNodes(&wifiGeneralMenu, text_table1[56], TFT_NAVY, NULL, KEYBOARD_ICO, [this](){ wifiAPMenu.list->clear(); diff --git a/esp32_marauder/MenuFunctions.h b/esp32_marauder/MenuFunctions.h index 4897976..4437dca 100644 --- a/esp32_marauder/MenuFunctions.h +++ b/esp32_marauder/MenuFunctions.h @@ -152,6 +152,7 @@ class MenuFunctions // WiFi General Menu Menu htmlMenu; Menu miniKbMenu; + Menu saveSSIDsMenu; // Bluetooth menu stuff Menu bluetoothSnifferMenu; diff --git a/esp32_marauder/WiFiScan.cpp b/esp32_marauder/WiFiScan.cpp index 01f024d..22e108e 100644 --- a/esp32_marauder/WiFiScan.cpp +++ b/esp32_marauder/WiFiScan.cpp @@ -952,6 +952,32 @@ void WiFiScan::startLog(String file_name) { ); } +void WiFiScan::RunSaveSSIDList(bool save_as) { + if (save_as) { + sd_obj.removeFile("/SSIDs_0.log"); + + this->startLog("SSIDs"); + + for (int i = 0; i < ssids->size(); i++) { + if (i < ssids->size() - 1) + buffer_obj.append(ssids->get(i).essid + "\n"); + else + buffer_obj.append(ssids->get(i).essid); + } + + #ifdef HAS_SCREEN + display_obj.tft.setTextWrap(false); + display_obj.tft.setFreeFont(NULL); + display_obj.tft.setCursor(0, 100); + display_obj.tft.setTextSize(1); + display_obj.tft.setTextColor(TFT_CYAN); + + display_obj.tft.print("Saved SSIDs: "); + display_obj.tft.println((String)ssids->size()); + #endif + } +} + void WiFiScan::RunEvilPortal(uint8_t scan_mode, uint16_t color) { startLog("evil_portal"); diff --git a/esp32_marauder/WiFiScan.h b/esp32_marauder/WiFiScan.h index a43c29b..bc5aa69 100644 --- a/esp32_marauder/WiFiScan.h +++ b/esp32_marauder/WiFiScan.h @@ -385,6 +385,7 @@ class WiFiScan void RunClearSSIDs(); void RunClearAPs(); void RunClearStations(); + void RunSaveSSIDList(bool save_as = true); void channelHop(); uint8_t currentScanMode = 0; void main(uint32_t currentTime); diff --git a/esp32_marauder/configs.h b/esp32_marauder/configs.h index 22c5b9f..f097218 100644 --- a/esp32_marauder/configs.h +++ b/esp32_marauder/configs.h @@ -21,7 +21,7 @@ //#define MARAUDER_REV_FEATHER //// END BOARD TARGETS - #define MARAUDER_VERSION "v0.13.9" + #define MARAUDER_VERSION "v0.13.10" //// HARDWARE NAMES #ifdef MARAUDER_M5STICKC