Add save SSIDs menu option

This commit is contained in:
Just Call Me Koko
2024-04-24 00:48:30 -04:00
parent 5d33fc7fe6
commit fcffb486d4
5 changed files with 40 additions and 1 deletions
+11
View File
@@ -1279,6 +1279,7 @@ void MenuFunctions::RunSetup()
generateSSIDsMenu.list = new LinkedList<MenuNode>();
clearSSIDsMenu.list = new LinkedList<MenuNode>();
clearAPsMenu.list = new LinkedList<MenuNode>();
saveSSIDsMenu.list = new LinkedList<MenuNode>();
// 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();
+1
View File
@@ -152,6 +152,7 @@ class MenuFunctions
// WiFi General Menu
Menu htmlMenu;
Menu miniKbMenu;
Menu saveSSIDsMenu;
// Bluetooth menu stuff
Menu bluetoothSnifferMenu;
+26
View File
@@ -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");
+1
View File
@@ -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);
+1 -1
View File
@@ -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