Select EP HTML from menu

Fix packet rate not showing on mini
This commit is contained in:
Just Call Me Koko
2023-11-22 18:16:53 -05:00
parent 61861c83ab
commit 1ef70b745a
4 changed files with 50 additions and 23 deletions

View File

@@ -1085,7 +1085,6 @@ void MenuFunctions::displaySetting(String key, Menu* menu, int index) {
}
// Function to build the menus
void MenuFunctions::RunSetup()
{
@@ -1124,6 +1123,9 @@ void MenuFunctions::RunSetup()
wifiGeneralMenu.list = new LinkedList<MenuNode>();
wifiAPMenu.list = new LinkedList<MenuNode>();
// WiFi HTML menu stuff
htmlMenu.list = new LinkedList<MenuNode>();
// Bluetooth menu stuff
bluetoothSnifferMenu.list = new LinkedList<MenuNode>();
bluetoothAttackMenu.list = new LinkedList<MenuNode>();
@@ -1157,6 +1159,7 @@ void MenuFunctions::RunSetup()
#ifdef HAS_GPS
gpsInfoMenu.name = "GPS Data";
#endif
htmlMenu.name = "EP HTML List";
// Build Main Menu
mainMenu.parentMenu = NULL;
@@ -1364,6 +1367,26 @@ void MenuFunctions::RunSetup()
addStationGFX();
});
#else
this->addNodes(&wifiGeneralMenu, "Select EP HTML File", TFT_CYAN, NULL, KEYBOARD_ICO, [this](){
this->changeMenu(&htmlMenu);
});
htmlMenu.parentMenu = &wifiGeneralMenu;
this->addNodes(&htmlMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(htmlMenu.parentMenu);
});
int loopLimit = min(evil_portal_obj.html_files->size(), BUTTON_ARRAY_LEN);
for (int i = 0; i < loopLimit - 1; i++) {
this->addNodes(&htmlMenu, evil_portal_obj.html_files->get(i), TFT_CYAN, NULL, 0, [this, i]() {
evil_portal_obj.target_html_name = (String)evil_portal_obj.html_files->get(i);
Serial.println("Set Evil Portal HTML as " + evil_portal_obj.target_html_name);
evil_portal_obj.using_serial_html = false;
this->changeMenu(htmlMenu.parentMenu);
});
}
// Select APs on Mini
this->addNodes(&wifiGeneralMenu, text_table1[56], TFT_NAVY, NULL, KEYBOARD_ICO, [this](){
wifiAPMenu.list->clear();
@@ -1636,6 +1659,7 @@ void MenuFunctions::addNodes(Menu * menu, String name, uint16_t color, Menu * ch
{
TFT_eSPI_Button new_button;
menu->list->add(MenuNode{name, false, color, place, &new_button, selected, callable});
//menu->list->add(MenuNode{name, false, color, place, selected, callable});
}
void MenuFunctions::buildButtons(Menu * menu, int starting_index)

View File

@@ -143,6 +143,9 @@ class MenuFunctions
Menu wifiGeneralMenu;
Menu wifiAPMenu;
// WiFi General Menu
Menu htmlMenu;
// Bluetooth menu stuff
Menu bluetoothSnifferMenu;
Menu bluetoothAttackMenu;

View File

@@ -644,8 +644,8 @@ void WiFiScan::startWiFiAttacks(uint8_t scan_mode, uint16_t color, String title_
display_obj.tft.setTextWrap(false);
display_obj.tft.setTextColor(TFT_BLACK, color);
#ifdef HAS_ILI9341
display_obj.tft.fillRect(0,16,240,16, color);
display_obj.tft.drawCentreString((String)title_string,120,16,2);
display_obj.tft.fillRect(0,16,TFT_WIDTH,16, color);
display_obj.tft.drawCentreString((String)title_string,TFT_WIDTH / 2,16,2);
display_obj.touchToExit();
#endif
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
@@ -4409,8 +4409,8 @@ void WiFiScan::main(uint32_t currentTime)
displayString2.concat(" ");
#ifdef HAS_SCREEN
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.showCenterText(displayString2, 160);
display_obj.showCenterText(displayString, 160);
display_obj.showCenterText(displayString2, TFT_HEIGHT / 2);
display_obj.showCenterText(displayString, TFT_HEIGHT / 2);
#endif
}
@@ -4492,8 +4492,8 @@ void WiFiScan::main(uint32_t currentTime)
displayString2.concat(" ");
#ifdef HAS_SCREEN
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.showCenterText(displayString2, 160);
display_obj.showCenterText(displayString, 160);
display_obj.showCenterText(displayString2, TFT_HEIGHT / 2);
display_obj.showCenterText(displayString, TFT_HEIGHT / 2);
#endif
packets_sent = 0;
}
@@ -4512,8 +4512,8 @@ void WiFiScan::main(uint32_t currentTime)
displayString2.concat(" ");
#ifdef HAS_SCREEN
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.showCenterText(displayString2, 160);
display_obj.showCenterText(displayString, 160);
display_obj.showCenterText(displayString2, TFT_HEIGHT / 2);
display_obj.showCenterText(displayString, TFT_HEIGHT / 2);
#endif
packets_sent = 0;
}
@@ -4532,8 +4532,8 @@ void WiFiScan::main(uint32_t currentTime)
displayString2.concat(" ");
#ifdef HAS_SCREEN
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.showCenterText(displayString2, 160);
display_obj.showCenterText(displayString, 160);
display_obj.showCenterText(displayString2, TFT_HEIGHT / 2);
display_obj.showCenterText(displayString, TFT_HEIGHT / 2);
#endif
packets_sent = 0;
}
@@ -4565,8 +4565,8 @@ void WiFiScan::main(uint32_t currentTime)
displayString2.concat(" ");
#ifdef HAS_SCREEN
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.showCenterText(displayString2, 160);
display_obj.showCenterText(displayString, 160);
display_obj.showCenterText(displayString2, TFT_HEIGHT / 2);
display_obj.showCenterText(displayString, TFT_HEIGHT / 2);
#endif
packets_sent = 0;
}
@@ -4602,8 +4602,8 @@ void WiFiScan::main(uint32_t currentTime)
displayString2.concat(" ");
#ifdef HAS_SCREEN
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.showCenterText(displayString2, 160);
display_obj.showCenterText(displayString, 160);
display_obj.showCenterText(displayString2, TFT_HEIGHT / 2);
display_obj.showCenterText(displayString, TFT_HEIGHT / 2);
#endif
packets_sent = 0;
}
@@ -4628,8 +4628,8 @@ void WiFiScan::main(uint32_t currentTime)
displayString2.concat(" ");
#ifdef HAS_SCREEN
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.showCenterText(displayString2, 160);
display_obj.showCenterText(displayString, 160);
display_obj.showCenterText(displayString2, TFT_HEIGHT / 2);
display_obj.showCenterText(displayString, TFT_HEIGHT / 2);
#endif
packets_sent = 0;
}
@@ -4649,8 +4649,8 @@ void WiFiScan::main(uint32_t currentTime)
displayString2.concat(" ");
#ifdef HAS_SCREEN
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.showCenterText(displayString2, 160);
display_obj.showCenterText(displayString, 160);
display_obj.showCenterText(displayString2, TFT_HEIGHT / 2);
display_obj.showCenterText(displayString, TFT_HEIGHT / 2);
#endif
packets_sent = 0;
}
@@ -4691,8 +4691,8 @@ void WiFiScan::main(uint32_t currentTime)
displayString2.concat(" ");
#ifdef HAS_SCREEN
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.showCenterText(displayString2, 160);
display_obj.showCenterText(displayString, 160);
display_obj.showCenterText(displayString2, TFT_HEIGHT / 2);
display_obj.showCenterText(displayString, TFT_HEIGHT / 2);
#endif
packets_sent = 0;
}

View File

@@ -10,9 +10,9 @@
//// BOARD TARGETS
//#define MARAUDER_M5STICKC
//#define MARAUDER_MINI
#define MARAUDER_MINI
//#define MARAUDER_V4
#define MARAUDER_V6
//#define MARAUDER_V6
//#define MARAUDER_V6_1
//#define MARAUDER_KIT
//#define GENERIC_ESP32