mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-09 06:10:56 -08:00
Compare commits
13 Commits
unified-se
...
v0.13.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e80fab89b7 | ||
|
|
8b53b56d48 | ||
|
|
f8cf90a298 | ||
|
|
c7f1b5cb38 | ||
|
|
4c9adac032 | ||
|
|
23015fe49e | ||
|
|
0b0247f6ba | ||
|
|
eed4d7c31f | ||
|
|
c75bd6a098 | ||
|
|
b5337fcff5 | ||
|
|
24a1862ef6 | ||
|
|
971abc5390 | ||
|
|
43c82dd5a3 |
@@ -200,7 +200,10 @@ PROGMEM static const unsigned char menu_icons[][66] = {
|
||||
0x1F, 0xD0, 0x3F, 0x3F, 0xE0, 0x3F, 0x5F, 0xF0, 0x3F, 0xEF, 0xE8, 0x3F,
|
||||
0xF7, 0xE5, 0x3B, 0xFB, 0xDE, 0x3A, 0x7D, 0xFF, 0x3A, 0xBB, 0x7F, 0x3B,
|
||||
0xD7, 0x9F, 0x3D, 0xEF, 0xFF, 0x3E, 0xFF, 0x0F, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F}
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0xFD, 0xBF, 0x0B, 0xD0, 0xE7, 0xE7, 0xEF, 0xF7, 0xCF, 0xF3, // DISABLED TOUCH: 34
|
||||
0xAF, 0xF5, 0x6F, 0xF6, 0x6F, 0xF6, 0xAF, 0xF5, 0xCF, 0xF3, 0x0F, 0xF0,
|
||||
0xE7, 0xE7, 0x0B, 0xD0, 0xFD, 0xBF, 0xFF, 0xFF}
|
||||
};
|
||||
|
||||
#ifndef MARAUDER_MINI
|
||||
|
||||
@@ -234,10 +234,13 @@ bool EvilPortal::setAP(LinkedList<ssid>* ssids, LinkedList<AccessPoint>* access_
|
||||
}
|
||||
|
||||
void EvilPortal::startAP() {
|
||||
const IPAddress AP_IP(172, 0, 0, 1);
|
||||
|
||||
Serial.print("starting ap ");
|
||||
Serial.println(apName);
|
||||
|
||||
WiFi.mode(WIFI_AP);
|
||||
WiFi.softAPConfig(AP_IP, AP_IP, IPAddress(255, 255, 255, 0));
|
||||
WiFi.softAP(apName);
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
|
||||
@@ -12,7 +12,7 @@ HardwareSerial Serial2(GPS_SERIAL_INDEX);
|
||||
|
||||
void GpsInterface::begin() {
|
||||
|
||||
#ifdef MARAUDER_MINI
|
||||
/*#ifdef MARAUDER_MINI
|
||||
pinMode(26, OUTPUT);
|
||||
|
||||
delay(1);
|
||||
@@ -22,7 +22,7 @@ void GpsInterface::begin() {
|
||||
|
||||
Serial.println("Activated GPS");
|
||||
delay(100);
|
||||
#endif
|
||||
#endif*/
|
||||
|
||||
|
||||
Serial2.begin(9600, SERIAL_8N1, GPS_TX, GPS_RX);
|
||||
@@ -34,11 +34,22 @@ void GpsInterface::begin() {
|
||||
|
||||
delay(3900);
|
||||
|
||||
MicroNMEA::sendSentence(Serial2, "$PSTMFORCESTANDBY,00006");
|
||||
|
||||
delay(100);
|
||||
|
||||
if (Serial2.available()) {
|
||||
Serial.println("GPS Attached Successfully");
|
||||
this->gps_enabled = true;
|
||||
while (Serial2.available())
|
||||
Serial2.read();
|
||||
while (Serial2.available()) {
|
||||
//Fetch the character one by one
|
||||
char c = Serial2.read();
|
||||
//Serial.print(c);
|
||||
//Pass the character to the library
|
||||
Serial.print(c);
|
||||
nmea.process(c);
|
||||
}
|
||||
Serial.println(nmea.getSentence());
|
||||
}
|
||||
else {
|
||||
this->gps_enabled = false;
|
||||
|
||||
@@ -548,7 +548,8 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
|
||||
// getTouch causes a 10ms delay which makes beacon spam less effective
|
||||
#ifdef HAS_ILI9341
|
||||
pressed = this->updateTouch(&t_x, &t_y);
|
||||
if (!this->disable_touch)
|
||||
pressed = this->updateTouch(&t_x, &t_y);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -615,67 +616,70 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
#ifdef HAS_BUTTONS
|
||||
|
||||
bool c_btn_press = c_btn.justPressed();
|
||||
|
||||
#ifndef HAS_ILI9341
|
||||
|
||||
if ((c_btn_press) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_OFF) &&
|
||||
(wifi_scan_obj.currentScanMode != OTA_UPDATE) &&
|
||||
(wifi_scan_obj.currentScanMode != ESP_UPDATE) &&
|
||||
(wifi_scan_obj.currentScanMode != SHOW_INFO) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_GPS_DATA) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_GPS_NMEA))
|
||||
{
|
||||
// Stop the current scan
|
||||
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_PROBE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_STATION_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_RAW_CAPTURE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_STATION) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_AP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_EVIL_PORTAL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_SIG_STREN) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_TARGET_AP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_TARGET_AP_FULL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PWN) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ESPRESSIF) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_DEAUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_AP_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_AUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_DEAUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_DEAUTH_MANUAL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_DEAUTH_TARGETED) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_MIMIC) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_RICK_ROLL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_LIST) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SOUR_APPLE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SWIFTPAIR_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SPAM_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SAMSUNG_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_GOOGLE_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE_CONT) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_SKIMMERS) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ACTIVE_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ACTIVE_LIST_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_PACKET_MONITOR))
|
||||
if ((c_btn_press) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_OFF) &&
|
||||
(wifi_scan_obj.currentScanMode != OTA_UPDATE) &&
|
||||
(wifi_scan_obj.currentScanMode != ESP_UPDATE) &&
|
||||
(wifi_scan_obj.currentScanMode != SHOW_INFO) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_GPS_DATA) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_GPS_NMEA))
|
||||
{
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
|
||||
|
||||
// If we don't do this, the text and button coordinates will be off
|
||||
display_obj.tft.init();
|
||||
|
||||
// Take us back to the menu
|
||||
changeMenu(current_menu);
|
||||
// Stop the current scan
|
||||
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_PROBE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_STATION_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_RAW_CAPTURE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_STATION) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_AP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_EVIL_PORTAL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_SIG_STREN) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_TARGET_AP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_TARGET_AP_FULL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PWN) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ESPRESSIF) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_DEAUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_AP_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_AUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_DEAUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_DEAUTH_MANUAL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_DEAUTH_TARGETED) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_MIMIC) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_RICK_ROLL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_LIST) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SOUR_APPLE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SWIFTPAIR_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SPAM_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SAMSUNG_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_GOOGLE_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE_CONT) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_SKIMMERS) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ACTIVE_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ACTIVE_LIST_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_PACKET_MONITOR))
|
||||
{
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
|
||||
|
||||
// If we don't do this, the text and button coordinates will be off
|
||||
display_obj.tft.init();
|
||||
|
||||
// Take us back to the menu
|
||||
changeMenu(current_menu);
|
||||
}
|
||||
|
||||
x = -1;
|
||||
y = -1;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
x = -1;
|
||||
y = -1;
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -989,7 +993,23 @@ void MenuFunctions::updateStatusBar()
|
||||
}
|
||||
|
||||
// Draw battery info
|
||||
MenuFunctions::battery(false);
|
||||
//MenuFunctions::battery(false);
|
||||
display_obj.tft.fillRect(190, 0, SCREEN_WIDTH, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
|
||||
#ifdef HAS_ILI9341
|
||||
#ifdef HAS_BUTTONS
|
||||
if (this->disable_touch) {
|
||||
display_obj.tft.setCursor(0, 1);
|
||||
display_obj.tft.drawXBitmap(190,
|
||||
0,
|
||||
menu_icons[DISABLE_TOUCH],
|
||||
16,
|
||||
16,
|
||||
STATUSBAR_COLOR,
|
||||
TFT_RED);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// Draw SD info
|
||||
@@ -1075,7 +1095,23 @@ void MenuFunctions::drawStatusBar()
|
||||
#endif
|
||||
|
||||
|
||||
MenuFunctions::battery2(true);
|
||||
//MenuFunctions::battery2(true);
|
||||
display_obj.tft.fillRect(190, 0, SCREEN_WIDTH, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
|
||||
#ifdef HAS_ILI9341
|
||||
#ifdef HAS_BUTTONS
|
||||
if (this->disable_touch) {
|
||||
display_obj.tft.setCursor(0, 1);
|
||||
display_obj.tft.drawXBitmap(190,
|
||||
0,
|
||||
menu_icons[DISABLE_TOUCH],
|
||||
16,
|
||||
16,
|
||||
STATUSBAR_COLOR,
|
||||
TFT_RED);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Draw SD info
|
||||
if (sd_obj.supported)
|
||||
@@ -1168,6 +1204,8 @@ void MenuFunctions::displaySetting(String key, Menu* menu, int index) {
|
||||
void MenuFunctions::RunSetup()
|
||||
{
|
||||
extern LinkedList<AccessPoint>* access_points;
|
||||
|
||||
this->disable_touch = false;
|
||||
|
||||
#ifdef HAS_ILI9341
|
||||
this->initLVGL();
|
||||
@@ -1204,6 +1242,9 @@ void MenuFunctions::RunSetup()
|
||||
|
||||
// WiFi HTML menu stuff
|
||||
htmlMenu.list = new LinkedList<MenuNode>();
|
||||
#ifdef MARAUDER_MINI
|
||||
miniKbMenu.list = new LinkedList<MenuNode>();
|
||||
#endif
|
||||
|
||||
// Bluetooth menu stuff
|
||||
bluetoothSnifferMenu.list = new LinkedList<MenuNode>();
|
||||
@@ -1239,6 +1280,9 @@ void MenuFunctions::RunSetup()
|
||||
gpsInfoMenu.name = "GPS Data";
|
||||
#endif
|
||||
htmlMenu.name = "EP HTML List";
|
||||
#ifdef MARAUDER_MINI
|
||||
miniKbMenu.name = "Mini Keyboard";
|
||||
#endif
|
||||
|
||||
// Build Main Menu
|
||||
mainMenu.parentMenu = NULL;
|
||||
@@ -1419,6 +1463,12 @@ void MenuFunctions::RunSetup()
|
||||
addSSIDGFX();
|
||||
});
|
||||
#endif
|
||||
#ifdef MARAUDER_MINI
|
||||
this->addNodes(&wifiGeneralMenu, text_table1[1], TFT_NAVY, NULL, KEYBOARD_ICO, [this](){
|
||||
this->changeMenu(&miniKbMenu);
|
||||
this->miniKeyboard(&miniKbMenu);
|
||||
});
|
||||
#endif
|
||||
this->addNodes(&wifiGeneralMenu, text_table1[28], TFT_SILVER, NULL, CLEAR_ICO, [this]() {
|
||||
this->changeMenu(&clearSSIDsMenu);
|
||||
wifi_scan_obj.RunClearSSIDs();
|
||||
@@ -1451,7 +1501,7 @@ void MenuFunctions::RunSetup()
|
||||
wifi_scan_obj.StartScan(LV_ADD_SSID, TFT_RED);
|
||||
selectEPHTMLGFX();
|
||||
});
|
||||
#else
|
||||
#else // Mini EP HTML select
|
||||
this->addNodes(&wifiGeneralMenu, "Select EP HTML File", TFT_CYAN, NULL, KEYBOARD_ICO, [this](){
|
||||
this->changeMenu(&htmlMenu);
|
||||
#ifdef HAS_BUTTONS
|
||||
@@ -1463,7 +1513,6 @@ void MenuFunctions::RunSetup()
|
||||
else
|
||||
evil_portal_obj.selected_html_index = evil_portal_obj.html_files->size() - 1;
|
||||
|
||||
//Serial.println("Setting button text as " + evil_portal_obj.html_files->get(evil_portal_obj.selected_html_index));
|
||||
this->htmlMenu.list->set(0, MenuNode{evil_portal_obj.html_files->get(evil_portal_obj.selected_html_index), false, TFT_CYAN, 0, NULL, true, NULL});
|
||||
this->buildButtons(&htmlMenu);
|
||||
this->displayCurrentMenu();
|
||||
@@ -1475,7 +1524,6 @@ void MenuFunctions::RunSetup()
|
||||
else
|
||||
evil_portal_obj.selected_html_index = 0;
|
||||
|
||||
//Serial.println("Setting button text as " + evil_portal_obj.html_files->get(evil_portal_obj.selected_html_index));
|
||||
this->htmlMenu.list->set(0, MenuNode{evil_portal_obj.html_files->get(evil_portal_obj.selected_html_index), false, TFT_CYAN, 0, NULL, true, NULL});
|
||||
this->buildButtons(&htmlMenu, 0, evil_portal_obj.html_files->get(evil_portal_obj.selected_html_index));
|
||||
this->displayCurrentMenu();
|
||||
@@ -1495,6 +1543,11 @@ void MenuFunctions::RunSetup()
|
||||
#endif
|
||||
});
|
||||
|
||||
miniKbMenu.parentMenu = &wifiGeneralMenu;
|
||||
this->addNodes(&miniKbMenu, "a", TFT_CYAN, NULL, 0, [this]() {
|
||||
this->changeMenu(miniKbMenu.parentMenu);
|
||||
});
|
||||
|
||||
htmlMenu.parentMenu = &wifiGeneralMenu;
|
||||
this->addNodes(&htmlMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
|
||||
this->changeMenu(htmlMenu.parentMenu);
|
||||
@@ -1759,6 +1812,124 @@ void MenuFunctions::RunSetup()
|
||||
this->initTime = millis();
|
||||
}
|
||||
|
||||
#ifdef MARAUDER_MINI
|
||||
void MenuFunctions::miniKeyboard(Menu * targetMenu) {
|
||||
// Prepare a char array and reset temp SSID string
|
||||
extern LinkedList<ssid>* ssids;
|
||||
|
||||
bool pressed = true;
|
||||
|
||||
wifi_scan_obj.current_mini_kb_ssid = "";
|
||||
|
||||
if (c_btn.isHeld()) {
|
||||
while (!c_btn.justReleased())
|
||||
delay(1);
|
||||
}
|
||||
|
||||
int str_len = wifi_scan_obj.alfa.length() + 1;
|
||||
|
||||
char char_array[str_len];
|
||||
|
||||
wifi_scan_obj.alfa.toCharArray(char_array, str_len);
|
||||
|
||||
// Button loop until hold center button
|
||||
#ifdef HAS_BUTTONS
|
||||
#if !(defined(MARAUDER_V6) || defined(MARAUDER_V6_1))
|
||||
while(true) {
|
||||
#ifndef MARAUDER_M5STICKC
|
||||
// Cycle char previous
|
||||
if (l_btn.justPressed()) {
|
||||
pressed = true;
|
||||
if (this->mini_kb_index > 0)
|
||||
this->mini_kb_index--;
|
||||
else
|
||||
this->mini_kb_index = str_len - 2;
|
||||
|
||||
targetMenu->list->set(0, MenuNode{String(char_array[this->mini_kb_index]).c_str(), false, TFT_CYAN, 0, NULL, true, NULL});
|
||||
this->buildButtons(targetMenu);
|
||||
//this->displayCurrentMenu();
|
||||
|
||||
}
|
||||
|
||||
// Add character
|
||||
if (d_btn.justPressed()) {
|
||||
pressed = true;
|
||||
wifi_scan_obj.current_mini_kb_ssid.concat(String(char_array[this->mini_kb_index]).c_str());
|
||||
while (!d_btn.justReleased())
|
||||
delay(1);
|
||||
}
|
||||
|
||||
// Remove character
|
||||
if (u_btn.justPressed()) {
|
||||
pressed = true;
|
||||
wifi_scan_obj.current_mini_kb_ssid.remove(wifi_scan_obj.current_mini_kb_ssid.length() - 1);
|
||||
while (!u_btn.justReleased())
|
||||
delay(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Cycle char next
|
||||
if (r_btn.justPressed()) {
|
||||
pressed = true;
|
||||
if (this->mini_kb_index < str_len - 2)
|
||||
this->mini_kb_index++;
|
||||
else
|
||||
this->mini_kb_index = 0;
|
||||
|
||||
targetMenu->list->set(0, MenuNode{String(char_array[this->mini_kb_index]).c_str(), false, TFT_CYAN, 0, NULL, true, NULL});
|
||||
this->buildButtons(targetMenu, 0, String(char_array[this->mini_kb_index]).c_str());
|
||||
//this->displayCurrentMenu();
|
||||
}
|
||||
|
||||
// Add SSID
|
||||
if (c_btn.justPressed()) {
|
||||
while (!c_btn.justReleased()) {
|
||||
c_btn.justPressed(); // Need to continue updating button hold status. My shitty library.
|
||||
|
||||
// Exit
|
||||
if (c_btn.isHeld()) {
|
||||
this->changeMenu(targetMenu->parentMenu);
|
||||
return;
|
||||
}
|
||||
delay(1);
|
||||
}
|
||||
// If we have a string, add it to list of SSIDs
|
||||
if (wifi_scan_obj.current_mini_kb_ssid != "") {
|
||||
pressed = true;
|
||||
ssid s = {wifi_scan_obj.current_mini_kb_ssid, random(1, 12), {random(256), random(256), random(256), random(256), random(256), random(256)}, false};
|
||||
ssids->unshift(s);
|
||||
wifi_scan_obj.current_mini_kb_ssid = "";
|
||||
}
|
||||
}
|
||||
|
||||
// Display info on screen
|
||||
if (pressed) {
|
||||
this->displayCurrentMenu();
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.fillRect(0, SCREEN_HEIGHT / 3, SCREEN_WIDTH, STATUS_BAR_WIDTH, TFT_BLACK);
|
||||
display_obj.tft.fillRect(0, SCREEN_HEIGHT / 3 + TEXT_HEIGHT * 2, SCREEN_WIDTH, STATUS_BAR_WIDTH, TFT_BLACK);
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
display_obj.tft.println(wifi_scan_obj.current_mini_kb_ssid + "\n");
|
||||
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
|
||||
display_obj.tft.println(ssids->get(0).essid);
|
||||
|
||||
display_obj.tft.setTextColor(TFT_ORANGE, TFT_BLACK);
|
||||
display_obj.tft.println("U - Remove Char");
|
||||
display_obj.tft.println("D - Add Char");
|
||||
display_obj.tft.println("L - Previous Char");
|
||||
display_obj.tft.println("R - Next Char");
|
||||
display_obj.tft.println("C - Save");
|
||||
display_obj.tft.println("C(Hold) - Exit");
|
||||
pressed = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// Function to change menu
|
||||
void MenuFunctions::changeMenu(Menu * menu)
|
||||
{
|
||||
|
||||
@@ -71,6 +71,7 @@ extern Settings settings_obj;
|
||||
#define LANGUAGE 31
|
||||
#define STATUS_GPS 32
|
||||
#define GPS_MENU 33
|
||||
#define DISABLE_TOUCH 34
|
||||
|
||||
PROGMEM void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p);
|
||||
PROGMEM bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data);
|
||||
@@ -120,7 +121,7 @@ class MenuFunctions
|
||||
|
||||
uint32_t initTime = 0;
|
||||
uint8_t menu_start_index = 0;
|
||||
|
||||
uint8_t mini_kb_index = 0;
|
||||
|
||||
// Main menu stuff
|
||||
Menu mainMenu;
|
||||
@@ -148,6 +149,7 @@ class MenuFunctions
|
||||
|
||||
// WiFi General Menu
|
||||
Menu htmlMenu;
|
||||
Menu miniKbMenu;
|
||||
|
||||
// Bluetooth menu stuff
|
||||
Menu bluetoothSnifferMenu;
|
||||
@@ -163,7 +165,6 @@ class MenuFunctions
|
||||
|
||||
|
||||
void addNodes(Menu* menu, String name, uint16_t color, Menu* child, int place, std::function<void()> callable, bool selected = false, String command = "");
|
||||
void updateStatusBar();
|
||||
void battery(bool initial = false);
|
||||
void battery2(bool initial = false);
|
||||
void showMenuList(Menu* menu, int layer);
|
||||
@@ -172,6 +173,9 @@ class MenuFunctions
|
||||
void displaySetting(String key, Menu* menu, int index);
|
||||
void buttonSelected(uint8_t b, int8_t x = -1);
|
||||
void buttonNotSelected(uint8_t b, int8_t x = -1);
|
||||
#ifdef MARAUDER_MINI
|
||||
void miniKeyboard(Menu * targetMenu);
|
||||
#endif
|
||||
|
||||
uint8_t updateTouch(uint16_t *x, uint16_t *y, uint16_t threshold = 600);
|
||||
|
||||
@@ -192,11 +196,14 @@ class MenuFunctions
|
||||
uint16_t x = -1, y = -1;
|
||||
boolean pressed = false;
|
||||
|
||||
bool disable_touch;
|
||||
|
||||
String loaded_file = "";
|
||||
|
||||
void initLVGL();
|
||||
void deinitLVGL();
|
||||
void selectEPHTMLGFX();
|
||||
void updateStatusBar();
|
||||
void addSSIDGFX();
|
||||
void addAPGFX();
|
||||
void addStationGFX();
|
||||
|
||||
@@ -196,7 +196,6 @@ class WiFiScan
|
||||
|
||||
//String connected_network = "";
|
||||
//const String alfa = "1234567890qwertyuiopasdfghjkklzxcvbnm QWERTYUIOPASDFGHJKLZXCVBNM_";
|
||||
const String alfa = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789-=[];',./`\\_+{}:\"<>?~|!@#$%^&*()";
|
||||
|
||||
const char* rick_roll[8] = {
|
||||
"01 Never gonna give you up",
|
||||
@@ -356,6 +355,9 @@ class WiFiScan
|
||||
String dst_mac = "ff:ff:ff:ff:ff:ff";
|
||||
byte src_mac[6] = {};
|
||||
|
||||
String current_mini_kb_ssid = "";
|
||||
|
||||
const String alfa = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789-=[];',./`\\_+{}:\"<>?~|!@#$%^&*()";
|
||||
|
||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||
wifi_config_t ap_config;
|
||||
|
||||
@@ -8,9 +8,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
|
||||
@@ -20,7 +20,7 @@
|
||||
//#define XIAO_ESP32_S3
|
||||
//// END BOARD TARGETS
|
||||
|
||||
#define MARAUDER_VERSION "v0.13.7"
|
||||
#define MARAUDER_VERSION "v0.13.8"
|
||||
|
||||
//// HARDWARE NAMES
|
||||
#ifdef MARAUDER_M5STICKC
|
||||
|
||||
@@ -387,6 +387,22 @@ void loop()
|
||||
mini = true;
|
||||
#endif
|
||||
|
||||
#ifdef HAS_ILI9341
|
||||
#ifdef HAS_BUTTONS
|
||||
if (c_btn.isHeld()) {
|
||||
if (menu_function_obj.disable_touch)
|
||||
menu_function_obj.disable_touch = false;
|
||||
else
|
||||
menu_function_obj.disable_touch = true;
|
||||
|
||||
menu_function_obj.updateStatusBar();
|
||||
|
||||
while (!c_btn.justReleased())
|
||||
delay(1);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Update all of our objects
|
||||
/*#ifdef HAS_SCREEN
|
||||
bool do_draw = display_obj.draw_tft;
|
||||
|
||||
BIN
mechanical/Marauder-Mini/MarauderMini-Bottom v11.stl
Normal file
BIN
mechanical/Marauder-Mini/MarauderMini-Bottom v11.stl
Normal file
Binary file not shown.
BIN
mechanical/Marauder-Mini/MarauderMini-Bottom v12 (SMA).stl
Normal file
BIN
mechanical/Marauder-Mini/MarauderMini-Bottom v12 (SMA).stl
Normal file
Binary file not shown.
Binary file not shown.
BIN
pictures/icons/disable_touch_16.bmp
Normal file
BIN
pictures/icons/disable_touch_16.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 190 B |
6
pictures/xbm/disable_touch_16.xbm
Normal file
6
pictures/xbm/disable_touch_16.xbm
Normal file
@@ -0,0 +1,6 @@
|
||||
#define ce2b329463664e43e1607d0384f46ac1NszJo7o8A3Pedgwr_width 16
|
||||
#define ce2b329463664e43e1607d0384f46ac1NszJo7o8A3Pedgwr_height 16
|
||||
static char ce2b329463664e43e1607d0384f46ac1NszJo7o8A3Pedgwr_bits[] = {
|
||||
0xFF, 0xFF, 0xFD, 0xBF, 0x0B, 0xD0, 0xE7, 0xE7, 0xEF, 0xF7, 0xCF, 0xF3,
|
||||
0xAF, 0xF5, 0x6F, 0xF6, 0x6F, 0xF6, 0xAF, 0xF5, 0xCF, 0xF3, 0x0F, 0xF0,
|
||||
0xE7, 0xE7, 0x0B, 0xD0, 0xFD, 0xBF, 0xFF, 0xFF, };
|
||||
Reference in New Issue
Block a user