mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2026-07-28 14:47:16 -07:00
Reduce program size
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+155
-185
@@ -4,9 +4,6 @@
|
||||
extern void brightnessCycle();
|
||||
extern uint8_t getBrightnessLevel();
|
||||
|
||||
CommandLine::CommandLine() {
|
||||
}
|
||||
|
||||
void CommandLine::RunSetup() {
|
||||
Serial.println(this->ascii_art);
|
||||
|
||||
@@ -101,14 +98,14 @@ bool CommandLine::inRange(int max, int index) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CommandLine::apSelected() {
|
||||
/*bool CommandLine::apSelected() {
|
||||
for (int i = 0; i < access_points->size(); i++) {
|
||||
if (access_points->get(i).selected)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
|
||||
bool CommandLine::hasSSIDs() {
|
||||
if (ssids->size() == 0)
|
||||
@@ -196,6 +193,18 @@ void CommandLine::filterAccessPoints(String filter) {
|
||||
this->showCounts(count_selected, count_unselected);
|
||||
}
|
||||
|
||||
void CommandLine::startScanFromCLI(int scan_mode, uint16_t color, String scan_name) {
|
||||
Serial.print(F("Starting"));
|
||||
Serial.print(scan_name);
|
||||
Serial.print(F(". Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(scan_mode, color);
|
||||
}
|
||||
|
||||
void CommandLine::runCommand(String input) {
|
||||
if (input == "") return;
|
||||
|
||||
@@ -241,7 +250,6 @@ void CommandLine::runCommand(String input) {
|
||||
Serial.println(HELP_SNIFF_PWN_CMD);
|
||||
Serial.println(HELP_SNIFF_PINESCAN_CMD);
|
||||
Serial.println(HELP_SNIFF_MULTISSID_CMD);
|
||||
Serial.println(HELP_SNIFF_ESP_CMD);
|
||||
Serial.println(HELP_SNIFF_DEAUTH_CMD);
|
||||
Serial.println(HELP_SNIFF_PMKID_CMD);
|
||||
Serial.println(HELP_SNIFF_SAE_CMD);
|
||||
@@ -280,9 +288,6 @@ void CommandLine::runCommand(String input) {
|
||||
Serial.println(HELP_BT_SNIFF_CMD);
|
||||
Serial.println(HELP_BT_SPAM_CMD);
|
||||
Serial.println(HELP_BT_SPOOFAT_CMD);
|
||||
//Serial.println(HELP_BT_SWIFTPAIR_SPAM_CMD);
|
||||
//Serial.println(HELP_BT_SAMSUNG_SPAM_CMD);
|
||||
//Serial.println(HELP_BT_SPAM_ALL_CMD);
|
||||
#ifdef HAS_GPS
|
||||
Serial.println(HELP_BT_WARDRIVE_CMD);
|
||||
#endif
|
||||
@@ -295,16 +300,6 @@ void CommandLine::runCommand(String input) {
|
||||
|
||||
// Stop Scan
|
||||
if (cmd_args.get(0) == STOPSCAN_CMD) {
|
||||
//if (wifi_scan_obj.currentScanMode == OTA_UPDATE) {
|
||||
// wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF;
|
||||
//#ifdef HAS_SCREEN
|
||||
// menu_function_obj.changeMenu(menu_function_obj.updateMenu.parentMenu);
|
||||
//#endif
|
||||
// WiFi.softAPdisconnect(true);
|
||||
// web_obj.shutdownServer();
|
||||
// return;
|
||||
//}
|
||||
|
||||
int f_arg = this->argSearch(&cmd_args, "-f");
|
||||
|
||||
uint8_t old_scan_mode=wifi_scan_obj.currentScanMode;
|
||||
@@ -434,7 +429,7 @@ void CommandLine::runCommand(String input) {
|
||||
else if (cmd_args.get(0) == LED_CMD) {
|
||||
int hex_arg = this->argSearch(&cmd_args, "-s");
|
||||
int pat_arg = this->argSearch(&cmd_args, "-p");
|
||||
#ifdef PIN
|
||||
#if defined(PIN) && defined(HAS_NEOPIXEL_LED)
|
||||
if (hex_arg != -1) {
|
||||
String hexstring = cmd_args.get(hex_arg + 1);
|
||||
int number = (int)strtol(&hexstring[1], NULL, 16);
|
||||
@@ -465,9 +460,6 @@ void CommandLine::runCommand(String input) {
|
||||
sd_obj.listDir(cmd_args.get(1));
|
||||
else
|
||||
Serial.println(F("You did not provide a dir to list"));
|
||||
#else
|
||||
Serial.println(F("SD support disabled, cannot use command"));
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -475,17 +467,13 @@ void CommandLine::runCommand(String input) {
|
||||
else if (cmd_args.get(0) == CH_CMD) {
|
||||
// Search for channel set arg
|
||||
int ch_set = this->argSearch(&cmd_args, "-s");
|
||||
|
||||
if (cmd_args.size() == 1) {
|
||||
Serial.print(F("Current channel: "));
|
||||
Serial.println(wifi_scan_obj.set_channel);
|
||||
}
|
||||
else if (ch_set != -1) {
|
||||
|
||||
if (ch_set != -1) {
|
||||
wifi_scan_obj.set_channel = cmd_args.get(ch_set + 1).toInt();
|
||||
wifi_scan_obj.changeChannel();
|
||||
Serial.print(F("Set channel: "));
|
||||
Serial.println(wifi_scan_obj.set_channel);
|
||||
}
|
||||
Serial.println(wifi_scan_obj.set_channel);
|
||||
}
|
||||
// Clear APs
|
||||
else if (cmd_args.get(0) == CLEARAP_CMD) {
|
||||
@@ -549,10 +537,8 @@ void CommandLine::runCommand(String input) {
|
||||
}
|
||||
}
|
||||
|
||||
else if (cmd_args.get(0) == REBOOT_CMD) {
|
||||
Serial.println(F("Rebooting..."));
|
||||
else if (cmd_args.get(0) == REBOOT_CMD)
|
||||
ESP.restart();
|
||||
}
|
||||
|
||||
//// WiFi/Bluetooth Scan/Attack commands
|
||||
if (!wifi_scan_obj.scanning()) {
|
||||
@@ -561,24 +547,24 @@ void CommandLine::runCommand(String input) {
|
||||
|
||||
// Signal strength scan
|
||||
if (cmd_args.get(0) == SIGSTREN_CMD) {
|
||||
Serial.print(F("Starting Signal Strength Scan. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_SIG_STREN, TFT_MAGENTA, "Signal Strength Scan");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_SIG_STREN, TFT_MAGENTA);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_SIG_STREN, TFT_MAGENTA);*/
|
||||
wifi_scan_obj.renderPacketRate();
|
||||
}
|
||||
// Packet count
|
||||
else if (cmd_args.get(0) == PACKET_COUNT_CMD) {
|
||||
Serial.print(F("Starting Packet Count Scan. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_PACKET_RATE, TFT_ORANGE, "Packet Count Scan");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_PACKET_RATE, TFT_ORANGE);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_PACKET_RATE, TFT_ORANGE);*/
|
||||
}
|
||||
// Wardrive
|
||||
else if (cmd_args.get(0) == WARDRIVE_CMD) {
|
||||
@@ -588,31 +574,31 @@ void CommandLine::runCommand(String input) {
|
||||
int flk_sw = this->argSearch(&cmd_args, "-f");
|
||||
|
||||
if (flk_sw != -1) {
|
||||
Serial.print(F("Starting Flock Wardrive. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_SCAN_FLOCK_WARDRIVE, TFT_GREEN, "Flock Wardrive");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_SCAN_FLOCK_WARDRIVE, TFT_GREEN);
|
||||
wifi_scan_obj.StartScan(BT_SCAN_FLOCK_WARDRIVE, TFT_GREEN);*/
|
||||
}
|
||||
else if (sta_sw != -1) {
|
||||
Serial.print(F("Starting Station Wardrive. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_STATION_WAR_DRIVE, TFT_GREEN, "Station Wardrive");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_STATION_WAR_DRIVE, TFT_GREEN);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_STATION_WAR_DRIVE, TFT_GREEN);*/
|
||||
}
|
||||
else {
|
||||
Serial.print(F("Starting Wardrive. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_WAR_DRIVE, TFT_GREEN, "Wardrive");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_WAR_DRIVE, TFT_GREEN);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_WAR_DRIVE, TFT_GREEN);*/
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -638,15 +624,13 @@ void CommandLine::runCommand(String input) {
|
||||
}
|
||||
|
||||
if (evil_portal_obj.setAP(probe_req_ssids->get(pr_index).essid)) {
|
||||
Serial.print(F("Starting Karma Attack with "));
|
||||
Serial.print(probe_req_ssids->get(pr_index).essid);
|
||||
Serial.print(F(". Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_EVIL_PORTAL, TFT_ORANGE, "Karma Attack");
|
||||
/*Serial.println(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.StartScan(WIFI_SCAN_EVIL_PORTAL, TFT_ORANGE);*/
|
||||
wifi_scan_obj.setMac();
|
||||
}
|
||||
else {
|
||||
@@ -735,13 +719,13 @@ void CommandLine::runCommand(String input) {
|
||||
}
|
||||
// Raw sniff
|
||||
else if (cmd_args.get(0) == SNIFF_RAW_CMD) {
|
||||
Serial.print(F("Starting Raw sniff. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_RAW_CAPTURE, TFT_WHITE, "Raw sniff");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_RAW_CAPTURE, TFT_WHITE);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_RAW_CAPTURE, TFT_WHITE);*/
|
||||
}
|
||||
// Scan stations
|
||||
else if (cmd_args.get(0) == SCANSTA_CMD) {
|
||||
@@ -749,93 +733,83 @@ void CommandLine::runCommand(String input) {
|
||||
Serial.print(F("The AP list is empty. Scan APs first with "));
|
||||
Serial.println(SCANAP_CMD);
|
||||
|
||||
Serial.print(F("Starting Station scan. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_STATION, TFT_ORANGE, "Station scan");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_STATION, TFT_ORANGE);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_STATION, TFT_ORANGE);*/
|
||||
}
|
||||
// Beacon sniff
|
||||
else if (cmd_args.get(0) == SNIFF_BEACON_CMD) {
|
||||
Serial.print(F("Starting Beacon sniff. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_AP, TFT_MAGENTA, "Beacon sniff");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_AP, TFT_MAGENTA);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_AP, TFT_MAGENTA);*/
|
||||
}
|
||||
// SAE sniff
|
||||
else if (cmd_args.get(0) == SNIFF_SAE_CMD) {
|
||||
Serial.print(F("Starting SAE Commit sniff. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_SAE_COMMIT, TFT_MAGENTA, "Commit sniff");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_SAE_COMMIT, TFT_MAGENTA);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_SAE_COMMIT, TFT_MAGENTA);*/
|
||||
}
|
||||
// Probe sniff
|
||||
else if (cmd_args.get(0) == SNIFF_PROBE_CMD) {
|
||||
Serial.print(F("Starting Probe sniff. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_PROBE, TFT_MAGENTA, "Probe sniff");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_PROBE, TFT_MAGENTA);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_PROBE, TFT_MAGENTA);*/
|
||||
}
|
||||
// Deauth sniff
|
||||
else if (cmd_args.get(0) == SNIFF_DEAUTH_CMD) {
|
||||
Serial.print(F("Starting Deauth sniff. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_DEAUTH, TFT_RED, "Deauth sniff");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_DEAUTH, TFT_RED);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_DEAUTH, TFT_RED);*/
|
||||
}
|
||||
// Pwn sniff
|
||||
else if (cmd_args.get(0) == SNIFF_PWN_CMD) {
|
||||
Serial.print(F("Starting Pwnagotchi sniff. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_PWN, TFT_MAGENTA, "Pwnagotchi sniff");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_PWN, TFT_MAGENTA);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_PWN, TFT_MAGENTA);*/
|
||||
}
|
||||
// PineScan sniff
|
||||
else if (cmd_args.get(0) == SNIFF_PINESCAN_CMD) {
|
||||
Serial.print(F("Starting Pinescan sniff. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_PINESCAN, TFT_MAGENTA, "Pinescan sniff");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_PINESCAN, TFT_MAGENTA);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_PINESCAN, TFT_MAGENTA);*/
|
||||
}
|
||||
// MultiSSID sniff
|
||||
else if (cmd_args.get(0) == SNIFF_MULTISSID_CMD) {
|
||||
Serial.print(F("Starting MultiSSID sniff. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_MULTISSID, TFT_MAGENTA, "MultiSSID sniff");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_MULTISSID, TFT_MAGENTA);
|
||||
}
|
||||
// Espressif sniff
|
||||
else if (cmd_args.get(0) == SNIFF_ESP_CMD) {
|
||||
Serial.print(F("Starting Espressif device sniff. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_ESPRESSIF, TFT_MAGENTA);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_MULTISSID, TFT_MAGENTA);*/
|
||||
}
|
||||
// PMKID sniff
|
||||
else if (cmd_args.get(0) == SNIFF_PMKID_CMD) {
|
||||
@@ -844,7 +818,7 @@ void CommandLine::runCommand(String input) {
|
||||
int l_sw = this->argSearch(&cmd_args, "-l"); // Only run on list
|
||||
|
||||
if (l_sw != -1) {
|
||||
if (!this->apSelected()) {
|
||||
if (!wifi_scan_obj.filterActive()) {
|
||||
Serial.println("You don't have any targets selected. Use " + (String)SEL_CMD);
|
||||
return;
|
||||
}
|
||||
@@ -872,13 +846,13 @@ void CommandLine::runCommand(String input) {
|
||||
}
|
||||
// MAC Tracking
|
||||
else if (cmd_args.get(0) == MAC_TRACK_CMD) {
|
||||
Serial.print(F("Starting MAC Tracker. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_SCAN_DETECT_FOLLOW, TFT_MAGENTA, "MAC Tracker");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_DETECT_FOLLOW, TFT_MAGENTA);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_DETECT_FOLLOW, TFT_MAGENTA);*/
|
||||
}
|
||||
|
||||
|
||||
@@ -992,7 +966,7 @@ void CommandLine::runCommand(String input) {
|
||||
|
||||
// Source addr not specified
|
||||
if (src_addr_sw == -1) {
|
||||
if (!this->apSelected()) {
|
||||
if (!wifi_scan_obj.filterActive()) {
|
||||
Serial.println("You don't have any targets selected. Use " + (String)SEL_CMD);
|
||||
return;
|
||||
}
|
||||
@@ -1025,41 +999,45 @@ void CommandLine::runCommand(String input) {
|
||||
else if (attack_type == ATTACK_TYPE_BM) {
|
||||
// Attack all
|
||||
if (targ_sw == -1) {
|
||||
Serial.println("Starting Bad Msg attack against all stations. Stop with " + (String)STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_ATTACK_BAD_MSG, TFT_RED, "Bad Msg attack against all stations");
|
||||
/*Serial.prinln((String)STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_BAD_MSG, TFT_RED);
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_BAD_MSG, TFT_RED);*/
|
||||
}
|
||||
// Target clients
|
||||
else {
|
||||
Serial.println("Starting targeted Bad Msg attack. Stop with " + (String)STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_ATTACK_BAD_MSG_TARGETED, TFT_YELLOW, "targeted Bad Msg attack");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_BAD_MSG_TARGETED, TFT_YELLOW);
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_BAD_MSG_TARGETED, TFT_YELLOW);*/
|
||||
}
|
||||
}
|
||||
else if (attack_type == ATTACK_TYPE_S) {
|
||||
// Attack all
|
||||
if (targ_sw == -1) {
|
||||
Serial.println("Starting Sleep attack against all stations. Stop with " + (String)STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_ATTACK_SLEEP, TFT_RED, "Sleep attack against all stations");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_SLEEP, TFT_RED);
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_SLEEP, TFT_RED);*/
|
||||
}
|
||||
// Target clients
|
||||
else {
|
||||
Serial.println("Starting targeted Sleep attack. Stop with " + (String)STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_ATTACK_SLEEP_TARGETED, TFT_MAGENTA, "targeted Sleep attack");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_SLEEP_TARGETED, TFT_MAGENTA);
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_SLEEP_TARGETED, TFT_MAGENTA);*/
|
||||
}
|
||||
}
|
||||
else if (attack_type == ATTACK_TYPE_BEACON) {
|
||||
@@ -1087,7 +1065,7 @@ void CommandLine::runCommand(String input) {
|
||||
}
|
||||
// Spam from AP list
|
||||
else if (ap_beacon_sw != -1) {
|
||||
if (!this->apSelected()) {
|
||||
if (!wifi_scan_obj.filterActive()) {
|
||||
Serial.println("You don't have any targets selected. Use " + (String)SEL_CMD);
|
||||
return;
|
||||
}
|
||||
@@ -1103,60 +1081,62 @@ void CommandLine::runCommand(String input) {
|
||||
}
|
||||
}
|
||||
else if (attack_type == ATTACK_TYPE_PROBE) {
|
||||
if (!this->apSelected()) {
|
||||
if (!wifi_scan_obj.filterActive()) {
|
||||
Serial.println("You don't have any targets selected. Use " + (String)SEL_CMD);
|
||||
return;
|
||||
}
|
||||
Serial.println("Starting Probe spam. Stop with " + (String)STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_ATTACK_AUTH, TFT_RED, "Probe spam");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_AUTH, TFT_RED);
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_AUTH, TFT_RED);*/
|
||||
}
|
||||
else if (attack_type == ATTACK_TYPE_RR) {
|
||||
Serial.println("Starting Rick Roll Beacon spam. Stop with " + (String)STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_ATTACK_RICK_ROLL, TFT_YELLOW, "Rick Roll Beacon spam");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_RICK_ROLL, TFT_YELLOW);
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_RICK_ROLL, TFT_YELLOW);*/
|
||||
}
|
||||
else if (attack_type == ATTACK_TYPE_FUNNY) {
|
||||
Serial.print(F("Starting Funny SSID Beacon spam. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_ATTACK_FUNNY_BEACON, TFT_CYAN, "Funny SSID Beacon spam");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_FUNNY_BEACON, TFT_CYAN);
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_FUNNY_BEACON, TFT_CYAN);*/
|
||||
}
|
||||
else if (attack_type == ATTACK_TYPE_SAE) {
|
||||
Serial.print(F("Starting SAE Commit spam. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_ATTACK_SAE_COMMIT, TFT_CYAN, "SAE Commit spam");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_SAE_COMMIT, TFT_CYAN);
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_SAE_COMMIT, TFT_CYAN);*/
|
||||
}
|
||||
else if (attack_type == ATTACK_TYPE_CSA) {
|
||||
Serial.print(F("Starting Channel Switch Announcement attack. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_ATTACK_CSA, TFT_CYAN, "Channel Switch Announcement attack");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_CSA, TFT_CYAN);
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_CSA, TFT_CYAN);*/
|
||||
}
|
||||
else if (attack_type == ATTACK_TYPE_QUIET) {
|
||||
Serial.print(F("Starting Quite Time attack. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_ATTACK_QUIET, TFT_CYAN, "Quite Time attack");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_QUIET, TFT_CYAN);
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_QUIET, TFT_CYAN);*/
|
||||
}
|
||||
else {
|
||||
Serial.println(F("Attack type not properly defined"));
|
||||
@@ -1179,51 +1159,51 @@ void CommandLine::runCommand(String input) {
|
||||
|
||||
// Airtag sniff
|
||||
if (bt_type == "airtag") {
|
||||
Serial.print(F("Starting Airtag sniff. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_SCAN_AIRTAG, TFT_WHITE, "Airtag sniff");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_SCAN_AIRTAG, TFT_WHITE);
|
||||
wifi_scan_obj.StartScan(BT_SCAN_AIRTAG, TFT_WHITE);*/
|
||||
}
|
||||
else if (bt_type == "flipper") {
|
||||
Serial.print(F("Starting Flipper sniff. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_SCAN_FLIPPER, TFT_ORANGE, "Flipper sniff");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_SCAN_FLIPPER, TFT_ORANGE);
|
||||
wifi_scan_obj.StartScan(BT_SCAN_FLIPPER, TFT_ORANGE);*/
|
||||
}
|
||||
else if (bt_type == "flock") {
|
||||
Serial.print(F("Starting Flock sniff. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_SCAN_FLOCK, TFT_ORANGE, "Flock sniff");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_SCAN_FLOCK, TFT_ORANGE);
|
||||
wifi_scan_obj.StartScan(BT_SCAN_FLOCK, TFT_ORANGE);*/
|
||||
}
|
||||
else if (bt_type == "meta") {
|
||||
Serial.print(F("Starting Meta sniff. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_SCAN_RAYBAN, TFT_ORANGE, "Meta sniff");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_SCAN_RAYBAN, TFT_ORANGE);
|
||||
wifi_scan_obj.StartScan(BT_SCAN_RAYBAN, TFT_ORANGE);*/
|
||||
}
|
||||
}
|
||||
// General bluetooth sniff
|
||||
else {
|
||||
Serial.print(F("Starting Bluetooth scan. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_SCAN_ALL, TFT_GREEN, "Bluetooth scan");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_SCAN_ALL, TFT_GREEN);
|
||||
wifi_scan_obj.StartScan(BT_SCAN_ALL, TFT_GREEN);*/
|
||||
}
|
||||
#else
|
||||
Serial.println(F("Bluetooth not supported"));
|
||||
@@ -1243,13 +1223,12 @@ void CommandLine::runCommand(String input) {
|
||||
at.selected = false;
|
||||
airtags->set(i, at);
|
||||
}
|
||||
Serial.print(F("Spoofing Airtag: "));
|
||||
Serial.println(airtags->get(target_mac).mac);
|
||||
#ifdef HAS_SCREEN
|
||||
this->startScanFromCLI(BT_SPOOF_AIRTAG, TFT_WHITE, "Spoofing Airtag");
|
||||
/*#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_SPOOF_AIRTAG, TFT_WHITE);
|
||||
wifi_scan_obj.StartScan(BT_SPOOF_AIRTAG, TFT_WHITE);*/
|
||||
}
|
||||
else {
|
||||
Serial.print(F("Provided index is out of range: "));
|
||||
@@ -1266,78 +1245,78 @@ void CommandLine::runCommand(String input) {
|
||||
|
||||
if (bt_type == "apple") {
|
||||
#ifdef HAS_BT
|
||||
Serial.print(F("Starting Sour Apple attack. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_ATTACK_SOUR_APPLE, TFT_GREEN, "Sour Apple attack");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_SOUR_APPLE, TFT_GREEN);
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_SOUR_APPLE, TFT_GREEN);*/
|
||||
#else
|
||||
Serial.println(F("Bluetooth not supported"));
|
||||
#endif
|
||||
}
|
||||
else if (bt_type == "windows") {
|
||||
#ifdef HAS_BT
|
||||
Serial.print(F("Starting Swiftpair Spam attack. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_ATTACK_SWIFTPAIR_SPAM, TFT_CYAN, "Swiftpair Spam attack");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_SWIFTPAIR_SPAM, TFT_CYAN);
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_SWIFTPAIR_SPAM, TFT_CYAN);*/
|
||||
#else
|
||||
Serial.println(F("Bluetooth not supported"));
|
||||
#endif
|
||||
}
|
||||
else if (bt_type == "samsung") {
|
||||
#ifdef HAS_BT
|
||||
Serial.print(F("Starting Samsung Spam attack. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_ATTACK_SAMSUNG_SPAM, TFT_CYAN, "Samsung Spam attack");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_SAMSUNG_SPAM, TFT_CYAN);
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_SAMSUNG_SPAM, TFT_CYAN);*/
|
||||
#else
|
||||
Serial.println(F("Bluetooth not supported"));
|
||||
#endif
|
||||
}
|
||||
else if (bt_type == "google") {
|
||||
#ifdef HAS_BT
|
||||
Serial.print(F("Starting Google Spam attack. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_ATTACK_GOOGLE_SPAM, TFT_CYAN, "Google Spam attack");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_GOOGLE_SPAM, TFT_CYAN);
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_GOOGLE_SPAM, TFT_CYAN);*/
|
||||
#else
|
||||
Serial.println(F("Bluetooth not supported"));
|
||||
#endif
|
||||
}
|
||||
else if (bt_type == "flipper") {
|
||||
#ifdef HAS_BT
|
||||
Serial.print(F("Starting Flipper Spam attack. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_ATTACK_FLIPPER_SPAM, TFT_ORANGE, "Flipper Spam attack");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_FLIPPER_SPAM, TFT_ORANGE);
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_FLIPPER_SPAM, TFT_ORANGE);*/
|
||||
#else
|
||||
Serial.println(F("Bluetooth not supported"));
|
||||
#endif
|
||||
}
|
||||
else if (bt_type == "all") {
|
||||
#ifdef HAS_BT
|
||||
Serial.print(F("Starting BT Spam All attack. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_ATTACK_SPAM_ALL, TFT_MAGENTA, "BT Spam All attack");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_SPAM_ALL, TFT_MAGENTA);
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_SPAM_ALL, TFT_MAGENTA);*/
|
||||
#else
|
||||
Serial.println(F("Bluetooth not supported"));
|
||||
#endif
|
||||
@@ -1353,13 +1332,13 @@ void CommandLine::runCommand(String input) {
|
||||
#ifdef HAS_GPS
|
||||
if (gps_obj.getGpsModuleStatus()) {
|
||||
|
||||
Serial.print(F("Starting BT Wardrive. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_SCAN_WAR_DRIVE, TFT_GREEN, "BT Wardrive");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_SCAN_WAR_DRIVE, TFT_GREEN);
|
||||
wifi_scan_obj.StartScan(BT_SCAN_WAR_DRIVE, TFT_GREEN);*/
|
||||
}
|
||||
else
|
||||
Serial.println(F("GPS Module not detected"));
|
||||
@@ -1374,13 +1353,13 @@ void CommandLine::runCommand(String input) {
|
||||
// Bluetooth CC Skimmer scan
|
||||
else if (cmd_args.get(0) == BT_SKIM_CMD) {
|
||||
#ifdef HAS_BT
|
||||
Serial.print(F("Starting Bluetooth CC Skimmer scan. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(BT_SCAN_SKIMMERS, TFT_MAGENTA, "Bluetooth CC Skimmer scan");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_SCAN_SKIMMERS, TFT_MAGENTA);
|
||||
wifi_scan_obj.StartScan(BT_SCAN_SKIMMERS, TFT_MAGENTA);*/
|
||||
#else
|
||||
Serial.println(F("Bluetooth not supported"));
|
||||
#endif
|
||||
@@ -1442,24 +1421,24 @@ void CommandLine::runCommand(String input) {
|
||||
if (wifi_scan_obj.wifi_connected) {
|
||||
// Ping Scan
|
||||
if (cmd_args.get(0) == PING_CMD) {
|
||||
Serial.print(F("Starting Ping Scan. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_PING_SCAN, TFT_GREEN, "Ping Scan");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_PING_SCAN, TFT_GREEN);
|
||||
wifi_scan_obj.StartScan(WIFI_PING_SCAN, TFT_GREEN);*/
|
||||
}
|
||||
|
||||
if (cmd_args.get(0) == ARP_SCAN_CMD) {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
Serial.print(F("Starting ARP Scan. Stop with "));
|
||||
Serial.println(STOPSCAN_CMD);
|
||||
this->startScanFromCLI(WIFI_ARP_SCAN, TFT_CYAN, "ARP Scan");
|
||||
/*Serial.println(STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_ARP_SCAN, TFT_CYAN);
|
||||
wifi_scan_obj.StartScan(WIFI_ARP_SCAN, TFT_CYAN);*/
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1528,13 +1507,13 @@ void CommandLine::runCommand(String input) {
|
||||
|
||||
// Full port scan
|
||||
if (all_sw != -1) {
|
||||
Serial.println("Selected: " + ipList->get(ip_index).toString());
|
||||
wifi_scan_obj.current_scan_ip = ipList->get(ip_index);
|
||||
#ifdef HAS_SCREEN
|
||||
this->startScanFromCLI(WIFI_PORT_SCAN_ALL, TFT_BLUE, "Selected: " + ipList->get(ip_index).toString());
|
||||
/*#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_PORT_SCAN_ALL, TFT_BLUE);
|
||||
wifi_scan_obj.StartScan(WIFI_PORT_SCAN_ALL, TFT_BLUE);*/
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -1562,13 +1541,12 @@ void CommandLine::runCommand(String input) {
|
||||
target_mode = WIFI_SCAN_RDP;
|
||||
|
||||
if (target_mode != 0) {
|
||||
Serial.print(F("Starting port scan for service "));
|
||||
Serial.println(port_name);
|
||||
#ifdef HAS_SCREEN
|
||||
this->startScanFromCLI(target_mode, TFT_CYAN, "port scan");
|
||||
/*#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(target_mode, TFT_CYAN);
|
||||
wifi_scan_obj.StartScan(target_mode, TFT_CYAN);*/
|
||||
}
|
||||
else {
|
||||
Serial.println(F("You did not specify a supported service"));
|
||||
@@ -1657,10 +1635,6 @@ void CommandLine::runCommand(String input) {
|
||||
Serial.println("[" + (String)i + "]MAC: " + airtags->get(i).mac);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Serial.println(F("You did not specify which list to show"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (cmd_args.get(0) == INFO_CMD) {
|
||||
int ap_sw = this->argSearch(&cmd_args, "-a");
|
||||
@@ -1882,10 +1856,6 @@ void CommandLine::runCommand(String input) {
|
||||
}
|
||||
this->showCounts(count_selected, count_unselected);
|
||||
}
|
||||
else {
|
||||
Serial.println(F("You did not specify which list to select from"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (cmd_args.get(0) == SAVE_CMD) {
|
||||
int ap_sw = this->argSearch(&cmd_args, "-a");
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
#include "SDInterface.h"
|
||||
#endif
|
||||
#include "settings.h"
|
||||
#include "LedInterface.h"
|
||||
#if defined(HAS_NEOPIXEL_LED)
|
||||
#include "LedInterface.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
extern MenuFunctions menu_function_obj;
|
||||
@@ -29,7 +31,9 @@ extern WiFiScan wifi_scan_obj;
|
||||
extern SDInterface sd_obj;
|
||||
#endif
|
||||
extern Settings settings_obj;
|
||||
extern LedInterface led_obj;
|
||||
#if defined(HAS_NEOPIXEL_LED)
|
||||
extern LedInterface led_obj;
|
||||
#endif
|
||||
extern LinkedList<AccessPoint>* access_points;
|
||||
extern LinkedList<AirTag>* airtags;
|
||||
extern LinkedList<ssid>* ssids;
|
||||
@@ -70,7 +74,6 @@ const char PROGMEM SNIFF_PROBE_CMD[] = "sniffprobe";
|
||||
const char PROGMEM SNIFF_PWN_CMD[] = "sniffpwn";
|
||||
const char PROGMEM SNIFF_PINESCAN_CMD[] = "sniffpinescan";
|
||||
const char PROGMEM SNIFF_MULTISSID_CMD[] = "sniffmultissid";
|
||||
const char PROGMEM SNIFF_ESP_CMD[] = "sniffesp";
|
||||
const char PROGMEM SNIFF_DEAUTH_CMD[] = "sniffdeauth";
|
||||
const char PROGMEM SNIFF_PMKID_CMD[] = "sniffpmkid";
|
||||
const char PROGMEM STOPSCAN_CMD[] = "stopscan";
|
||||
@@ -112,10 +115,6 @@ const char PROGMEM ADD_CMD[] = "add";
|
||||
const char PROGMEM BT_SPAM_CMD[] = "blespam";
|
||||
const char PROGMEM BT_SNIFF_CMD[] = "sniffbt";
|
||||
const char PROGMEM BT_SPOOFAT_CMD[] = "spoofat";
|
||||
//const char PROGMEM BT_SOUR_APPLE_CMD[] = "sourapple";
|
||||
//const char PROGMEM BT_SWIFTPAIR_SPAM_CMD[] = "swiftpair";
|
||||
//const char PROGMEM BT_SAMSUNG_SPAM_CMD[] = "samsungblespam";
|
||||
//onst char PROGMEM BT_SPAM_ALL_CMD[] = "btspamall";
|
||||
const char PROGMEM BT_WARDRIVE_CMD[] = "btwardrive";
|
||||
const char PROGMEM BT_SKIM_CMD[] = "sniffskim";
|
||||
|
||||
@@ -150,7 +149,6 @@ const char PROGMEM HELP_SNIFF_PROBE_CMD[] = "sniffprobe";
|
||||
const char PROGMEM HELP_SNIFF_PWN_CMD[] = "sniffpwn";
|
||||
const char PROGMEM HELP_SNIFF_PINESCAN_CMD[] = "sniffpinescan";
|
||||
const char PROGMEM HELP_SNIFF_MULTISSID_CMD[] = "sniffmultissid";
|
||||
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 [-f]";
|
||||
@@ -211,10 +209,11 @@ class CommandLine {
|
||||
void runCommand(String input);
|
||||
bool checkValueExists(LinkedList<String>* cmd_args_list, int index);
|
||||
bool inRange(int max, int index);
|
||||
bool apSelected();
|
||||
//bool apSelected();
|
||||
bool hasSSIDs();
|
||||
void showCounts(int selected, int unselected = -1);
|
||||
int argSearch(LinkedList<String>* cmd_args, String key);
|
||||
void startScanFromCLI(int scan_mode, uint16_t color, String scan_name);
|
||||
|
||||
const char* ascii_art =
|
||||
"\r\n"
|
||||
@@ -244,7 +243,6 @@ class CommandLine {
|
||||
"\r\n";
|
||||
|
||||
public:
|
||||
CommandLine();
|
||||
|
||||
void RunSetup();
|
||||
void main(uint32_t currentTime);
|
||||
|
||||
+11
-17
@@ -569,7 +569,7 @@ void Display::displayBuffer(bool do_clear)
|
||||
if (display_buffer->size() > DISPLAY_BUFFER_LIMIT)
|
||||
this->printing = true;
|
||||
|
||||
#ifndef SCREEN_BUFFER
|
||||
/*#ifndef SCREEN_BUFFER
|
||||
xPos = 0;
|
||||
if ((display_buffer->size() > 0) && (!loading))
|
||||
{
|
||||
@@ -586,7 +586,7 @@ void Display::displayBuffer(bool do_clear)
|
||||
blank[(18+(yStart - TOP_FIXED_AREA) / TEXT_HEIGHT)%19] = xPos;
|
||||
else
|
||||
blank[(18+(yStart - TOP_FIXED_AREA_2) / TEXT_HEIGHT)%19] = xPos;
|
||||
#else
|
||||
#else*/
|
||||
xPos = 0;
|
||||
if (this->screen_buffer->size() >= MAX_SCREEN_BUFFER)
|
||||
this->scrollScreenBuffer();
|
||||
@@ -602,7 +602,7 @@ void Display::displayBuffer(bool do_clear)
|
||||
|
||||
this->processAndPrintString(tft, this->screen_buffer->get(i));
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
print_count--;
|
||||
}
|
||||
@@ -618,7 +618,7 @@ void Display::showCenterText(String text, int y)
|
||||
}
|
||||
|
||||
|
||||
void Display::initScrollValues(bool tte)
|
||||
/*void Display::initScrollValues(bool tte)
|
||||
{
|
||||
yDraw = YMAX - BOT_FIXED_AREA - TEXT_HEIGHT;
|
||||
|
||||
@@ -638,13 +638,12 @@ void Display::initScrollValues(bool tte)
|
||||
}
|
||||
|
||||
for(uint8_t i = 0; i < 18; i++) blank[i] = 0;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
// Function to execute hardware scroll for TFT screen
|
||||
int Display::scroll_line(uint32_t color) {
|
||||
//Serial.println("scroll_line()");
|
||||
/*int Display::scroll_line(uint32_t color) {
|
||||
int yTemp = yStart; // Store the old yStart, this is where we draw the next line
|
||||
// Use the record of line lengths to optimise the rectangle size we need to erase the top line
|
||||
|
||||
@@ -670,11 +669,11 @@ int Display::scroll_line(uint32_t color) {
|
||||
// Now we can scroll the display
|
||||
scrollAddress(yStart);
|
||||
return yTemp;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
// Function to setup hardware scroll for TFT screen
|
||||
void Display::setupScrollArea(uint16_t tfa, uint16_t bfa) {
|
||||
/*void Display::setupScrollArea(uint16_t tfa, uint16_t bfa) {
|
||||
#ifdef HAS_ILI9341
|
||||
#ifdef HAS_ST7796
|
||||
tft.writecommand(0x33);
|
||||
@@ -690,10 +689,10 @@ void Display::setupScrollArea(uint16_t tfa, uint16_t bfa) {
|
||||
tft.writedata(bfa >> 8); // Bottom Fixed Area line count
|
||||
tft.writedata(bfa);
|
||||
#endif
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
void Display::scrollAddress(uint16_t vsp) {
|
||||
/*void Display::scrollAddress(uint16_t vsp) {
|
||||
#ifdef HAS_ILI9341
|
||||
#ifdef HAS_ST7789
|
||||
tft.writecommand(ST7789_VSCRDEF); // Vertical scroll definition
|
||||
@@ -705,7 +704,7 @@ void Display::scrollAddress(uint16_t vsp) {
|
||||
tft.writedata(vsp>>8);
|
||||
tft.writedata(vsp);
|
||||
#endif
|
||||
}
|
||||
}*/
|
||||
|
||||
void Display::updateBanner(String msg)
|
||||
{
|
||||
@@ -724,9 +723,4 @@ void Display::buildBanner(String msg, int xpos)
|
||||
this->showCenterText(msg, STATUS_BAR_WIDTH);
|
||||
}
|
||||
|
||||
void Display::main(uint8_t scan_mode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -142,15 +142,14 @@ class Display
|
||||
void displayBuffer(bool do_clear = false);
|
||||
//void drawJpeg(const char *filename, int xpos, int ypos);
|
||||
void getTouchWhileFunction(bool pressed);
|
||||
void initScrollValues(bool tte = false);
|
||||
//void initScrollValues(bool tte = false);
|
||||
//void jpegInfo();
|
||||
//void jpegRender(int xpos, int ypos);
|
||||
void init();
|
||||
void main(uint8_t scan_mode);
|
||||
void RunSetup();
|
||||
void scrollAddress(uint16_t vsp);
|
||||
int scroll_line(uint32_t color);
|
||||
void setupScrollArea(uint16_t tfa, uint16_t bfa);
|
||||
//void scrollAddress(uint16_t vsp);
|
||||
//int scroll_line(uint32_t color);
|
||||
//void setupScrollArea(uint16_t tfa, uint16_t bfa);
|
||||
void showCenterText(String text, int y);
|
||||
void touchToExit();
|
||||
void twoPartDisplay(String center_text);
|
||||
|
||||
@@ -166,11 +166,9 @@ bool EvilPortal::setHtml() {
|
||||
else {
|
||||
if (html_file.size() > MAX_HTML_SIZE) {
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay(F("The given HTML is too large."));
|
||||
this->sendToDisplay("The Byte limit is " + (String)MAX_HTML_SIZE);
|
||||
this->sendToDisplay(F("Touch to exit..."));
|
||||
this->sendToDisplay(F("The given HTML is too large. Touch to exit..."));
|
||||
#endif
|
||||
Serial.println("The provided HTML is too large. Byte limit is " + (String)MAX_HTML_SIZE + "\nUse stopscan...");
|
||||
Serial.println("The provided HTML is too large.\nUse stopscan...");
|
||||
return false;
|
||||
}
|
||||
String html = "";
|
||||
@@ -228,11 +226,9 @@ bool EvilPortal::setAP(LinkedList<ssid>* ssids, LinkedList<AccessPoint>* access_
|
||||
// ap name too long. return false
|
||||
if (ap_config_file.size() > MAX_AP_NAME_SIZE) {
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay(F("The given AP name is too large."));
|
||||
this->sendToDisplay("The Byte limit is " + (String)MAX_AP_NAME_SIZE);
|
||||
this->sendToDisplay("Touch to exit...");
|
||||
this->sendToDisplay(F("The given AP name is too large. Touch to exit..."));
|
||||
#endif
|
||||
Serial.println("The provided AP name is too large. Byte limit is " + (String)MAX_AP_NAME_SIZE + "\nUse stopscan...");
|
||||
Serial.println("The provided AP name is too large.\nUse stopscan...");
|
||||
return false;
|
||||
}
|
||||
// AP name length good. Read from file into var
|
||||
@@ -257,11 +253,9 @@ bool EvilPortal::setAP(LinkedList<ssid>* ssids, LinkedList<AccessPoint>* access_
|
||||
ap_config = ssids->get(0).essid;
|
||||
if (ap_config.length() > MAX_AP_NAME_SIZE) {
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay(F("The given AP name is too large."));
|
||||
this->sendToDisplay("The Byte limit is " + (String)MAX_AP_NAME_SIZE);
|
||||
this->sendToDisplay("Touch to exit...");
|
||||
this->sendToDisplay(F("The given AP name is too large. Touch to exit..."));
|
||||
#endif
|
||||
Serial.println("The provided AP name is too large. Byte limit is " + (String)MAX_AP_NAME_SIZE + "\nUse stopscan...");
|
||||
Serial.println("The provided AP name is too large.\nUse stopscan...");
|
||||
return false;
|
||||
}
|
||||
#ifdef HAS_SCREEN
|
||||
@@ -273,11 +267,9 @@ bool EvilPortal::setAP(LinkedList<ssid>* ssids, LinkedList<AccessPoint>* access_
|
||||
else if (temp_ap_name != "") {
|
||||
if (temp_ap_name.length() > MAX_AP_NAME_SIZE) {
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay(F("The given AP name is too large."));
|
||||
this->sendToDisplay("The Byte limit is " + (String)MAX_AP_NAME_SIZE);
|
||||
this->sendToDisplay("Touch to exit...");
|
||||
this->sendToDisplay(F("The given AP name is too large. Touch to exit..."));
|
||||
#endif
|
||||
Serial.println("The given AP name is too large. Byte limit is " + (String)MAX_AP_NAME_SIZE + "\nUse stopscan...");
|
||||
Serial.println("The given AP name is too large.\nUse stopscan...");
|
||||
}
|
||||
else {
|
||||
ap_config = temp_ap_name;
|
||||
@@ -291,8 +283,7 @@ bool EvilPortal::setAP(LinkedList<ssid>* ssids, LinkedList<AccessPoint>* access_
|
||||
else {
|
||||
Serial.println(F("Could not configure Access Point. Use stopscan..."));
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay(F("Could not configure Access Point."));
|
||||
this->sendToDisplay(F("Touch to exit..."));
|
||||
this->sendToDisplay(F("Could not configure Access Point.\nTouch to exit..."));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -325,30 +316,19 @@ bool EvilPortal::setAP(String essid) {
|
||||
void EvilPortal::startAP() {
|
||||
const IPAddress AP_IP(172, 0, 0, 1);
|
||||
|
||||
Serial.print(F("starting ap "));
|
||||
Serial.println(apName);
|
||||
|
||||
WiFi.mode(WIFI_AP);
|
||||
WiFi.softAPConfig(AP_IP, AP_IP, IPAddress(255, 255, 255, 0));
|
||||
WiFi.softAP(apName);
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay(F("AP started"));
|
||||
#endif
|
||||
|
||||
Serial.print(F("ap ip address: "));
|
||||
Serial.println(WiFi.softAPIP());
|
||||
|
||||
this->setupServer();
|
||||
|
||||
Serial.println(F("Server endpoints configured"));
|
||||
|
||||
this->dnsServer.start(53, "*", WiFi.softAPIP());
|
||||
Serial.println(F("DNS Server started"));
|
||||
server.addHandler(new CaptiveRequestHandler()).setFilter(ON_AP_FILTER);
|
||||
Serial.println(F("Captive Portal handler started"));
|
||||
server.begin();
|
||||
Serial.println(F("Server started"));
|
||||
Serial.println(F("Evil Portal READY"));
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay(F("Evil Portal READY"));
|
||||
#endif
|
||||
|
||||
@@ -12,12 +12,6 @@
|
||||
|
||||
#define Pixels 1
|
||||
|
||||
#define MODE_OFF 0
|
||||
#define MODE_RAINBOW 1
|
||||
#define MODE_ATTACK 2
|
||||
#define MODE_SNIFF 3
|
||||
#define MODE_CUSTOM 4
|
||||
|
||||
extern Settings settings_obj;
|
||||
|
||||
#ifdef HAS_NEOPIXEL_LED
|
||||
|
||||
@@ -5,10 +5,6 @@
|
||||
|
||||
extern const unsigned char menu_icons[][66];
|
||||
|
||||
MenuFunctions::MenuFunctions()
|
||||
{
|
||||
}
|
||||
|
||||
void MenuFunctions::buttonNotSelected(int b, int x) {
|
||||
if (x == -1)
|
||||
x = b;
|
||||
@@ -2374,7 +2370,7 @@ void MenuFunctions::RunSetup()
|
||||
}
|
||||
});
|
||||
|
||||
this->addNodes(&wifiGeneralMenu, "Start AP", TFTGREEN, NULL, KEYBOARD_ICO, [this](){
|
||||
/*this->addNodes(&wifiGeneralMenu, "Start AP", TFTGREEN, NULL, KEYBOARD_ICO, [this](){
|
||||
ssidsMenu.parentMenu = &wifiGeneralMenu;
|
||||
|
||||
// Add the back button
|
||||
@@ -2413,7 +2409,7 @@ void MenuFunctions::RunSetup()
|
||||
});
|
||||
}
|
||||
this->changeMenu(&ssidsMenu, true);
|
||||
});
|
||||
});*/
|
||||
|
||||
wifiStationMenu.parentMenu = &ssidsMenu;
|
||||
this->addNodes(&wifiStationMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
|
||||
@@ -3379,21 +3375,6 @@ void MenuFunctions::buildSDFileMenu(bool update) {
|
||||
}
|
||||
}
|
||||
|
||||
// Function to show all MenuNodes in a Menu
|
||||
void MenuFunctions::showMenuList(Menu * menu, int layer)
|
||||
{
|
||||
// Iterate through all of the menu nodes in the menu
|
||||
for (uint8_t i = 0; i < menu->list->size(); i++)
|
||||
{
|
||||
// Depending on layer, indent
|
||||
for (uint8_t x = 0; x < layer * 4; x++)
|
||||
Serial.print(" ");
|
||||
Serial.print(F("Node: "));
|
||||
Serial.println(menu->list->get(i).name);
|
||||
}
|
||||
Serial.println();
|
||||
}
|
||||
|
||||
|
||||
// Function to add MenuNodes to a menu
|
||||
void MenuFunctions::addNodes(Menu * menu, String name, uint8_t color, Menu * child, int place, std::function<void()> callable, bool selected, String command)
|
||||
@@ -3600,8 +3581,8 @@ uint16_t MenuFunctions::getColor(uint16_t color) {
|
||||
// Function to change menu
|
||||
void MenuFunctions::changeMenu(Menu* menu, bool simple_change) {
|
||||
if (!simple_change) {
|
||||
display_obj.initScrollValues();
|
||||
display_obj.setupScrollArea(TOP_FIXED_AREA, BOT_FIXED_AREA);
|
||||
//display_obj.initScrollValues();
|
||||
//display_obj.setupScrollArea(TOP_FIXED_AREA, BOT_FIXED_AREA);
|
||||
display_obj.init();
|
||||
}
|
||||
current_menu = menu;
|
||||
|
||||
@@ -219,7 +219,6 @@ class MenuFunctions
|
||||
void addNodes(Menu* menu, String name, uint8_t color, Menu* child, int place, std::function<void()> callable, bool selected = false, String command = "");
|
||||
void battery(bool initial = false);
|
||||
void battery2(bool initial = false);
|
||||
void showMenuList(Menu* menu, int layer);
|
||||
String callSetting(String key);
|
||||
void runBoolSetting(String ley);
|
||||
void displaySetting(String key, Menu* menu, int index);
|
||||
@@ -237,8 +236,6 @@ class MenuFunctions
|
||||
#endif
|
||||
|
||||
public:
|
||||
MenuFunctions();
|
||||
|
||||
Menu* current_menu;
|
||||
Menu clearSSIDsMenu;
|
||||
Menu clearAPsMenu;
|
||||
@@ -269,10 +266,8 @@ class MenuFunctions
|
||||
|
||||
String loaded_file = "";
|
||||
|
||||
void joinWiFiGFX(String essid, bool start_ap = false);
|
||||
void setGraphScale(float scale);
|
||||
void updateStatusBar();
|
||||
void addSSIDGFX();
|
||||
void buildButtons(Menu* menu, int starting_index = 0, String button_name = "");
|
||||
void changeMenu(Menu* menu, bool simple_change = false);
|
||||
void drawStatusBar();
|
||||
|
||||
@@ -301,23 +301,3 @@ void SDInterface::performUpdate(Stream &updateSource, size_t updateSize) {
|
||||
Serial.println(F("Not enough space to begin OTA"));
|
||||
}
|
||||
}
|
||||
|
||||
bool SDInterface::checkDetectPin() {
|
||||
#ifdef KIT
|
||||
if (digitalRead(SD_DET) == LOW)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void SDInterface::main() {
|
||||
if (!this->supported) {
|
||||
if (checkDetectPin()) {
|
||||
delay(100);
|
||||
this->initSD();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ class SDInterface {
|
||||
SPIClass* _spi;
|
||||
int _cs;
|
||||
#endif
|
||||
bool checkDetectPin();
|
||||
|
||||
public:
|
||||
#ifdef HAS_C5_SD
|
||||
@@ -67,7 +66,6 @@ class SDInterface {
|
||||
File getFile(String path);
|
||||
void runUpdate(String file_name = "");
|
||||
void performUpdate(Stream &updateSource, size_t updateSize);
|
||||
void main();
|
||||
bool removeFile(String file_path);
|
||||
};
|
||||
|
||||
|
||||
@@ -7,10 +7,18 @@
|
||||
extern Display display_obj;
|
||||
|
||||
// Keyboard will occupy the bottom half of the screen.
|
||||
static inline int16_t kbHeight() { return TFT_HEIGHT / 2; }
|
||||
static inline int16_t kbYStart() { return TFT_HEIGHT - kbHeight(); }
|
||||
static inline int16_t kbWidth() { return TFT_WIDTH; }
|
||||
static inline int16_t kbXStart() { return 0; }
|
||||
static inline int16_t kbHeight() {
|
||||
return TFT_HEIGHT / 2;
|
||||
}
|
||||
static inline int16_t kbYStart() {
|
||||
return TFT_HEIGHT - kbHeight();
|
||||
}
|
||||
static inline int16_t kbWidth() {
|
||||
return TFT_WIDTH;
|
||||
}
|
||||
static inline int16_t kbXStart() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const int KEY_ROWS = 5;
|
||||
|
||||
@@ -54,13 +62,13 @@ static void drawTextArea(const char *title, const char *buffer) {
|
||||
}
|
||||
|
||||
static void drawKeyboard(KeyboardLayout layout, bool caps) {
|
||||
const int16_t kY = kbYStart();
|
||||
const int16_t kH = kbHeight();
|
||||
const int16_t kX = kbXStart();
|
||||
const int16_t kW = kbWidth();
|
||||
const int16_t kY = kbYStart();
|
||||
const int16_t kH = kbHeight();
|
||||
const int16_t kX = kbXStart();
|
||||
const int16_t kW = kbWidth();
|
||||
|
||||
const int maxCols = 10;
|
||||
const int rows = KEY_ROWS;
|
||||
const int rows = KEY_ROWS;
|
||||
|
||||
const int16_t cellW = kW / maxCols;
|
||||
const int16_t cellH = kH / rows;
|
||||
@@ -77,8 +85,8 @@ static void drawKeyboard(KeyboardLayout layout, bool caps) {
|
||||
};
|
||||
|
||||
const char **rowsPtr = (layout == LAYOUT_ALPHA)
|
||||
? (const char **)rowStringsAlpha
|
||||
: (const char **)rowStringsSym;
|
||||
? (const char **)rowStringsAlpha
|
||||
: (const char **)rowStringsSym;
|
||||
|
||||
// Draw normal character rows (0–3)
|
||||
for (int r = 0; r < 4; ++r) {
|
||||
@@ -148,13 +156,13 @@ static void drawKeyboard(KeyboardLayout layout, bool caps) {
|
||||
|
||||
// Divide width into 6 segments:
|
||||
// [CANCEL][SYMB][SPACE (2 segments)][BKSP][OK]
|
||||
int16_t segW = kW / 6;
|
||||
int16_t segW = kW / 6;
|
||||
int16_t x0 = kX;
|
||||
int16_t x1 = x0 + segW; // end CANCEL
|
||||
int16_t x2 = x1 + segW; // end SYMB
|
||||
int16_t x3 = x2 + 2 * segW; // end SPACE
|
||||
int16_t x4 = x3 + segW; // end BKSP
|
||||
int16_t x5 = x4 + segW; // end OK
|
||||
int16_t x1 = x0 + segW; // end CANCEL
|
||||
int16_t x2 = x1 + segW; // end SYMB
|
||||
int16_t x3 = x2 + 2 * segW; // end SPACE
|
||||
int16_t x4 = x3 + segW; // end BKSP
|
||||
int16_t x5 = x4 + segW; // end OK
|
||||
|
||||
// CANCEL
|
||||
display_obj.tft.drawRect(x0, rowY, segW, cellH, TFT_BLACK);
|
||||
@@ -199,10 +207,10 @@ static KeyboardResult handleKeyboardTouch(uint16_t tx, uint16_t ty,
|
||||
bool caps) {
|
||||
if (!buffer || bufLen < 2) return KB_NONE;
|
||||
|
||||
const int16_t kY = kbYStart();
|
||||
const int16_t kH = kbHeight();
|
||||
const int16_t kX = kbXStart();
|
||||
const int16_t kW = kbWidth();
|
||||
const int16_t kY = kbYStart();
|
||||
const int16_t kH = kbHeight();
|
||||
const int16_t kX = kbXStart();
|
||||
const int16_t kW = kbWidth();
|
||||
|
||||
if (ty < kY || ty >= (kY + kH)) {
|
||||
// Touch is outside keyboard area
|
||||
@@ -210,7 +218,7 @@ static KeyboardResult handleKeyboardTouch(uint16_t tx, uint16_t ty,
|
||||
}
|
||||
|
||||
const int maxCols = 10;
|
||||
const int rows = KEY_ROWS;
|
||||
const int rows = KEY_ROWS;
|
||||
const int16_t cellW = kW / maxCols;
|
||||
const int16_t cellH = kH / rows;
|
||||
|
||||
@@ -225,8 +233,8 @@ static KeyboardResult handleKeyboardTouch(uint16_t tx, uint16_t ty,
|
||||
};
|
||||
|
||||
const char **rowsPtr = (layout == LAYOUT_ALPHA)
|
||||
? (const char **)rowStringsAlpha
|
||||
: (const char **)rowStringsSym;
|
||||
? (const char **)rowStringsAlpha
|
||||
: (const char **)rowStringsSym;
|
||||
|
||||
// Normal rows (0..3)
|
||||
if (rowIndex >= 0 && rowIndex <= 3) {
|
||||
@@ -238,7 +246,7 @@ static KeyboardResult handleKeyboardTouch(uint16_t tx, uint16_t ty,
|
||||
// Alpha row 3: characters on columns 0..7, CAPS on columns 8..9
|
||||
if (layout == LAYOUT_ALPHA && rowIndex == 3) {
|
||||
int16_t capsXStart = kX + 8 * cellW;
|
||||
int16_t capsXEnd = capsXStart + 2 * cellW;
|
||||
int16_t capsXEnd = capsXStart + 2 * cellW;
|
||||
|
||||
// Check CAPS region
|
||||
if (tx >= capsXStart && tx < capsXEnd) {
|
||||
@@ -297,13 +305,13 @@ static KeyboardResult handleKeyboardTouch(uint16_t tx, uint16_t ty,
|
||||
if (rowIndex == 4) {
|
||||
int16_t rowY = kY + rowIndex * cellH;
|
||||
|
||||
int16_t segW = kW / 6;
|
||||
int16_t segW = kW / 6;
|
||||
int16_t x0 = kX;
|
||||
int16_t x1 = x0 + segW; // end CANCEL
|
||||
int16_t x2 = x1 + segW; // end SYMB
|
||||
int16_t x3 = x2 + 2 * segW; // end SPACE
|
||||
int16_t x4 = x3 + segW; // end BKSP
|
||||
int16_t x5 = x4 + segW; // end OK
|
||||
int16_t x1 = x0 + segW; // end CANCEL
|
||||
int16_t x2 = x1 + segW; // end SYMB
|
||||
int16_t x3 = x2 + 2 * segW; // end SPACE
|
||||
int16_t x4 = x3 + segW; // end BKSP
|
||||
int16_t x5 = x4 + segW; // end OK
|
||||
|
||||
// CANCEL
|
||||
if (tx >= x0 && tx < x1) {
|
||||
|
||||
+271
-499
File diff suppressed because it is too large
Load Diff
+12
-13
@@ -64,7 +64,7 @@
|
||||
#include "xiaoLED.h"
|
||||
#elif defined(MARAUDER_M5STICKC)
|
||||
#include "stickcLED.h"
|
||||
#else
|
||||
#elif defined(HAS_NEOPIXEL_LED)
|
||||
#include "LedInterface.h"
|
||||
#endif
|
||||
|
||||
@@ -220,7 +220,7 @@ extern Settings settings_obj;
|
||||
extern xiaoLED xiao_led;
|
||||
#elif defined(MARAUDER_M5STICKC)
|
||||
extern stickcLED stickc_led;
|
||||
#else
|
||||
#elif defined(HAS_NEOPIXEL_LED)
|
||||
extern LedInterface led_obj;
|
||||
#endif
|
||||
|
||||
@@ -322,9 +322,6 @@ class WiFiScan
|
||||
NimBLEScan* pBLEScan;
|
||||
#endif
|
||||
|
||||
//String connected_network = "";
|
||||
//const String alfa = "1234567890qwertyuiopasdfghjkklzxcvbnm QWERTYUIOPASDFGHJKLZXCVBNM_";
|
||||
|
||||
const char* rick_roll[8] = {
|
||||
"01 Never gonna give you up",
|
||||
"02 Never gonna let you down",
|
||||
@@ -566,6 +563,11 @@ class WiFiScan
|
||||
NimBLEAdvertisementData GetUniversalAdvertisementData(EBLEPayloadType type);
|
||||
#endif
|
||||
|
||||
void displayTransmitRate();
|
||||
void prepareScanStage(uint16_t color_1, uint16_t color_2);
|
||||
void setLEDMode(int mode);
|
||||
void setWiFiMode(wifi_mode_t mode, wifi_promiscuous_cb_t cb);
|
||||
void writeNetworkInfo();
|
||||
void setupScanDisplayArea(uint16_t background, uint16_t color);
|
||||
void updateTrackerUI();
|
||||
void showNetworkInfo();
|
||||
@@ -579,7 +581,7 @@ class WiFiScan
|
||||
bool checkHostPort(IPAddress ip, uint16_t port, uint16_t timeout = 100);
|
||||
String extractManufacturer(const uint8_t* payload);
|
||||
int checkMatchAP(char addr[], bool update_ap = true);
|
||||
bool beaconHasWPS(const uint8_t* payload, int len);
|
||||
//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 mac_cmp(struct mac_addr addr1, struct mac_addr addr2);
|
||||
@@ -606,10 +608,10 @@ class WiFiScan
|
||||
void updateMidway();
|
||||
bool sendSAECommitFrame(uint8_t* targ_addr, uint8_t* src_addr) ;
|
||||
void sendProbeAttack(uint32_t currentTime);
|
||||
void sendDeauthAttack(uint32_t currentTime, String dst_mac_str = "ff:ff:ff:ff:ff:ff");
|
||||
//void sendDeauthAttack(uint32_t currentTime, String dst_mac_str = "ff:ff:ff:ff:ff:ff");
|
||||
void sendBadMsgAttack(uint32_t currentTime, bool all = false);
|
||||
void sendAssocSleepAttack(uint32_t currentTime, bool all = false);
|
||||
void sendDeauthFrame(uint8_t bssid[6], int channel, String dst_mac_str = "ff:ff:ff:ff:ff:ff");
|
||||
//void sendDeauthFrame(uint8_t bssid[6], int channel, String dst_mac_str = "ff:ff:ff:ff:ff:ff");
|
||||
void sendDeauthFrame(uint8_t bssid[6], int channel, uint8_t mac[6]);
|
||||
void sendEapolBagMsg1(uint8_t bssid[6], int channel, String dst_mac_str = "ff:ff:ff:ff:ff:ff", uint8_t sec = WIFI_SECURITY_WPA2);
|
||||
void sendEapolBagMsg1(uint8_t bssid[6], int channel, uint8_t mac[6], uint8_t sec = WIFI_SECURITY_WPA2);
|
||||
@@ -645,8 +647,6 @@ class WiFiScan
|
||||
|
||||
|
||||
public:
|
||||
WiFiScan();
|
||||
|
||||
//AccessPoint ap_list;
|
||||
|
||||
//LinkedList<ssid>* ssids;
|
||||
@@ -840,7 +840,7 @@ class WiFiScan
|
||||
bool shutdownBLE();
|
||||
bool scanning();
|
||||
bool joinWiFi(String ssid, String password, bool gui = true);
|
||||
bool startWiFi(String ssid, String password, bool gui = true);
|
||||
//bool startWiFi(String ssid, String password, bool gui = true);
|
||||
void getMAC(bool get_sta, uint8_t* mac);
|
||||
void changeChannel(int chan = -1);
|
||||
void RunAPInfo(uint16_t index, bool do_display = true);
|
||||
@@ -881,7 +881,6 @@ class WiFiScan
|
||||
static inline uint16_t le16(const uint8_t *p);
|
||||
static void getMAC(char *addr, uint8_t* data, uint16_t offset);
|
||||
static void getMAC(uint8_t* mac, const uint8_t* data, uint16_t offset);
|
||||
static void pwnSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
static void beaconSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
//static void rawSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
static void stationSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
@@ -890,7 +889,7 @@ class WiFiScan
|
||||
//static void deauthSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
//static void probeSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
//static void beaconListSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
static void activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
//static void activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
static void eapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
static void wifiSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
static void pineScanSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type); // Pineapple
|
||||
|
||||
@@ -47,6 +47,12 @@
|
||||
|
||||
#define DISPLAY_BUFFER_LIMIT 20
|
||||
|
||||
#define MODE_OFF 0
|
||||
#define MODE_RAINBOW 1
|
||||
#define MODE_ATTACK 2
|
||||
#define MODE_SNIFF 3
|
||||
#define MODE_CUSTOM 4
|
||||
|
||||
//// HARDWARE NAMES
|
||||
#ifdef MARAUDER_M5STICKC
|
||||
#define HARDWARE_NAME "M5Stick-C Plus"
|
||||
@@ -1044,6 +1050,10 @@
|
||||
|
||||
#define EXT_BUTTON_WIDTH 30
|
||||
|
||||
#define SCREEN_BUFFER
|
||||
|
||||
#define MAX_SCREEN_BUFFER 21
|
||||
|
||||
#define SCREEN_ORIENTATION 0
|
||||
|
||||
#define CHAR_WIDTH 12
|
||||
@@ -1683,6 +1693,10 @@
|
||||
|
||||
#define EXT_BUTTON_WIDTH 30
|
||||
|
||||
#define SCREEN_BUFFER
|
||||
|
||||
#define MAX_SCREEN_BUFFER 21
|
||||
|
||||
#define SCREEN_ORIENTATION 0
|
||||
|
||||
#define CHAR_WIDTH 12
|
||||
|
||||
@@ -12,16 +12,7 @@ https://www.online-utility.org/image/convert/to/XBM
|
||||
#define Display_h
|
||||
#endif
|
||||
|
||||
//#include <WiFi.h>
|
||||
//#include "EvilPortal.h"
|
||||
//#include <Wire.h>
|
||||
//#include "esp_wifi.h"
|
||||
//#include "esp_wifi_types.h"
|
||||
#include <stdio.h>
|
||||
//#include "freertos/FreeRTOS.h"
|
||||
//#include "freertos/task.h"
|
||||
//#include "esp_system.h"
|
||||
//#include <Arduino.h>
|
||||
|
||||
#ifdef HAS_GPS
|
||||
#include "GpsInterface.h"
|
||||
@@ -111,7 +102,7 @@ CommandLine cli_obj;
|
||||
xiaoLED xiao_led;
|
||||
#elif defined(MARAUDER_M5STICKC) || defined(MARAUDER_M5STICKCP2)
|
||||
stickcLED stickc_led;
|
||||
#else
|
||||
#elif defined(HAS_NEOPIXEL_LED)
|
||||
LedInterface led_obj;
|
||||
#endif
|
||||
|
||||
@@ -314,8 +305,6 @@ void setup()
|
||||
display_obj.headless_mode = true;
|
||||
|
||||
backlightOff();
|
||||
|
||||
Serial.println(F("Headless Mode enabled"));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -362,7 +351,7 @@ void setup()
|
||||
xiao_led.RunSetup();
|
||||
#elif defined(MARAUDER_M5STICKC)
|
||||
stickc_led.RunSetup();
|
||||
#else
|
||||
#elif defined(HAS_NEOPIXEL_LED)
|
||||
led_obj.RunSetup();
|
||||
#endif
|
||||
|
||||
@@ -390,7 +379,6 @@ void setup()
|
||||
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
|
||||
|
||||
Serial.println(F("CLI Ready"));
|
||||
cli_obj.RunSetup();
|
||||
}
|
||||
|
||||
@@ -424,19 +412,11 @@ void loop()
|
||||
|
||||
// Update all of our objects
|
||||
cli_obj.main(currentTime);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.main(wifi_scan_obj.currentScanMode);
|
||||
#endif
|
||||
wifi_scan_obj.main(currentTime);
|
||||
|
||||
#ifdef HAS_GPS
|
||||
gps_obj.main();
|
||||
#endif
|
||||
|
||||
// Detect SD card
|
||||
#if defined(HAS_SD)
|
||||
sd_obj.main();
|
||||
#endif
|
||||
|
||||
// Save buffer to SD and/or serial
|
||||
buffer_obj.save();
|
||||
@@ -444,7 +424,6 @@ void loop()
|
||||
#ifdef HAS_BATTERY
|
||||
battery_obj.main(currentTime);
|
||||
#endif
|
||||
settings_obj.main(currentTime);
|
||||
if ((wifi_scan_obj.currentScanMode != WIFI_PACKET_MONITOR) ||
|
||||
(mini)) {
|
||||
#ifdef HAS_SCREEN
|
||||
@@ -457,7 +436,7 @@ void loop()
|
||||
xiao_led.main();
|
||||
#elif defined(MARAUDER_M5STICKC)
|
||||
stickc_led.main();
|
||||
#else
|
||||
#elif defined(HAS_NEOPIXEL_LED)
|
||||
led_obj.main(currentTime);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ String Settings::getSettingsString() {
|
||||
|
||||
bool Settings::begin() {
|
||||
if(!SPIFFS.begin(FORMAT_SPIFFS_IF_FAILED)){
|
||||
Serial.println("Settings SPIFFS Mount Failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -19,7 +18,6 @@ bool Settings::begin() {
|
||||
|
||||
if (!settingsFile) {
|
||||
settingsFile.close();
|
||||
Serial.println(F("Could not find settings file"));
|
||||
if (this->createDefaultSettings(SPIFFS))
|
||||
return true;
|
||||
else
|
||||
@@ -27,7 +25,6 @@ bool Settings::begin() {
|
||||
}
|
||||
}
|
||||
else {
|
||||
Serial.println("Settings file does not exist");
|
||||
if (this->createDefaultSettings(SPIFFS))
|
||||
return true;
|
||||
else
|
||||
@@ -367,10 +364,8 @@ bool Settings::createDefaultSettings(fs::FS &fs, bool spec, uint8_t index, Strin
|
||||
|
||||
//jsonBuffer.printTo(settingsFile);
|
||||
if (serializeJson(jsonBuffer, settingsFile) == 0) {
|
||||
Serial.println(F("Failed to write to file"));
|
||||
}
|
||||
if (serializeJson(jsonBuffer, settings_string) == 0) {
|
||||
Serial.println(F("Failed to write to string"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,11 +386,9 @@ bool Settings::createDefaultSettings(fs::FS &fs, bool spec, uint8_t index, Strin
|
||||
json["Settings"][index]["range"]["max"] = true;
|
||||
|
||||
if (serializeJson(json, settings_string) == 0) {
|
||||
Serial.println("Failed to write to string");
|
||||
}
|
||||
|
||||
if (serializeJson(json, settingsFile) == 0) {
|
||||
Serial.println("Failed to write to file");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,11 +401,9 @@ bool Settings::createDefaultSettings(fs::FS &fs, bool spec, uint8_t index, Strin
|
||||
json["Settings"][index]["range"]["max"] = "";
|
||||
|
||||
if (serializeJson(json, settings_string) == 0) {
|
||||
Serial.println("Failed to write to string");
|
||||
}
|
||||
|
||||
if (serializeJson(json, settingsFile) == 0) {
|
||||
Serial.println("Failed to write to file");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -426,7 +417,3 @@ bool Settings::createDefaultSettings(fs::FS &fs, bool spec, uint8_t index, Strin
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Settings::main(uint32_t currentTime) {
|
||||
|
||||
}
|
||||
|
||||
@@ -39,22 +39,9 @@ class Settings {
|
||||
String setting_index_to_name(int i);
|
||||
int getNumberSettings();
|
||||
|
||||
//template<>
|
||||
//int loadSetting<int>(String key);
|
||||
|
||||
//template<>
|
||||
//String loadSetting<String>(String key);
|
||||
|
||||
//template<>
|
||||
//bool loadSetting<bool>(String key);
|
||||
|
||||
//template<>
|
||||
//uint8_t loadSetting<uint8_t>(String key);
|
||||
|
||||
String getSettingsString();
|
||||
bool createDefaultSettings(fs::FS &fs, bool spec = false, uint8_t index = 0, String typeStr = "bool", String name = "");
|
||||
void printJsonSettings(String json_string);
|
||||
void main(uint32_t currentTime);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user