Compare commits

..

8 Commits

Author SHA1 Message Date
Just Call Me Koko
f5375eedaf Merge pull request #1006 from justcallmekoko/develop
Wardriving is asynchronous now
2025-12-08 16:45:31 -05:00
Just Call Me Koko
2910addb8a Ensure async wardrive 2025-12-08 16:32:25 -05:00
Just Call Me Koko
be3971d081 Wardriving is async 2025-12-08 15:40:24 -05:00
Just Call Me Koko
86e2fb206a Merge pull request #1005 from justcallmekoko/develop
Add wifi to flock wardrive
2025-12-08 15:10:53 -05:00
Just Call Me Koko
431fa175a0 Update WiFiScan.cpp 2025-12-08 15:04:09 -05:00
Just Call Me Koko
976687980c Add wifi to flock wardrive 2025-12-08 14:53:55 -05:00
Just Call Me Koko
1d419605f7 Merge pull request #1001 from justcallmekoko/develop
Fix menu navigation for back button
2025-12-04 18:36:50 -05:00
Just Call Me Koko
1624d98183 Fix menu navigation for back button 2025-12-04 18:12:28 -05:00
2 changed files with 80 additions and 12 deletions

View File

@@ -2039,6 +2039,8 @@ void MenuFunctions::RunSetup()
});
this->addNodes(&wifiGeneralMenu, "View AP Info", TFTCYAN, NULL, KEYBOARD_ICO, [this](){
wifiAPMenu.parentMenu = &wifiGeneralMenu;
// Add the back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
@@ -2074,6 +2076,8 @@ void MenuFunctions::RunSetup()
// Select Stations on Mini v2
this->addNodes(&wifiGeneralMenu, "Select Stations", TFTCYAN, NULL, KEYBOARD_ICO, [this](){
wifiAPMenu.parentMenu = &wifiGeneralMenu;
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
this->changeMenu(wifiAPMenu.parentMenu, true);
@@ -2140,6 +2144,9 @@ void MenuFunctions::RunSetup()
});
this->addNodes(&wifiGeneralMenu, "Join WiFi", TFTWHITE, NULL, KEYBOARD_ICO, [this](){
wifiAPMenu.parentMenu = &wifiGeneralMenu;
// Add the back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
@@ -2186,6 +2193,8 @@ void MenuFunctions::RunSetup()
this->changeMenu(&wifiGeneralMenu, true);
}
else {
wifiAPMenu.parentMenu = &wifiGeneralMenu;
// Add the back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
@@ -2303,6 +2312,8 @@ void MenuFunctions::RunSetup()
// Clone AP MAC to ESP32 for button folks
//#ifndef HAS_ILI9341
this->addNodes(&setMacMenu, "Clone AP MAC", TFTRED, NULL, CLEAR_ICO, [this](){
wifiAPMenu.parentMenu = &wifiGeneralMenu;
// Add the back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
@@ -2321,6 +2332,8 @@ void MenuFunctions::RunSetup()
});
this->addNodes(&setMacMenu, "Clone STA MAC", TFTMAGENTA, NULL, CLEAR_ICO, [this](){
wifiAPMenu.parentMenu = &wifiGeneralMenu;
// Add the back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
@@ -2474,6 +2487,8 @@ void MenuFunctions::RunSetup()
#ifdef HAS_BT
// Select Airtag on Mini
this->addNodes(&bluetoothAttackMenu, "Spoof Airtag", TFTWHITE, NULL, ATTACKS, [this](){
wifiAPMenu.parentMenu = &bluetoothAttackMenu;
// Clear nodes and add back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {

View File

@@ -2499,6 +2499,7 @@ void WiFiScan::StopScan(uint8_t scan_mode)
#endif
this->shutdownBLE();
this->ble_scanning = false;
#endif
}
@@ -4414,19 +4415,37 @@ void WiFiScan::executeWarDrive() {
bool do_save;
String display_string;
while (WiFi.scanComplete() == WIFI_SCAN_RUNNING) {
/*while (WiFi.scanComplete() == WIFI_SCAN_RUNNING) {
Serial.println(F("Scan running..."));
delay(500);
}*/
int scan_status = WiFi.scanComplete();
if (scan_status == WIFI_SCAN_RUNNING) {
delay(1);
return;
}
else if (scan_status == WIFI_SCAN_FAILED) {
Serial.println("WiFi scan failed to start. Restarting...");
this->wifi_initialized = true;
this->shutdownWiFi();
this->startWardriverWiFi();
this->wifi_initialized = true;
delay(100);
}
#ifndef HAS_DUAL_BAND
/*#ifndef HAS_DUAL_BAND
int n = WiFi.scanNetworks(false, true, false, 110, this->set_channel);
#else
int n = WiFi.scanNetworks(false, true, false, 110);
#endif
#endif*/
if (n > 0) {
for (int i = 0; i < n; i++) {
bool do_continue = false;
if (scan_status > 0) {
for (int i = 0; i < scan_status; i++) {
do_continue = true;
display_string = "";
do_save = false;
uint8_t *this_bssid_raw = WiFi.BSSID(i);
@@ -4439,6 +4458,24 @@ void WiFiScan::executeWarDrive() {
this->save_mac(this_bssid_raw);
String ssid = WiFi.SSID(i);
//Serial.println(ssid);
if (this->currentScanMode == BT_SCAN_FLOCK_WARDRIVE) {
for (int x = 0; x < sizeof(flock_ssid)/sizeof(this->flock_ssid[0]); x++) {
//Serial.print("Comparing ");
//Serial.print(ssid);
//Serial.print(" to ");
//Serial.println(this->flock_ssid[x]);
if (strcasestr(ssid.c_str(), this->flock_ssid[x])) {
do_continue = false;
break;
}
}
if (do_continue)
continue;
}
ssid.replace(",","_");
if (ssid != "") {
@@ -4476,11 +4513,17 @@ void WiFiScan::executeWarDrive() {
buffer_obj.append(wardrive_line);
}
}
}
this->channelHop();
// Free up that memory, you sexy devil
WiFi.scanDelete();
// Free up that memory, you sexy devil
WiFi.scanDelete();
}
/*#ifndef HAS_DUAL_BAND
this->channelHop();
#endif*/
if (!this->ble_scanning)
WiFi.scanNetworks(true, true, false, 80);
}
#endif
}
@@ -5016,6 +5059,8 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
}
else if (scan_mode == BT_SCAN_FLOCK_WARDRIVE) {
startLog("flock_wardrive");
this->startWardriverWiFi();
this->wifi_initialized = true;
}
String header_line = "WigleWifi-1.4,appRelease=" + (String)MARAUDER_VERSION + ",model=ESP32 Marauder,release=" + (String)MARAUDER_VERSION + ",device=ESP32 Marauder,display=SPI TFT,board=ESP32 Marauder,brand=JustCallMeKoko\nMAC,SSID,AuthMode,FirstSeen,Channel,RSSI,CurrentLatitude,CurrentLongitude,AltitudeMeters,AccuracyMeters,Type\n";
buffer_obj.append(header_line);
@@ -10105,13 +10150,21 @@ void WiFiScan::main(uint32_t currentTime)
this->ble_scanning = false;
}
else {
pBLEScan->start(0, scanCompleteCB, false);
this->ble_scanning = true;
return;
if (WiFi.scanComplete() != WIFI_SCAN_RUNNING) {
pBLEScan->start(0, scanCompleteCB, false);
this->ble_scanning = true;
return;
}
}
#endif
if (currentScanMode == BT_SCAN_FLOCK)
channelHop();
else if (currentScanMode == BT_SCAN_FLOCK_WARDRIVE) {
#ifdef HAS_GPS
if (gps_obj.getGpsModuleStatus())
this->executeWarDrive();
#endif
}
}
}
else if (currentScanMode == WIFI_PING_SCAN) {