mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-12 07:40:58 -08:00
and GPS POI and port scan commands
This commit is contained in:
@@ -217,6 +217,8 @@ void CommandLine::runCommand(String input) {
|
||||
Serial.println(HELP_GPS_DATA_CMD);
|
||||
Serial.println(HELP_GPS_CMD);
|
||||
Serial.println(HELP_NMEA_CMD);
|
||||
Serial.println(HELP_GPS_POI_CMD);
|
||||
Serial.println(HELP_GPS_TRACKER_CMD);
|
||||
|
||||
// WiFi sniff/scan
|
||||
Serial.println(HELP_EVIL_PORTAL_CMD);
|
||||
@@ -1242,14 +1244,59 @@ void CommandLine::runCommand(String input) {
|
||||
wifi_scan_obj.StartScan(WIFI_ARP_SCAN, TFT_CYAN);
|
||||
}
|
||||
|
||||
// GPS POI
|
||||
if (cmd_args.get(0) == GPS_POI_CMD) {
|
||||
#ifdef HAS_GPS
|
||||
int start_sw = this->argSearch(&cmd_args, "-s");
|
||||
int mark_sw = this->argSearch(&cmd_args, "-m");
|
||||
int end_sw = this->argSearch(&cmd_args, "-e");
|
||||
|
||||
if (start_sw != -1) {
|
||||
wifi_scan_obj.StartScan(GPS_POI, TFT_CYAN);
|
||||
wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF;
|
||||
#ifdef HAS_SCREEN
|
||||
menu_function_obj.changeMenu(&menu_function_obj.gpsPOIMenu);
|
||||
#endif
|
||||
}
|
||||
else if (mark_sw != -1) {
|
||||
wifi_scan_obj.currentScanMode = GPS_POI;
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.setCursor(0, TFT_HEIGHT / 2);
|
||||
display_obj.clearScreen();
|
||||
#endif
|
||||
if (wifi_scan_obj.RunGPSInfo(true, false, true)) {
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.showCenterText("POI Logged", TFT_HEIGHT / 2);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.showCenterText("POI Log Failed", TFT_HEIGHT / 2);
|
||||
#endif
|
||||
}
|
||||
wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF;
|
||||
delay(2000);
|
||||
//wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
|
||||
menu_function_obj.changeMenu(&menu_function_obj.gpsPOIMenu);
|
||||
}
|
||||
else if (end_sw != -1) {
|
||||
wifi_scan_obj.currentScanMode = GPS_POI;
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
|
||||
#ifdef HAS_SCREEN
|
||||
menu_function_obj.changeMenu(menu_function_obj.gpsPOIMenu.parentMenu);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
Serial.println("Your hardware doesn't have GPS, silly");
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Port Scan
|
||||
if (cmd_args.get(0) == PORT_SCAN_CMD) {
|
||||
int all_sw = this->argSearch(&cmd_args, "-a");
|
||||
int ip_sw = this->argSearch(&cmd_args, "-t");
|
||||
int port_sw = this->argSearch(&cmd_args, "-p");
|
||||
|
||||
if (port_sw != -1)
|
||||
int ip_index = cmd_args.get(ip_sw + 1).toInt();
|
||||
int port_sw = this->argSearch(&cmd_args, "-s");
|
||||
|
||||
// Check they specified ip index
|
||||
if (ip_sw != -1) {
|
||||
@@ -1275,7 +1322,36 @@ void CommandLine::runCommand(String input) {
|
||||
}
|
||||
}
|
||||
else if (port_sw != -1) {
|
||||
|
||||
String port_name = cmd_args.get(port_sw + 1);
|
||||
port_name.toUpperCase();
|
||||
uint8_t target_mode = 0;
|
||||
if (port_name == "SSH")
|
||||
target_mode = WIFI_SCAN_SSH;
|
||||
else if (port_name == "TELNET")
|
||||
target_mode = WIFI_SCAN_TELNET;
|
||||
else if (port_name == "DNS")
|
||||
target_mode = WIFI_SCAN_DNS;
|
||||
else if (port_name == "HTTP")
|
||||
target_mode = WIFI_SCAN_HTTP;
|
||||
else if (port_name == "SMTP")
|
||||
target_mode = WIFI_SCAN_SMTP;
|
||||
else if (port_name == "HTTPS")
|
||||
target_mode = WIFI_SCAN_HTTPS;
|
||||
else if (port_name == "RDP")
|
||||
target_mode = WIFI_SCAN_RDP;
|
||||
|
||||
if (target_mode != 0) {
|
||||
Serial.println("Starting port scan for service " + port_name);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(target_mode, TFT_CYAN);
|
||||
}
|
||||
else {
|
||||
Serial.println("You did not specify a supported service");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Serial.println("You did not specify an IP index");
|
||||
|
||||
@@ -53,6 +53,8 @@ const char PROGMEM LED_CMD[] = "led";
|
||||
const char PROGMEM GPS_DATA_CMD[] = "gpsdata";
|
||||
const char PROGMEM GPS_CMD[] = "gps";
|
||||
const char PROGMEM NMEA_CMD[] = "nmea";
|
||||
const char PROGMEM GPS_POI_CMD[] = "gpspoi";
|
||||
const char PROGMEM GPS_TRACKER_CMD[] = "gpstracker";
|
||||
|
||||
// WiFi sniff/scan
|
||||
const char PROGMEM EVIL_PORTAL_CMD[] = "evilportal";
|
||||
@@ -119,7 +121,9 @@ const char PROGMEM HELP_SETTINGS_CMD[] = "settings [-s <setting> enable/disable>
|
||||
const char PROGMEM HELP_LS_CMD[] = "ls <directory>";
|
||||
const char PROGMEM HELP_LED_CMD[] = "led -s <hex color>/-p <rainbow>";
|
||||
const char PROGMEM HELP_GPS_DATA_CMD[] = "gpsdata";
|
||||
const char PROGMEM HELP_GPS_CMD[] = "gps [-g] <fix/sat/lon/lat/alt/date/accuracy/text/nmea>\r\n [-n] <native/all/gps/glonass/galileo/navic/qzss/beidou>\r\n [-b = use BD vs GB for beidou]";
|
||||
const char PROGMEM HELP_GPS_CMD[] = "gps [-t] [-g] <fix/sat/lon/lat/alt/date/accuracy/text/nmea>\r\n [-n] <native/all/gps/glonass/galileo/navic/qzss/beidou>\r\n [-b = use BD vs GB for beidou]";
|
||||
const char PROGMEM HELP_GPS_POI_CMD[] = "gpspoi -s/-m/-e";
|
||||
const char PROGMEM HELP_GPS_TRACKER_CMD[] = "gpstracker -c <start/stop>";
|
||||
const char PROGMEM HELP_NMEA_CMD[] = "nmea";
|
||||
|
||||
// WiFi sniff/scan
|
||||
@@ -142,7 +146,7 @@ const char PROGMEM HELP_SNIFF_PMKID_CMD[] = "sniffpmkid [-c <channel>][-d][-l]";
|
||||
const char PROGMEM HELP_STOPSCAN_CMD[] = "stopscan [-f]";
|
||||
const char PROGMEM HELP_WARDRIVE_CMD[] = "wardrive [-s]";
|
||||
const char PROGMEM HELP_PING_CMD[] = "pingscan";
|
||||
const char PROGMEM HELP_PORT_SCAN_CMD[] = "portscan [-a] -t <ip index>";
|
||||
const char PROGMEM HELP_PORT_SCAN_CMD[] = "portscan [-a -t <ip index>]/[-s <ssh/telnet/dns/http/smtp/https/rdp>]";
|
||||
const char PROGMEM HELP_ARP_SCAN_CMD[] = "arpscan [-f]";
|
||||
|
||||
// WiFi attack
|
||||
|
||||
@@ -218,8 +218,6 @@ class MenuFunctions
|
||||
|
||||
Menu evilPortalMenu;
|
||||
|
||||
Menu gpsPOIMenu;
|
||||
|
||||
static void lv_tick_handler();
|
||||
|
||||
// Menu icons
|
||||
@@ -271,6 +269,7 @@ class MenuFunctions
|
||||
#ifdef HAS_GPS
|
||||
// GPS Menu
|
||||
Menu gpsInfoMenu;
|
||||
Menu gpsPOIMenu;
|
||||
#endif
|
||||
|
||||
Menu infoMenu;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
//#define MARAUDER_CARDPUTER
|
||||
//// END BOARD TARGETS
|
||||
|
||||
#define MARAUDER_VERSION "v1.8.6"
|
||||
#define MARAUDER_VERSION "v1.8.7"
|
||||
|
||||
#define GRAPH_REFRESH 100
|
||||
|
||||
|
||||
Reference in New Issue
Block a user