mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-12 15:50:36 -08:00
@@ -772,6 +772,7 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
(wifi_scan_obj.currentScanMode == ESP_UPDATE) ||
|
||||
(wifi_scan_obj.currentScanMode == SHOW_INFO) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_GPS_DATA) ||
|
||||
(wifi_scan_obj.currentScanMode == GPS_POI) ||
|
||||
(wifi_scan_obj.currentScanMode == GPS_TRACKER) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_GPS_NMEA)) {
|
||||
if (wifi_scan_obj.orient_display) {
|
||||
@@ -839,6 +840,7 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
(wifi_scan_obj.currentScanMode != ESP_UPDATE) &&
|
||||
(wifi_scan_obj.currentScanMode != SHOW_INFO) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_GPS_DATA) &&
|
||||
(wifi_scan_obj.currentScanMode != GPS_POI) &&
|
||||
(wifi_scan_obj.currentScanMode != GPS_TRACKER) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_GPS_NMEA))
|
||||
{
|
||||
@@ -922,6 +924,7 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
(wifi_scan_obj.currentScanMode != ESP_UPDATE) &&
|
||||
(wifi_scan_obj.currentScanMode != SHOW_INFO) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_GPS_DATA) &&
|
||||
(wifi_scan_obj.currentScanMode != GPS_POI) &&
|
||||
(wifi_scan_obj.currentScanMode != GPS_TRACKER) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_GPS_NMEA))
|
||||
{
|
||||
@@ -1960,6 +1963,8 @@ void MenuFunctions::RunSetup()
|
||||
evilPortalMenu.list = new LinkedList<MenuNode>();
|
||||
ssidsMenu.list = new LinkedList<MenuNode>();
|
||||
|
||||
gpsPOIMenu.list = new LinkedList<MenuNode>();
|
||||
|
||||
// Work menu names
|
||||
mainMenu.name = text_table1[6];
|
||||
wifiMenu.name = text_table1[7];
|
||||
@@ -2017,6 +2022,8 @@ void MenuFunctions::RunSetup()
|
||||
evilPortalMenu.name = "Evil Portal";
|
||||
ssidsMenu.name = "SSIDs";
|
||||
|
||||
gpsPOIMenu.name = "GPS POI";
|
||||
|
||||
// Build Main Menu
|
||||
mainMenu.parentMenu = NULL;
|
||||
this->addNodes(&mainMenu, text_table1[7], TFTGREEN, NULL, WIFI, [this]() {
|
||||
@@ -3294,6 +3301,37 @@ void MenuFunctions::RunSetup()
|
||||
wifi_scan_obj.StartScan(GPS_TRACKER, TFT_CYAN);
|
||||
});
|
||||
|
||||
this->addNodes(&deviceMenu, "GPS POI", TFTCYAN, NULL, GPS_MENU, [this]() {
|
||||
wifi_scan_obj.StartScan(GPS_POI, TFT_CYAN);
|
||||
wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF;
|
||||
this->changeMenu(&gpsPOIMenu);
|
||||
});
|
||||
|
||||
// GPS POI Menu
|
||||
gpsPOIMenu.parentMenu = &deviceMenu;
|
||||
this->addNodes(&gpsPOIMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
|
||||
wifi_scan_obj.currentScanMode = GPS_POI;
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
|
||||
this->changeMenu(gpsPOIMenu.parentMenu);
|
||||
});
|
||||
this->addNodes(&gpsPOIMenu, "Mark POI", TFTCYAN, NULL, GPS_MENU, [this]() {
|
||||
/*if (wifi_scan_obj.currentScanMode != GPS_POI) {
|
||||
wifi_scan_obj.currentScanMode = GPS_POI;
|
||||
wifi_scan_obj.StartScan(GPS_POI, TFT_CYAN);
|
||||
}*/
|
||||
wifi_scan_obj.currentScanMode = GPS_POI;
|
||||
display_obj.tft.setCursor(0, TFT_HEIGHT / 2);
|
||||
display_obj.clearScreen();
|
||||
if (wifi_scan_obj.RunGPSInfo(true, false))
|
||||
display_obj.showCenterText("POI Logged", TFT_HEIGHT / 2);
|
||||
else
|
||||
display_obj.showCenterText("POI Log Failed", TFT_HEIGHT / 2);
|
||||
wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF;
|
||||
delay(2000);
|
||||
//wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
|
||||
this->changeMenu(&gpsPOIMenu);
|
||||
});
|
||||
|
||||
// GPS Info Menu
|
||||
gpsInfoMenu.parentMenu = &deviceMenu;
|
||||
this->addNodes(&gpsInfoMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
|
||||
|
||||
@@ -214,6 +214,8 @@ class MenuFunctions
|
||||
|
||||
Menu evilPortalMenu;
|
||||
|
||||
Menu gpsPOIMenu;
|
||||
|
||||
static void lv_tick_handler();
|
||||
|
||||
// Menu icons
|
||||
|
||||
@@ -1001,7 +1001,10 @@ void WiFiScan::StartScan(uint8_t scan_mode, uint16_t color)
|
||||
#endif
|
||||
}
|
||||
else if (scan_mode == GPS_TRACKER) {
|
||||
RunSetupGPSTracker();
|
||||
RunSetupGPSTracker(scan_mode);
|
||||
}
|
||||
else if (scan_mode == GPS_POI) {
|
||||
RunSetupGPSTracker(scan_mode);
|
||||
}
|
||||
else if (scan_mode == WIFI_PING_SCAN)
|
||||
RunPingScan(scan_mode, color);
|
||||
@@ -1243,7 +1246,8 @@ void WiFiScan::StopScan(uint8_t scan_mode)
|
||||
evil_portal_obj.has_ap = false;
|
||||
}
|
||||
|
||||
else if ((currentScanMode == GPS_TRACKER)) {
|
||||
else if ((currentScanMode == GPS_TRACKER) ||
|
||||
(currentScanMode == GPS_POI)) {
|
||||
this->writeFooter();
|
||||
}
|
||||
|
||||
@@ -2241,13 +2245,18 @@ void WiFiScan::writeFooter() {
|
||||
buffer_obj.append("</gpx>\n");
|
||||
}
|
||||
|
||||
void WiFiScan::RunSetupGPSTracker() {
|
||||
this->startGPX("tracker");
|
||||
void WiFiScan::RunSetupGPSTracker(uint8_t scan_mode) {
|
||||
if (scan_mode == GPS_TRACKER)
|
||||
this->startGPX("tracker");
|
||||
else if (scan_mode == GPS_POI)
|
||||
this->startGPX("poi");
|
||||
|
||||
this->writeHeader();
|
||||
initTime = millis();
|
||||
}
|
||||
|
||||
void WiFiScan::RunGPSInfo(bool tracker) {
|
||||
bool WiFiScan::RunGPSInfo(bool tracker, bool display) {
|
||||
bool return_val = true;
|
||||
#ifdef HAS_GPS
|
||||
String text=gps_obj.getText();
|
||||
|
||||
@@ -2255,55 +2264,63 @@ void WiFiScan::RunGPSInfo(bool tracker) {
|
||||
if (gps_obj.getFixStatus()) {
|
||||
this->logPoint(gps_obj.getLat(), gps_obj.getLon(), gps_obj.getAlt(), gps_obj.getDatetime());
|
||||
}
|
||||
else
|
||||
return_val = false;
|
||||
}
|
||||
|
||||
Serial.println("Refreshing GPS Data on screen...");
|
||||
#ifdef HAS_SCREEN
|
||||
if (display) {
|
||||
Serial.println("Refreshing GPS Data on screen...");
|
||||
#ifdef HAS_SCREEN
|
||||
|
||||
// Get screen position ready
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setFreeFont(NULL);
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.setTextColor(TFT_CYAN);
|
||||
// Get screen position ready
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setFreeFont(NULL);
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.setTextColor(TFT_CYAN);
|
||||
|
||||
// Clean up screen first
|
||||
//display_obj.tft.fillRect(0, 0, 240, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
display_obj.tft.fillRect(0, (SCREEN_HEIGHT / 3) - 6, SCREEN_WIDTH, SCREEN_HEIGHT - ((SCREEN_HEIGHT / 3) - 6), TFT_BLACK);
|
||||
// Clean up screen first
|
||||
//display_obj.tft.fillRect(0, 0, 240, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
display_obj.tft.fillRect(0, (SCREEN_HEIGHT / 3) - 6, SCREEN_WIDTH, SCREEN_HEIGHT - ((SCREEN_HEIGHT / 3) - 6), TFT_BLACK);
|
||||
|
||||
// Print the GPS data: 3
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
// Print the GPS data: 3
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
if (gps_obj.getFixStatus())
|
||||
display_obj.tft.println(" Good Fix: Yes");
|
||||
else {
|
||||
return_val = false;
|
||||
display_obj.tft.println(" Good Fix: No");
|
||||
}
|
||||
|
||||
if(text != "") display_obj.tft.println(" Text: " + text);
|
||||
|
||||
display_obj.tft.println("Satellites: " + gps_obj.getNumSatsString());
|
||||
display_obj.tft.println(" Accuracy: " + (String)gps_obj.getAccuracy());
|
||||
display_obj.tft.println(" Latitude: " + gps_obj.getLat());
|
||||
display_obj.tft.println(" Longitude: " + gps_obj.getLon());
|
||||
display_obj.tft.println(" Altitude: " + (String)gps_obj.getAlt());
|
||||
display_obj.tft.println(" Datetime: " + gps_obj.getDatetime());
|
||||
#endif
|
||||
|
||||
// Display to serial
|
||||
Serial.println("==== GPS Data ====");
|
||||
if (gps_obj.getFixStatus())
|
||||
display_obj.tft.println(" Good Fix: Yes");
|
||||
Serial.println(" Good Fix: Yes");
|
||||
else
|
||||
display_obj.tft.println(" Good Fix: No");
|
||||
Serial.println(" Good Fix: No");
|
||||
|
||||
if(text != "") display_obj.tft.println(" Text: " + text);
|
||||
if(text != "") Serial.println(" Text: " + text);
|
||||
|
||||
display_obj.tft.println("Satellites: " + gps_obj.getNumSatsString());
|
||||
display_obj.tft.println(" Accuracy: " + (String)gps_obj.getAccuracy());
|
||||
display_obj.tft.println(" Latitude: " + gps_obj.getLat());
|
||||
display_obj.tft.println(" Longitude: " + gps_obj.getLon());
|
||||
display_obj.tft.println(" Altitude: " + (String)gps_obj.getAlt());
|
||||
display_obj.tft.println(" Datetime: " + gps_obj.getDatetime());
|
||||
#endif
|
||||
|
||||
// Display to serial
|
||||
Serial.println("==== GPS Data ====");
|
||||
if (gps_obj.getFixStatus())
|
||||
Serial.println(" Good Fix: Yes");
|
||||
else
|
||||
Serial.println(" Good Fix: No");
|
||||
|
||||
if(text != "") Serial.println(" Text: " + text);
|
||||
|
||||
Serial.println("Satellites: " + gps_obj.getNumSatsString());
|
||||
Serial.println(" Accuracy: " + (String)gps_obj.getAccuracy());
|
||||
Serial.println(" Latitude: " + gps_obj.getLat());
|
||||
Serial.println(" Longitude: " + gps_obj.getLon());
|
||||
Serial.println(" Altitude: " + (String)gps_obj.getAlt());
|
||||
Serial.println(" Datetime: " + gps_obj.getDatetime());
|
||||
Serial.println("Satellites: " + gps_obj.getNumSatsString());
|
||||
Serial.println(" Accuracy: " + (String)gps_obj.getAccuracy());
|
||||
Serial.println(" Latitude: " + gps_obj.getLat());
|
||||
Serial.println(" Longitude: " + gps_obj.getLon());
|
||||
Serial.println(" Altitude: " + (String)gps_obj.getAlt());
|
||||
Serial.println(" Datetime: " + gps_obj.getDatetime());
|
||||
}
|
||||
#endif
|
||||
|
||||
return return_val;
|
||||
}
|
||||
|
||||
void WiFiScan::RunGPSNmea() {
|
||||
@@ -8118,7 +8135,11 @@ void WiFiScan::pingScan(uint8_t scan_mode) {
|
||||
else if (scan_mode == WIFI_SCAN_SSH) {
|
||||
if (this->current_scan_ip != IPAddress(0, 0, 0, 0)) {
|
||||
this->current_scan_ip = getNextIP(this->current_scan_ip, this->subnet);
|
||||
if (this->singleARP(this->current_scan_ip)) {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (this->singleARP(this->current_scan_ip)) {
|
||||
#else
|
||||
if (this->isHostAlive(this->current_scan_ip)) {
|
||||
#endif
|
||||
Serial.println(this->current_scan_ip);
|
||||
this->portScan(scan_mode, 22);
|
||||
}
|
||||
@@ -8136,7 +8157,11 @@ void WiFiScan::pingScan(uint8_t scan_mode) {
|
||||
else if (scan_mode == WIFI_SCAN_TELNET) {
|
||||
if (this->current_scan_ip != IPAddress(0, 0, 0, 0)) {
|
||||
this->current_scan_ip = getNextIP(this->current_scan_ip, this->subnet);
|
||||
if (this->singleARP(this->current_scan_ip)) {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (this->singleARP(this->current_scan_ip)) {
|
||||
#else
|
||||
if (this->isHostAlive(this->current_scan_ip)) {
|
||||
#endif
|
||||
Serial.println(this->current_scan_ip);
|
||||
this->portScan(scan_mode, 23);
|
||||
}
|
||||
|
||||
@@ -129,6 +129,7 @@
|
||||
#define WIFI_ARP_SCAN 60
|
||||
#define WIFI_ATTACK_SLEEP 61
|
||||
#define WIFI_ATTACK_SLEEP_TARGETED 62
|
||||
#define GPS_POI 63
|
||||
|
||||
#define BASE_MULTIPLIER 4
|
||||
|
||||
@@ -541,7 +542,6 @@ class WiFiScan
|
||||
void broadcastCustomBeacon(uint32_t current_time, AccessPoint custom_ssid);
|
||||
void broadcastSetSSID(uint32_t current_time, const char* ESSID);
|
||||
void RunAPScan(uint8_t scan_mode, uint16_t color);
|
||||
void RunGPSInfo(bool tracker = false);
|
||||
void RunGPSNmea();
|
||||
void RunMimicFlood(uint8_t scan_mode, uint16_t color);
|
||||
void RunPwnScan(uint8_t scan_mode, uint16_t color);
|
||||
@@ -563,7 +563,6 @@ class WiFiScan
|
||||
void RunPortScanAll(uint8_t scan_mode, uint16_t color);
|
||||
bool checkMem();
|
||||
void parseBSSID(const char* bssidStr, uint8_t* bssid);
|
||||
void logPoint(String lat, String lon, float alt, String datetime);
|
||||
void writeHeader();
|
||||
void writeFooter();
|
||||
|
||||
@@ -676,6 +675,8 @@ class WiFiScan
|
||||
#ifdef HAS_SCREEN
|
||||
int8_t checkAnalyzerButtons(uint32_t currentTime);
|
||||
#endif
|
||||
bool RunGPSInfo(bool tracker = false, bool display = true);
|
||||
void logPoint(String lat, String lon, float alt, String datetime);
|
||||
void setMac();
|
||||
void renderRawStats();
|
||||
void renderPacketRate();
|
||||
@@ -717,7 +718,7 @@ class WiFiScan
|
||||
void RunLoadAPList();
|
||||
void RunSaveATList(bool save_as = true);
|
||||
void RunLoadATList();
|
||||
void RunSetupGPSTracker();
|
||||
void RunSetupGPSTracker(uint8_t scan_mode);
|
||||
void channelHop();
|
||||
uint8_t currentScanMode = 0;
|
||||
void main(uint32_t currentTime);
|
||||
@@ -748,58 +749,5 @@ class WiFiScan
|
||||
static void pineScanSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type); // Pineapple
|
||||
static int extractPineScanChannel(const uint8_t* payload, int len); // Pineapple
|
||||
static void multiSSIDSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type); // MultiSSID
|
||||
|
||||
/*#ifdef HAS_BT
|
||||
enum EBLEPayloadType
|
||||
{
|
||||
Microsoft,
|
||||
Apple,
|
||||
Samsung,
|
||||
Google
|
||||
};
|
||||
|
||||
struct BLEData
|
||||
{
|
||||
NimBLEAdvertisementData AdvData;
|
||||
NimBLEAdvertisementData ScanData;
|
||||
};
|
||||
|
||||
struct WatchModel
|
||||
{
|
||||
uint8_t value;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
WatchModel* watch_models = nullptr;
|
||||
|
||||
const WatchModel watch_models[] = {
|
||||
{0x1A, "Fallback Watch"},
|
||||
{0x01, "White Watch4 Classic 44m"},
|
||||
{0x02, "Black Watch4 Classic 40m"},
|
||||
{0x03, "White Watch4 Classic 40m"},
|
||||
{0x04, "Black Watch4 44mm"},
|
||||
{0x05, "Silver Watch4 44mm"},
|
||||
{0x06, "Green Watch4 44mm"},
|
||||
{0x07, "Black Watch4 40mm"},
|
||||
{0x08, "White Watch4 40mm"},
|
||||
{0x09, "Gold Watch4 40mm"},
|
||||
{0x0A, "French Watch4"},
|
||||
{0x0B, "French Watch4 Classic"},
|
||||
{0x0C, "Fox Watch5 44mm"},
|
||||
{0x11, "Black Watch5 44mm"},
|
||||
{0x12, "Sapphire Watch5 44mm"},
|
||||
{0x13, "Purpleish Watch5 40mm"},
|
||||
{0x14, "Gold Watch5 40mm"},
|
||||
{0x15, "Black Watch5 Pro 45mm"},
|
||||
{0x16, "Gray Watch5 Pro 45mm"},
|
||||
{0x17, "White Watch5 44mm"},
|
||||
{0x18, "White & Black Watch5"},
|
||||
{0x1B, "Black Watch6 Pink 40mm"},
|
||||
{0x1C, "Gold Watch6 Gold 40mm"},
|
||||
{0x1D, "Silver Watch6 Cyan 44mm"},
|
||||
{0x1E, "Black Watch6 Classic 43m"},
|
||||
{0x20, "Green Watch6 Classic 43m"},
|
||||
};
|
||||
#endif*/
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user