mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-23 15:38:14 -08:00
Add commands for Karma
This commit is contained in:
@@ -220,6 +220,7 @@ void CommandLine::runCommand(String input) {
|
|||||||
|
|
||||||
// WiFi sniff/scan
|
// WiFi sniff/scan
|
||||||
Serial.println(HELP_EVIL_PORTAL_CMD);
|
Serial.println(HELP_EVIL_PORTAL_CMD);
|
||||||
|
Serial.println(HELP_KARMA_CMD);
|
||||||
Serial.println(HELP_PACKET_COUNT_CMD);
|
Serial.println(HELP_PACKET_COUNT_CMD);
|
||||||
Serial.println(HELP_PING_CMD);
|
Serial.println(HELP_PING_CMD);
|
||||||
Serial.println(HELP_PORT_SCAN_CMD);
|
Serial.println(HELP_PORT_SCAN_CMD);
|
||||||
@@ -251,6 +252,7 @@ void CommandLine::runCommand(String input) {
|
|||||||
Serial.println(HELP_LIST_AP_CMD_C);
|
Serial.println(HELP_LIST_AP_CMD_C);
|
||||||
Serial.println(HELP_LIST_AP_CMD_D);
|
Serial.println(HELP_LIST_AP_CMD_D);
|
||||||
Serial.println(HELP_LIST_AP_CMD_E);
|
Serial.println(HELP_LIST_AP_CMD_E);
|
||||||
|
Serial.println(HELP_LIST_AP_CMD_F);
|
||||||
Serial.println(HELP_SEL_CMD_A);
|
Serial.println(HELP_SEL_CMD_A);
|
||||||
Serial.println(HELP_SSID_CMD_A);
|
Serial.println(HELP_SSID_CMD_A);
|
||||||
Serial.println(HELP_SSID_CMD_B);
|
Serial.println(HELP_SSID_CMD_B);
|
||||||
@@ -575,6 +577,37 @@ void CommandLine::runCommand(String input) {
|
|||||||
Serial.println("GPS not supported");
|
Serial.println("GPS not supported");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
// Karma
|
||||||
|
else if (cmd_args.get(0) == KARMA_CMD) {
|
||||||
|
int pr_sw = this->argSearch(&cmd_args, "-p");
|
||||||
|
|
||||||
|
if (pr_sw == -1) {
|
||||||
|
Serial.println("You did not provide a target index");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int pr_index = cmd_args.get(pr_sw + 1).toInt();
|
||||||
|
|
||||||
|
if ((pr_index < 0) || (pr_index > probe_req_ssids->size() - 1)) {
|
||||||
|
Serial.println("The provided index was not in range");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (evil_portal_obj.setAP(probe_req_ssids->get(pr_index).essid)) {
|
||||||
|
Serial.println("Starting Karma Attack with " + probe_req_ssids->get(pr_index).essid + ". Stop with " + (String)STOPSCAN_CMD);
|
||||||
|
#ifdef HAS_SCREEN
|
||||||
|
display_obj.clearScreen();
|
||||||
|
menu_function_obj.drawStatusBar();
|
||||||
|
#endif
|
||||||
|
wifi_scan_obj.StartScan(WIFI_SCAN_EVIL_PORTAL, TFT_ORANGE);
|
||||||
|
wifi_scan_obj.setMac();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Serial.println("Unable to set AP ESSID");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
// AP Scan
|
// AP Scan
|
||||||
else if (cmd_args.get(0) == EVIL_PORTAL_CMD) {
|
else if (cmd_args.get(0) == EVIL_PORTAL_CMD) {
|
||||||
int cmd_sw = this->argSearch(&cmd_args, "-c");
|
int cmd_sw = this->argSearch(&cmd_args, "-c");
|
||||||
@@ -1045,54 +1078,6 @@ void CommandLine::runCommand(String input) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*else if (cmd_args.get(0) == BT_SOUR_APPLE_CMD) {
|
|
||||||
#ifdef HAS_BT
|
|
||||||
Serial.println("Starting Sour Apple attack. Stop with " + (String)STOPSCAN_CMD);
|
|
||||||
#ifdef HAS_SCREEN
|
|
||||||
display_obj.clearScreen();
|
|
||||||
menu_function_obj.drawStatusBar();
|
|
||||||
#endif
|
|
||||||
wifi_scan_obj.StartScan(BT_ATTACK_SOUR_APPLE, TFT_GREEN);
|
|
||||||
#else
|
|
||||||
Serial.println("Bluetooth not supported");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else if (cmd_args.get(0) == BT_SWIFTPAIR_SPAM_CMD) {
|
|
||||||
#ifdef HAS_BT
|
|
||||||
Serial.println("Starting Swiftpair Spam attack. Stop with " + (String)STOPSCAN_CMD);
|
|
||||||
#ifdef HAS_SCREEN
|
|
||||||
display_obj.clearScreen();
|
|
||||||
menu_function_obj.drawStatusBar();
|
|
||||||
#endif
|
|
||||||
wifi_scan_obj.StartScan(BT_ATTACK_SWIFTPAIR_SPAM, TFT_CYAN);
|
|
||||||
#else
|
|
||||||
Serial.println("Bluetooth not supported");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else if (cmd_args.get(0) == BT_SAMSUNG_SPAM_CMD) {
|
|
||||||
#ifdef HAS_BT
|
|
||||||
Serial.println("Starting Samsung Spam attack. Stop with " + (String)STOPSCAN_CMD);
|
|
||||||
#ifdef HAS_SCREEN
|
|
||||||
display_obj.clearScreen();
|
|
||||||
menu_function_obj.drawStatusBar();
|
|
||||||
#endif
|
|
||||||
wifi_scan_obj.StartScan(BT_ATTACK_SAMSUNG_SPAM, TFT_CYAN);
|
|
||||||
#else
|
|
||||||
Serial.println("Bluetooth not supported");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else if (cmd_args.get(0) == BT_SPAM_ALL_CMD) {
|
|
||||||
#ifdef HAS_BT
|
|
||||||
Serial.println("Starting BT Spam All attack. Stop with " + (String)STOPSCAN_CMD);
|
|
||||||
#ifdef HAS_SCREEN
|
|
||||||
display_obj.clearScreen();
|
|
||||||
menu_function_obj.drawStatusBar();
|
|
||||||
#endif
|
|
||||||
wifi_scan_obj.StartScan(BT_ATTACK_SPAM_ALL, TFT_MAGENTA);
|
|
||||||
#else
|
|
||||||
Serial.println("Bluetooth not supported");
|
|
||||||
#endif
|
|
||||||
}*/
|
|
||||||
// Wardrive
|
// Wardrive
|
||||||
else if (cmd_args.get(0) == BT_WARDRIVE_CMD) {
|
else if (cmd_args.get(0) == BT_WARDRIVE_CMD) {
|
||||||
#ifdef HAS_BT
|
#ifdef HAS_BT
|
||||||
@@ -1227,6 +1212,7 @@ void CommandLine::runCommand(String input) {
|
|||||||
int cl_sw = this->argSearch(&cmd_args, "-c");
|
int cl_sw = this->argSearch(&cmd_args, "-c");
|
||||||
int at_sw = this->argSearch(&cmd_args, "-t");
|
int at_sw = this->argSearch(&cmd_args, "-t");
|
||||||
int ip_sw = this->argSearch(&cmd_args, "-i");
|
int ip_sw = this->argSearch(&cmd_args, "-i");
|
||||||
|
int pr_sw = this->argSearch(&cmd_args, "-p");
|
||||||
|
|
||||||
// List APs
|
// List APs
|
||||||
if (ap_sw != -1) {
|
if (ap_sw != -1) {
|
||||||
@@ -1246,6 +1232,12 @@ void CommandLine::runCommand(String input) {
|
|||||||
Serial.println("[" + (String)i + "] " + ipList->get(i).toString());
|
Serial.println("[" + (String)i + "] " + ipList->get(i).toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// List Probes
|
||||||
|
else if (pr_sw != -1) {
|
||||||
|
for (int i = 0; i < probe_req_ssids->size(); i++) {
|
||||||
|
Serial.println("[" + (String)i + "] " + probe_req_ssids->get(i).essid);
|
||||||
|
}
|
||||||
|
}
|
||||||
// List SSIDs
|
// List SSIDs
|
||||||
else if (ss_sw != -1) {
|
else if (ss_sw != -1) {
|
||||||
for (int i = 0; i < ssids->size(); i++) {
|
for (int i = 0; i < ssids->size(); i++) {
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ extern LinkedList<AirTag>* airtags;
|
|||||||
extern LinkedList<ssid>* ssids;
|
extern LinkedList<ssid>* ssids;
|
||||||
extern LinkedList<Station>* stations;
|
extern LinkedList<Station>* stations;
|
||||||
extern LinkedList<IPAddress>* ipList;
|
extern LinkedList<IPAddress>* ipList;
|
||||||
|
extern LinkedList<ProbeReqSsid>* probe_req_ssids;
|
||||||
extern const String PROGMEM version_number;
|
extern const String PROGMEM version_number;
|
||||||
extern const String PROGMEM board_target;
|
extern const String PROGMEM board_target;
|
||||||
|
|
||||||
@@ -55,6 +56,7 @@ const char PROGMEM NMEA_CMD[] = "nmea";
|
|||||||
|
|
||||||
// WiFi sniff/scan
|
// WiFi sniff/scan
|
||||||
const char PROGMEM EVIL_PORTAL_CMD[] = "evilportal";
|
const char PROGMEM EVIL_PORTAL_CMD[] = "evilportal";
|
||||||
|
const char PROGMEM KARMA_CMD[] = "karma";
|
||||||
const char PROGMEM PACKET_COUNT_CMD[] = "packetcount";
|
const char PROGMEM PACKET_COUNT_CMD[] = "packetcount";
|
||||||
const char PROGMEM SIGSTREN_CMD[] = "sigmon";
|
const char PROGMEM SIGSTREN_CMD[] = "sigmon";
|
||||||
const char PROGMEM SCAN_ALL_CMD[] = "scanall";
|
const char PROGMEM SCAN_ALL_CMD[] = "scanall";
|
||||||
@@ -118,6 +120,7 @@ const char PROGMEM HELP_NMEA_CMD[] = "nmea";
|
|||||||
|
|
||||||
// WiFi sniff/scan
|
// WiFi sniff/scan
|
||||||
const char PROGMEM HELP_EVIL_PORTAL_CMD[] = "evilportal [-c start [-w html.html]/sethtml <html.html>]";
|
const char PROGMEM HELP_EVIL_PORTAL_CMD[] = "evilportal [-c start [-w html.html]/sethtml <html.html>]";
|
||||||
|
const char PROGMEM HELP_KARMA_CMD[] = "karma -p <index>";
|
||||||
const char PROGMEM HELP_PACKET_COUNT_CMD[] = "packetcount";
|
const char PROGMEM HELP_PACKET_COUNT_CMD[] = "packetcount";
|
||||||
const char PROGMEM HELP_SIGSTREN_CMD[] = "sigmon";
|
const char PROGMEM HELP_SIGSTREN_CMD[] = "sigmon";
|
||||||
const char PROGMEM HELP_SCAN_ALL_CMD[] = "scanall";
|
const char PROGMEM HELP_SCAN_ALL_CMD[] = "scanall";
|
||||||
@@ -146,6 +149,7 @@ const char PROGMEM HELP_LIST_AP_CMD_B[] = "list -a";
|
|||||||
const char PROGMEM HELP_LIST_AP_CMD_C[] = "list -c";
|
const char PROGMEM HELP_LIST_AP_CMD_C[] = "list -c";
|
||||||
const char PROGMEM HELP_LIST_AP_CMD_D[] = "list -t";
|
const char PROGMEM HELP_LIST_AP_CMD_D[] = "list -t";
|
||||||
const char PROGMEM HELP_LIST_AP_CMD_E[] = "list -i";
|
const char PROGMEM HELP_LIST_AP_CMD_E[] = "list -i";
|
||||||
|
const char PROGMEM HELP_LIST_AP_CMD_F[] = "list -p";
|
||||||
const char PROGMEM HELP_INFO_CMD[] = "info [-a <index>]";
|
const char PROGMEM HELP_INFO_CMD[] = "info [-a <index>]";
|
||||||
const char PROGMEM HELP_SEL_CMD_A[] = "select -a/-s/-c <index (comma separated)>/-f \"equals <String> or contains <String>\"";
|
const char PROGMEM HELP_SEL_CMD_A[] = "select -a/-s/-c <index (comma separated)>/-f \"equals <String> or contains <String>\"";
|
||||||
const char PROGMEM HELP_SSID_CMD_A[] = "ssid -a [-g <count>/-n <name>]";
|
const char PROGMEM HELP_SSID_CMD_A[] = "ssid -a [-g <count>/-n <name>]";
|
||||||
|
|||||||
Reference in New Issue
Block a user