diff --git a/esp32_marauder/Assets.h b/esp32_marauder/Assets.h index 1da29aa..1341949 100644 --- a/esp32_marauder/Assets.h +++ b/esp32_marauder/Assets.h @@ -233,6 +233,12 @@ PROGMEM static const unsigned char menu_icons[][66] = { 0x7B, 0x3E, 0x37, 0x7B, 0xBF, 0x37, 0xFB, 0xF7, 0x37, 0xFB, 0xF7, 0x37, 0xFB, 0xF3, 0x37, 0xBB, 0x7F, 0x37, 0x37, 0x3F, 0x3B, 0x77, 0x80, 0x3B, 0xEF, 0xE1, 0x3D, 0xDF, 0xFF, 0x3E, 0x3F, 0x3F, 0x3F, 0xFF, 0xC0, 0x3F, + 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F}, + {0xFF, 0xFF, 0x3F, 0xFF, 0xE0, 0x3F, 0x3F, 0x9F, 0x3F, 0xBF, 0xBF, 0x3F, // FLOCK: 41 + 0xDF, 0x71, 0x3F, 0xDF, 0x6E, 0x3F, 0xDF, 0x6E, 0x3F, 0xDF, 0x6E, 0x3F, + 0xDF, 0x71, 0x3F, 0xDF, 0x7B, 0x3F, 0xDF, 0x7F, 0x3F, 0xDF, 0x7F, 0x3F, + 0xDF, 0x7F, 0x3F, 0xBF, 0xBF, 0x3F, 0xBF, 0xBB, 0x3F, 0x3F, 0x9B, 0x3F, + 0x7F, 0xDF, 0x3F, 0x7F, 0xDF, 0x3F, 0x7F, 0xDF, 0x3F, 0xFF, 0xE0, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F} }; diff --git a/esp32_marauder/CommandLine.cpp b/esp32_marauder/CommandLine.cpp index 7b21600..9c3b9d7 100644 --- a/esp32_marauder/CommandLine.cpp +++ b/esp32_marauder/CommandLine.cpp @@ -262,6 +262,10 @@ void CommandLine::runCommand(String input) { Serial.println(HELP_SAVE_CMD); Serial.println(HELP_LOAD_CMD); Serial.println(HELP_JOIN_CMD); + Serial.println(HELP_MAC_CMD_A); + Serial.println(HELP_MAC_CMD_B); + Serial.println(HELP_MAC_CMD_C); + Serial.println(HELP_MAC_CMD_D); // Bluetooth sniff/scan #ifdef HAS_BT @@ -809,6 +813,81 @@ void CommandLine::runCommand(String input) { } } + + //// MAC Address commands (Added by H4W9_4) + // Generate random MAC for AP + if (cmd_args.get(0) == MAC_CMD_A) { + #ifdef HAS_SCREEN + display_obj.clearScreen(); + menu_function_obj.drawStatusBar(); + #endif + wifi_scan_obj.RunGenerateRandomMac(true); + } + + // Generate random MAC for STA + else if (cmd_args.get(0) == MAC_CMD_B) { + //Serial.println("Setting STA MAC: " + macToString(this->sta_mac)); + #ifdef HAS_SCREEN + display_obj.clearScreen(); + menu_function_obj.drawStatusBar(); + #endif + wifi_scan_obj.RunGenerateRandomMac(false); + } + + // Clone MAC for AP + else if (cmd_args.get(0) == MAC_CMD_C) { + int ap_sw = this->argSearch(&cmd_args, "-a"); // APs + + if (ap_sw == -1) { + Serial.println("You did not provide a target index"); + return; + } + + int ap_index = cmd_args.get(ap_sw + 1).toInt(); + + if ((ap_index < 0) || (ap_index > access_points->size() - 1)) { + Serial.println("The provided index was not in range"); + return; + } + + if (ap_sw != -1) { + #ifdef HAS_SCREEN + display_obj.clearScreen(); + menu_function_obj.drawStatusBar(); + #endif + int filter_ap = cmd_args.get(ap_sw + 1).toInt(); + wifi_scan_obj.RunSetMac(access_points->get(filter_ap).bssid, true); + } + } + + // Clone MAC for STA + else if (cmd_args.get(0) == MAC_CMD_D) { + int cl_sw = this->argSearch(&cmd_args, "-s"); // Stations + + if (cl_sw == -1) { + Serial.println("You did not provide a target index"); + return; + } + + int sta_index = cmd_args.get(cl_sw + 1).toInt(); + + if ((sta_index < 0) || (sta_index > stations->size() - 1)) { + Serial.println("The provided index was not in range"); + return; + } + + if (cl_sw != -1) { + #ifdef HAS_SCREEN + display_obj.clearScreen(); + menu_function_obj.drawStatusBar(); + #endif + int filter_sta = cmd_args.get(cl_sw + 1).toInt(); + wifi_scan_obj.RunSetMac(stations->get(filter_sta).mac, false); + } + } + //// End MAC Address commands (Added by H4W9_4) + + //// WiFi attack commands // attack if (cmd_args.get(0) == ATTACK_CMD) { @@ -1022,6 +1101,14 @@ void CommandLine::runCommand(String input) { #endif wifi_scan_obj.StartScan(BT_SCAN_FLIPPER, TFT_ORANGE); } + else if (bt_type == "flock") { + Serial.println("Starting Flock sniff. Stop with " + (String)STOPSCAN_CMD); + #ifdef HAS_SCREEN + display_obj.clearScreen(); + menu_function_obj.drawStatusBar(); + #endif + wifi_scan_obj.StartScan(BT_SCAN_FLOCK, TFT_ORANGE); + } } // General bluetooth sniff else { diff --git a/esp32_marauder/CommandLine.h b/esp32_marauder/CommandLine.h index 0fa4838..8800e9d 100644 --- a/esp32_marauder/CommandLine.h +++ b/esp32_marauder/CommandLine.h @@ -97,6 +97,10 @@ const char PROGMEM SSID_CMD[] = "ssid"; const char PROGMEM SAVE_CMD[] = "save"; const char PROGMEM LOAD_CMD[] = "load"; const char PROGMEM JOIN_CMD[] = "join"; +const char PROGMEM MAC_CMD_A[] = "randapmac"; +const char PROGMEM MAC_CMD_B[] = "randstamac"; +const char PROGMEM MAC_CMD_C[] = "cloneapmac"; +const char PROGMEM MAC_CMD_D[] = "clonestamac"; // Bluetooth sniff/scan const char PROGMEM BT_SPAM_CMD[] = "blespam"; @@ -166,9 +170,13 @@ const char PROGMEM HELP_SSID_CMD_B[] = "ssid -r "; const char PROGMEM HELP_SAVE_CMD[] = "save -a/-s"; const char PROGMEM HELP_LOAD_CMD[] = "load -a/-s"; const char PROGMEM HELP_JOIN_CMD[] = "join -a -p /-s"; +const char PROGMEM HELP_MAC_CMD_A[] = "randapmac"; +const char PROGMEM HELP_MAC_CMD_B[] = "randstamac"; +const char PROGMEM HELP_MAC_CMD_C[] = "cloneapmac [-a ]"; +const char PROGMEM HELP_MAC_CMD_D[] = "clonestamac [-s ]"; // Bluetooth sniff/scan -const char PROGMEM HELP_BT_SNIFF_CMD[] = "sniffbt [-t] "; +const char PROGMEM HELP_BT_SNIFF_CMD[] = "sniffbt [-t] "; const char PROGMEM HELP_BT_SPAM_CMD[] = "blespam -t "; const char PROGMEM HELP_BT_SPOOFAT_CMD[] = "spoofat -t "; //const char PROGMEM HELP_BT_SOUR_APPLE_CMD[] = "sourapple"; diff --git a/esp32_marauder/MenuFunctions.cpp b/esp32_marauder/MenuFunctions.cpp index bb33ea4..fc1be9d 100644 --- a/esp32_marauder/MenuFunctions.cpp +++ b/esp32_marauder/MenuFunctions.cpp @@ -921,6 +921,7 @@ void MenuFunctions::main(uint32_t currentTime) (wifi_scan_obj.currentScanMode == BT_SCAN_AIRTAG_MON) || (wifi_scan_obj.currentScanMode == BT_SCAN_FLIPPER) || (wifi_scan_obj.currentScanMode == BT_SCAN_FLOCK) || + (wifi_scan_obj.currentScanMode == BT_SCAN_FLOCK_WARDRIVE) || (wifi_scan_obj.currentScanMode == BT_SCAN_SIMPLE) || (wifi_scan_obj.currentScanMode == BT_SCAN_SIMPLE_TWO) || (wifi_scan_obj.currentScanMode == BT_ATTACK_SOUR_APPLE) || @@ -1019,6 +1020,7 @@ void MenuFunctions::main(uint32_t currentTime) (wifi_scan_obj.currentScanMode == BT_SCAN_AIRTAG_MON) || (wifi_scan_obj.currentScanMode == BT_SCAN_FLIPPER) || (wifi_scan_obj.currentScanMode == BT_SCAN_FLOCK) || + (wifi_scan_obj.currentScanMode == BT_SCAN_FLOCK_WARDRIVE) || (wifi_scan_obj.currentScanMode == BT_SCAN_SIMPLE) || (wifi_scan_obj.currentScanMode == BT_SCAN_SIMPLE_TWO) || (wifi_scan_obj.currentScanMode == BT_ATTACK_SOUR_APPLE) || @@ -3171,11 +3173,16 @@ void MenuFunctions::RunSetup() this->renderGraphUI(BT_SCAN_ANALYZER); wifi_scan_obj.StartScan(BT_SCAN_ANALYZER, TFT_CYAN); }); - this->addNodes(&bluetoothSnifferMenu, "Flock Sniff", TFTORANGE, NULL, BLUETOOTH_SNIFF, [this]() { + this->addNodes(&bluetoothSnifferMenu, "Flock Sniff", TFTORANGE, NULL, FLOCK, [this]() { display_obj.clearScreen(); this->drawStatusBar(); wifi_scan_obj.StartScan(BT_SCAN_FLOCK, TFT_ORANGE); }); + this->addNodes(&bluetoothSnifferMenu, "Flock Wardrive", TFTCYAN, NULL, FLOCK, [this]() { + display_obj.clearScreen(); + this->drawStatusBar(); + wifi_scan_obj.StartScan(BT_SCAN_FLOCK_WARDRIVE, TFT_CYAN); + }); /*this->addNodes(&bluetoothSnifferMenu, "Simple Sniff", TFTWHITE, NULL, BLUETOOTH_SNIFF, [this]() { display_obj.clearScreen(); this->drawStatusBar(); diff --git a/esp32_marauder/MenuFunctions.h b/esp32_marauder/MenuFunctions.h index b44d67d..036355a 100644 --- a/esp32_marauder/MenuFunctions.h +++ b/esp32_marauder/MenuFunctions.h @@ -93,6 +93,7 @@ extern Settings settings_obj; #define JOINED 38 #define FORCE 39 #define FUNNY_BEACON 40 +#define FLOCK 41 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); diff --git a/esp32_marauder/WiFiScan.cpp b/esp32_marauder/WiFiScan.cpp index 1bf93a0..cd1cc42 100644 --- a/esp32_marauder/WiFiScan.cpp +++ b/esp32_marauder/WiFiScan.cpp @@ -623,6 +623,180 @@ extern "C" { // (struct FlockBattery { String mac; String name; String serial; int rssi; uint32_t last_seen; }; etc.) } } + else if (wifi_scan_obj.currentScanMode == BT_SCAN_FLOCK_WARDRIVE) { + bool do_save = false; + #ifdef HAS_GPS + if (gps_obj.getGpsModuleStatus()) { + + unsigned char mac_char[6]; + wifi_scan_obj.copyNimbleMac(advertisedDevice->getAddress(), mac_char); + + if (wifi_scan_obj.seen_mac(mac_char)) + return; + + uint8_t* payLoad = advertisedDevice->getPayload(); + size_t len = advertisedDevice->getPayloadLength(); + + bool hasXuntongMfg = false; + size_t mfgIndex = 0; // index of 0xFF (AD type) + + // Look for Company ID XUNTONG (0x09C8), + for (size_t i = 1; i + 3 < len; i++) { + if (payLoad[i] == 0xFF && // AD type: Manufacturer Specific + payLoad[i + 1] == 0xC8 && + payLoad[i + 2] == 0x09) { + hasXuntongMfg = true; + mfgIndex = i; + break; + } + } + + String name = advertisedDevice->getName().c_str(); + + // Check for old penguin name + bool penguin = false; + + if (name.length() > 0) { + // Old firmware: "Penguin-XXXXXXXXXX" + if (name.startsWith("Penguin-") && name.length() == 18) { + bool allDigits = true; + for (int i = 8; i < name.length(); i++) { + char c = name.charAt(i); + if (c < '0' || c > '9') { + allDigits = false; + break; + } + } + if (allDigits) { + penguin = true; + } + } + + // Legacy name: "FS Ext Battery" + if (name == "FS Ext Battery") { + penguin = true; + } + + // New firmware: "NNNNNNNNNN" (10 digits) + if (name.length() == 10) { + bool allDigits = true; + for (int i = 0; i < name.length(); i++) { + char c = name.charAt(i); + if (c < '0' || c > '9') { + allDigits = false; + break; + } + } + if (allDigits) { + penguin = true; + } + } + } + + // Try to extract serial number from the XUNTONG manufacturer data + String serial = ""; + + if (hasXuntongMfg && mfgIndex > 0) { + uint8_t adLen = payLoad[mfgIndex - 1]; // length byte for this AD structure + size_t adStart = mfgIndex - 1; + size_t adEnd = adStart + adLen; // exclusive end index + + if (adEnd > len) { + adEnd = len; + } + + size_t vendorStart = mfgIndex + 3; + if (vendorStart < adEnd) { + bool started = false; + + for (size_t k = vendorStart; k < adEnd; k++) { + char c = (char)payLoad[k]; + + if (!started) { + if (c == 'T' && (k + 1) < adEnd && (char)payLoad[k + 1] == 'N') { + started = true; + serial += 'T'; + serial += 'N'; + k++; + } + } else { + // Once started, append digits (skip separators; stop on anything else) + if (c >= '0' && c <= '9') { + serial += c; + } else if (c == ' ' || c == '#' || c == '-') { + continue; + } else { + break; + } + } + } + } + } + + // Final decision on marking as Flock Penguin battery + if (hasXuntongMfg && (penguin || name.length() == 0)) { + String mac = advertisedDevice->getAddress().toString().c_str(); + mac.toUpperCase(); + int rssi = advertisedDevice->getRSSI(); + + // rssi + // mac + // name + // serial + + if (gps_obj.getFixStatus()) + do_save = true; + + #ifdef HAS_SCREEN + String display_string; + if (!do_save) + display_string = RED_KEY; + else + display_string = GREEN_KEY; + + display_string.concat(String(rssi)); + display_string.concat(" "); + if (serial.length()) { + display_string.concat(serial); + display_string.concat(" "); + } + + if (name.length() == 0) { + display_string.concat(" MAC:"); + display_string.concat(mac); + } + else { + display_string.concat(" "); + display_string.concat(name); + } + + uint8_t temp_len = display_string.length(); + for (uint8_t i = 0; i < 40 - temp_len; i++) { + display_string.concat(" "); + } + + if (!display_obj.printing) { + display_obj.loading = true; + display_obj.display_buffer->add(display_string); + display_obj.loading = false; + } + #endif + + String wardrive_line = (String)advertisedDevice->getAddress().toString().c_str() + ",,[BLE]," + gps_obj.getDatetime() + ",0," + (String)advertisedDevice->getRSSI() + "," + gps_obj.getLat() + "," + gps_obj.getLon() + "," + gps_obj.getAlt() + "," + gps_obj.getAccuracy() + ",BLE\n"; + Serial.print(wardrive_line); + + wifi_scan_obj.save_mac(mac_char); + + if (do_save) + buffer_obj.append(wardrive_line); + + // To-do: + // track in a list like AirTag / Flipper, if you want + // (struct FlockBattery { String mac; String name; String serial; int rssi; uint32_t last_seen; }; etc.) + } + } + #endif + } else if (wifi_scan_obj.currentScanMode == BT_SCAN_SIMPLE) { wifi_scan_obj.bt_frames++; } @@ -1229,6 +1403,7 @@ void WiFiScan::StartScan(uint8_t scan_mode, uint16_t color) (scan_mode == BT_SCAN_AIRTAG_MON) || (scan_mode == BT_SCAN_FLIPPER) || (scan_mode == BT_SCAN_FLOCK) || + (scan_mode == BT_SCAN_FLOCK_WARDRIVE) || (scan_mode == BT_SCAN_ANALYZER) || (scan_mode == BT_SCAN_SIMPLE) || (scan_mode == BT_SCAN_SIMPLE_TWO)) { @@ -1552,6 +1727,7 @@ void WiFiScan::StopScan(uint8_t scan_mode) (currentScanMode == BT_SCAN_AIRTAG_MON) || (currentScanMode == BT_SCAN_FLIPPER) || (currentScanMode == BT_SCAN_FLOCK) || + (currentScanMode == BT_SCAN_FLOCK_WARDRIVE) || (currentScanMode == BT_ATTACK_SOUR_APPLE) || (currentScanMode == BT_ATTACK_SWIFTPAIR_SPAM) || (currentScanMode == BT_ATTACK_SPAM_ALL) || @@ -1659,6 +1835,15 @@ bool WiFiScan::mac_cmp(struct mac_addr addr1, struct mac_addr addr2) { return true; } +#ifdef HAS_BT + void WiFiScan::copyNimbleMac(const BLEAddress &addr, unsigned char out[6]) { + const uint8_t* bytes = addr.getNative(); // NimBLE gives MAC as uint8_t[6] + for (int i = 0; i < 6; i++) { + out[i] = bytes[i]; + } + } +#endif + bool WiFiScan::seen_mac(unsigned char* mac) { //Return true if this MAC address is in the recently seen array. @@ -4014,7 +4199,7 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color) NimBLEDevice::setScanDuplicateCacheSize(0); } - if (scan_mode == BT_SCAN_FLOCK) + if ((scan_mode == BT_SCAN_FLOCK) || (scan_mode == BT_SCAN_FLOCK_WARDRIVE)) NimBLEDevice::setScanDuplicateCacheSize(0); if ((scan_mode == BT_SCAN_SIMPLE) || (scan_mode == BT_SCAN_SIMPLE_TWO)) @@ -4027,6 +4212,7 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color) (scan_mode == BT_SCAN_AIRTAG_MON) || (scan_mode == BT_SCAN_FLIPPER) || (scan_mode == BT_SCAN_FLOCK) || + (scan_mode == BT_SCAN_FLOCK_WARDRIVE) || (scan_mode == BT_SCAN_SIMPLE) || (scan_mode == BT_SCAN_SIMPLE_TWO)) { @@ -4048,6 +4234,8 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color) display_obj.tft.drawCentreString("Flipper Sniff", TFT_WIDTH / 2, 16, 2); else if (scan_mode == BT_SCAN_FLOCK) display_obj.tft.drawCentreString("Flock Sniff", TFT_WIDTH / 2, 16, 2); + else if (scan_mode == BT_SCAN_FLOCK_WARDRIVE) + display_obj.tft.drawCentreString("Flock Wardrive", TFT_WIDTH / 2, 16, 2); else if (scan_mode == BT_SCAN_SIMPLE) display_obj.tft.drawCentreString("Simple Sniff", TFT_WIDTH / 2, 16, 2); else if (scan_mode == BT_SCAN_SIMPLE_TWO) @@ -4072,6 +4260,9 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color) else if (scan_mode == BT_SCAN_FLOCK) { pBLEScan->setAdvertisedDeviceCallbacks(new bluetoothScanAllCallback(), true); } + else if (scan_mode == BT_SCAN_FLOCK_WARDRIVE) { + pBLEScan->setAdvertisedDeviceCallbacks(new bluetoothScanAllCallback(), true); + } else if (scan_mode == BT_SCAN_SIMPLE) { pBLEScan->setAdvertisedDeviceCallbacks(new bluetoothScanAllCallback(), true); } @@ -4079,7 +4270,7 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color) pBLEScan->setAdvertisedDeviceCallbacks(new bluetoothScanAllCallback(), false); } } - else if ((scan_mode == BT_SCAN_WAR_DRIVE) || (scan_mode == BT_SCAN_WAR_DRIVE_CONT)) { + else if ((scan_mode == BT_SCAN_WAR_DRIVE) || (scan_mode == BT_SCAN_WAR_DRIVE_CONT) || (scan_mode == BT_SCAN_FLOCK_WARDRIVE)) { #ifdef HAS_GPS if (gps_obj.getGpsModuleStatus()) { if (scan_mode == BT_SCAN_WAR_DRIVE) { @@ -4088,6 +4279,9 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color) else if (scan_mode == BT_SCAN_WAR_DRIVE_CONT) { startLog("bt_wardrive_cont"); } + else if (scan_mode == BT_SCAN_FLOCK_WARDRIVE) { + startLog("flock_wardrive"); + } 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); } else { @@ -4160,7 +4354,12 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color) pBLEScan->setInterval(100); pBLEScan->setWindow(99); // less or equal setInterval value pBLEScan->setMaxResults(0); - if ((scan_mode == BT_SCAN_WAR_DRIVE_CONT) || (scan_mode == BT_SCAN_ANALYZER) || (scan_mode == BT_SCAN_FLOCK) || (scan_mode == BT_SCAN_SIMPLE) || (scan_mode == BT_SCAN_SIMPLE_TWO)) + if ((scan_mode == BT_SCAN_WAR_DRIVE_CONT) || + (scan_mode == BT_SCAN_ANALYZER) || + (scan_mode == BT_SCAN_FLOCK) || + (scan_mode == BT_SCAN_SIMPLE) || + (scan_mode == BT_SCAN_SIMPLE_TWO) || + (scan_mode == BT_SCAN_FLOCK_WARDRIVE)) pBLEScan->setDuplicateFilter(false); pBLEScan->start(0, scanCompleteCB, false); Serial.println("Started BLE Scan"); @@ -8912,7 +9111,12 @@ void WiFiScan::main(uint32_t currentTime) channelHop(); } } - else if (currentScanMode == BT_SCAN_FLOCK) { + else if ((currentScanMode == BT_SCAN_FLOCK) || + (currentScanMode == BT_SCAN_FLOCK_WARDRIVE) || + (currentScanMode == BT_SCAN_WAR_DRIVE) || + (currentScanMode == BT_SCAN_WAR_DRIVE_CONT) || + (currentScanMode == BT_SCAN_FLIPPER) || + (currentScanMode == BT_SCAN_AIRTAG)) { if (currentTime - initTime >= 5000) { initTime = millis(); #ifdef HAS_BT @@ -8957,6 +9161,13 @@ void WiFiScan::main(uint32_t currentTime) if (currentTime - initTime >= this->channel_hop_delay * 500) { initTime = millis(); + #ifdef HAS_BT + pBLEScan->stop(); + delay(5); + pBLEScan->clearResults(); + pBLEScan->start(0, scanCompleteCB, false); + #endif + #ifdef HAS_SCREEN display_obj.tft.fillRect(0, (STATUS_BAR_WIDTH * 2) + 1 + EXT_BUTTON_WIDTH, @@ -9004,6 +9215,15 @@ void WiFiScan::main(uint32_t currentTime) else if ((currentScanMode == WIFI_SCAN_CHAN_ANALYZER) || (currentScanMode == BT_SCAN_ANALYZER)) { this->channelAnalyzerLoop(currentTime); + + if (currentScanMode == BT_SCAN_ANALYZER) { + #ifdef HAS_BT + pBLEScan->stop(); + delay(5); + pBLEScan->clearResults(); + pBLEScan->start(0, scanCompleteCB, false); + #endif + } } else if (currentScanMode == WIFI_SCAN_CHAN_ACT) { this->channelActivityLoop(currentTime); diff --git a/esp32_marauder/WiFiScan.h b/esp32_marauder/WiFiScan.h index f4b4e02..16afa12 100644 --- a/esp32_marauder/WiFiScan.h +++ b/esp32_marauder/WiFiScan.h @@ -141,6 +141,7 @@ #define BT_SCAN_FLOCK 72 #define BT_SCAN_SIMPLE 73 #define BT_SCAN_SIMPLE_TWO 74 +#define BT_SCAN_FLOCK_WARDRIVE 75 #define WIFI_ATTACK_FUNNY_BEACON 99 @@ -534,9 +535,7 @@ class WiFiScan bool beaconHasWPS(const uint8_t* payload, int len); uint8_t getSecurityType(const uint8_t* beacon, uint16_t len); void addAnalyzerValue(int16_t value, int rssi_avg, int16_t target_array[], int array_size); - bool seen_mac(unsigned char* mac); bool mac_cmp(struct mac_addr addr1, struct mac_addr addr2); - void save_mac(unsigned char* mac); void clearMacHistory(); void executeWarDrive(); void executeSourApple(); @@ -720,6 +719,11 @@ class WiFiScan #ifdef HAS_SCREEN int8_t checkAnalyzerButtons(uint32_t currentTime); #endif + bool seen_mac(unsigned char* mac); + void save_mac(unsigned char* mac); + #ifdef HAS_BT + void copyNimbleMac(const BLEAddress &addr, unsigned char out[6]); + #endif bool filterActive(); bool RunGPSInfo(bool tracker = false, bool display = true, bool poi = false); void logPoint(String lat, String lon, float alt, String datetime, bool poi = false); diff --git a/pictures/icons/flock_22.bmp b/pictures/icons/flock_22.bmp new file mode 100644 index 0000000..00515c1 Binary files /dev/null and b/pictures/icons/flock_22.bmp differ diff --git a/pictures/xbm/flock_22.xbm b/pictures/xbm/flock_22.xbm new file mode 100644 index 0000000..9b7198a --- /dev/null +++ b/pictures/xbm/flock_22.xbm @@ -0,0 +1,9 @@ +#define 301f3c12779740a0f7d41e7437ba582eplcec9cBSpGahPig_width 22 +#define 301f3c12779740a0f7d41e7437ba582eplcec9cBSpGahPig_height 22 +static char 301f3c12779740a0f7d41e7437ba582eplcec9cBSpGahPig_bits[] = { + 0xFF, 0xFF, 0x3F, 0xFF, 0xE0, 0x3F, 0x3F, 0x9F, 0x3F, 0xBF, 0xBF, 0x3F, + 0xDF, 0x71, 0x3F, 0xDF, 0x6E, 0x3F, 0xDF, 0x6E, 0x3F, 0xDF, 0x6E, 0x3F, + 0xDF, 0x71, 0x3F, 0xDF, 0x7B, 0x3F, 0xDF, 0x7F, 0x3F, 0xDF, 0x7F, 0x3F, + 0xDF, 0x7F, 0x3F, 0xBF, 0xBF, 0x3F, 0xBF, 0xBB, 0x3F, 0x3F, 0x9B, 0x3F, + 0x7F, 0xDF, 0x3F, 0x7F, 0xDF, 0x3F, 0x7F, 0xDF, 0x3F, 0xFF, 0xE0, 0x3F, + 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, };