Skip to content

Commit

Permalink
Add wardriving commands
Browse files Browse the repository at this point in the history
  • Loading branch information
justcallmekoko committed Oct 5, 2023
1 parent bbe9eea commit 18ca616
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 10 deletions.
73 changes: 64 additions & 9 deletions esp32_marauder/CommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ void CommandLine::runCommand(String input) {
Serial.println(HELP_SNIFF_DEAUTH_CMD);
Serial.println(HELP_SNIFF_PMKID_CMD);
Serial.println(HELP_STOPSCAN_CMD);
Serial.println(HELP_WARDRIVE_CMD);
#ifdef HAS_GPS
Serial.println(HELP_WARDRIVE_CMD);
#endif

// WiFi attack
Serial.println(HELP_ATTACK_CMD);
Expand All @@ -245,8 +247,13 @@ void CommandLine::runCommand(String input) {
Serial.println(HELP_SSID_CMD_B);

// Bluetooth sniff/scan
Serial.println(HELP_BT_SNIFF_CMD);
Serial.println(HELP_BT_SKIM_CMD);
#ifdef HAS_BT
Serial.println(HELP_BT_SNIFF_CMD);
#ifdef HAS_GPS
Serial.println(HELP_BT_WARDRIVE_CMD);
#endif
Serial.println(HELP_BT_SKIM_CMD);
#endif
Serial.println(HELP_FOOT);
return;
}
Expand Down Expand Up @@ -447,13 +454,28 @@ void CommandLine::runCommand(String input) {
else if (cmd_args.get(0) == WARDRIVE_CMD) {
#ifdef HAS_GPS
if (gps_obj.getGpsModuleStatus()) {
Serial.println("Starting Wardrive. Stop with " + (String)STOPSCAN_CMD);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(WIFI_SCAN_WAR_DRIVE, TFT_GREEN);
int sta_sw = this->argSearch(&cmd_args, "-s");

if (sta_sw == -1) {
Serial.println("Starting Wardrive. Stop with " + (String)STOPSCAN_CMD);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(WIFI_SCAN_WAR_DRIVE, TFT_GREEN);
}
else {Serial.println("Starting Station Wardrive. Stop with " + (String)STOPSCAN_CMD);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(WIFI_SCAN_STATION_WAR_DRIVE, TFT_GREEN);
}
}
else
Serial.println("GPS Module not detected");
#else
Serial.println("GPS not supported");
#endif
}
// AP Scan
Expand Down Expand Up @@ -749,6 +771,39 @@ void CommandLine::runCommand(String input) {
Serial.println("Bluetooth not supported");
#endif
}
// Wardrive
else if (cmd_args.get(0) == BT_WARDRIVE_CMD) {
#ifdef HAS_BT
#ifdef HAS_GPS
if (gps_obj.getGpsModuleStatus()) {
int cont_sw = this->argSearch(&cmd_args, "-c");

if (cont_sw == -1) {
Serial.println("Starting BT Wardrive. Stop with " + (String)STOPSCAN_CMD);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(BT_SCAN_WAR_DRIVE, TFT_GREEN);
}
else {Serial.println("Starting Continuous BT Wardrive. Stop with " + (String)STOPSCAN_CMD);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(BT_SCAN_WAR_DRIVE_CONT, TFT_GREEN);
}
}
else
Serial.println("GPS Module not detected");
#else
Serial.println("GPS not supported");
#endif
#else
Serial.println("Bluetooth not supported");
#endif

}
// Bluetooth CC Skimmer scan
else if (cmd_args.get(0) == BT_SKIM_CMD) {
#ifdef HAS_BT
Expand Down
4 changes: 3 additions & 1 deletion esp32_marauder/CommandLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const char PROGMEM SSID_CMD[] = "ssid";

// Bluetooth sniff/scan
const char PROGMEM BT_SNIFF_CMD[] = "sniffbt";
const char PROGMEM BT_WARDRIVE_CMD[] = "btwardrive";
const char PROGMEM BT_SKIM_CMD[] = "sniffskim";


Expand Down Expand Up @@ -106,7 +107,7 @@ const char PROGMEM HELP_SNIFF_ESP_CMD[] = "sniffesp";
const char PROGMEM HELP_SNIFF_DEAUTH_CMD[] = "sniffdeauth";
const char PROGMEM HELP_SNIFF_PMKID_CMD[] = "sniffpmkid [-c <channel>][-d][-l]";
const char PROGMEM HELP_STOPSCAN_CMD[] = "stopscan";
const char PROGMEM HELP_WARDRIVE_CMD[] = "wardrive";
const char PROGMEM HELP_WARDRIVE_CMD[] = "wardrive [-s]";

// WiFi attack
const char PROGMEM HELP_ATTACK_CMD[] = "attack -t <beacon [-l/-r/-a]/deauth [-c]/[-s <src mac>] [-d <dst mac>]/probe/rickroll>";
Expand All @@ -121,6 +122,7 @@ const char PROGMEM HELP_SSID_CMD_B[] = "ssid -r <index>";

// Bluetooth sniff/scan
const char PROGMEM HELP_BT_SNIFF_CMD[] = "sniffbt";
const char PROGMEM HELP_BT_WARDRIVE_CMD[] = "btwardrive [-c]";
const char PROGMEM HELP_BT_SKIM_CMD[] = "sniffskim";
const char PROGMEM HELP_FOOT[] = "==================================";

Expand Down

0 comments on commit 18ca616

Please sign in to comment.