mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-22 23:26:45 -08:00
Fake wifi functions
This commit is contained in:
@@ -673,6 +673,7 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
if ((wifi_scan_obj.currentScanMode != WIFI_SCAN_OFF ) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_ATTACK_BEACON_SPAM) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_ATTACK_AUTH) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_ATTACK_MIMIC) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_ATTACK_RICK_ROLL))
|
||||
//(wifi_scan_obj.currentScanMode != WIFI_ATTACK_BEACON_LIST))
|
||||
display_obj.displayBuffer();
|
||||
@@ -712,6 +713,7 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_DEAUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_AUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_MIMIC) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_RICK_ROLL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_LIST) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_ALL) ||
|
||||
@@ -737,6 +739,7 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
// This is for when on a menu
|
||||
if ((wifi_scan_obj.currentScanMode != WIFI_ATTACK_BEACON_SPAM) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_ATTACK_AUTH) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_ATTACK_MIMIC) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_ATTACK_RICK_ROLL))
|
||||
//(wifi_scan_obj.currentScanMode != WIFI_ATTACK_BEACON_LIST))
|
||||
{
|
||||
@@ -1212,6 +1215,11 @@ void MenuFunctions::RunSetup()
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_ATTACK_AUTH, TFT_RED);
|
||||
});
|
||||
//addNodes(&wifiAttackMenu, "AP Mimic Flood", TFT_PURPLE, NULL, DEAUTH_SNIFF, [this]() {
|
||||
// display_obj.clearScreen();
|
||||
// this->drawStatusBar();
|
||||
// wifi_scan_obj.StartScan(WIFI_ATTACK_MIMIC, TFT_PURPLE);
|
||||
//});
|
||||
|
||||
// Build WiFi General menu
|
||||
wifiGeneralMenu.parentMenu = &wifiMenu;
|
||||
|
||||
@@ -344,6 +344,7 @@ void WiFiScan::StopScan(uint8_t scan_mode)
|
||||
(currentScanMode == WIFI_ATTACK_BEACON_LIST) ||
|
||||
(currentScanMode == WIFI_ATTACK_BEACON_SPAM) ||
|
||||
(currentScanMode == WIFI_ATTACK_AUTH) ||
|
||||
(currentScanMode == WIFI_ATTACK_MIMIC) ||
|
||||
(currentScanMode == WIFI_ATTACK_RICK_ROLL) ||
|
||||
(currentScanMode == WIFI_PACKET_MONITOR) ||
|
||||
(currentScanMode == LV_JOIN_WIFI))
|
||||
@@ -830,6 +831,37 @@ void WiFiScan::RunBeaconList(uint8_t scan_mode, uint16_t color)
|
||||
}
|
||||
*/
|
||||
|
||||
// Function to prepare for beacon mimic
|
||||
void WiFiScan::RunMimicFlood(uint8_t scan_mode, uint16_t color) {
|
||||
display_obj.TOP_FIXED_AREA_2 = 48;
|
||||
display_obj.tteBar = true;
|
||||
display_obj.print_delay_1 = 15;
|
||||
display_obj.print_delay_2 = 10;
|
||||
//display_obj.clearScreen();
|
||||
display_obj.initScrollValues(true);
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setTextColor(TFT_BLACK, color);
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(" Mimic Flood ",120,16,2);
|
||||
display_obj.touchToExit();
|
||||
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
packets_sent = 0;
|
||||
//esp_wifi_set_mode(WIFI_MODE_STA);
|
||||
//WiFi.mode(WIFI_AP_STA);
|
||||
esp_wifi_init(&cfg);
|
||||
esp_wifi_set_storage(WIFI_STORAGE_RAM);
|
||||
//WiFi.mode(WIFI_AP_STA);
|
||||
esp_wifi_set_mode(WIFI_AP_STA);
|
||||
esp_wifi_start();
|
||||
esp_wifi_set_promiscuous_filter(NULL);
|
||||
esp_wifi_set_promiscuous(true);
|
||||
esp_wifi_set_max_tx_power(78);
|
||||
this->wifi_initialized = true;
|
||||
initTime = millis();
|
||||
//display_obj.clearScreen();
|
||||
//Serial.println("End of func");
|
||||
}
|
||||
|
||||
// Function to prepare for beacon spam
|
||||
void WiFiScan::RunProbeFlood(uint8_t scan_mode, uint16_t color) {
|
||||
display_obj.TOP_FIXED_AREA_2 = 48;
|
||||
@@ -2536,6 +2568,13 @@ void WiFiScan::channelHop()
|
||||
delay(1);
|
||||
}
|
||||
|
||||
char* WiFiScan::stringToChar(String string) {
|
||||
char buf[string.length() + 1] = {};
|
||||
string.toCharArray(buf, string.length() + 1);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
// Function for updating scan status
|
||||
void WiFiScan::main(uint32_t currentTime)
|
||||
@@ -2581,6 +2620,37 @@ void WiFiScan::main(uint32_t currentTime)
|
||||
packets_sent = 0;
|
||||
}
|
||||
}
|
||||
else if ((currentScanMode == WIFI_ATTACK_MIMIC)) {
|
||||
// Need this for loop because getTouch causes ~10ms delay
|
||||
// which makes beacon spam less effective
|
||||
for (int i = 0; i < access_points->size(); i++) {
|
||||
if (access_points->get(i).selected)
|
||||
this->broadcastCustomBeacon(currentTime, ssid{access_points->get(i).essid, {random(256),
|
||||
random(256),
|
||||
random(256),
|
||||
random(256),
|
||||
random(256),
|
||||
random(256)}});
|
||||
}
|
||||
|
||||
|
||||
if (currentTime - initTime >= 1000)
|
||||
{
|
||||
initTime = millis();
|
||||
//Serial.print("packets/sec: ");
|
||||
//Serial.println(packets_sent);
|
||||
String displayString = "";
|
||||
String displayString2 = "";
|
||||
displayString.concat("packets/sec: ");
|
||||
displayString.concat(packets_sent);
|
||||
for (int x = 0; x < STANDARD_FONT_CHAR_LIMIT; x++)
|
||||
displayString2.concat(" ");
|
||||
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
display_obj.showCenterText(displayString2, 160);
|
||||
display_obj.showCenterText(displayString, 160);
|
||||
packets_sent = 0;
|
||||
}
|
||||
}
|
||||
else if ((currentScanMode == WIFI_ATTACK_BEACON_SPAM))
|
||||
{
|
||||
// Need this for loop because getTouch causes ~10ms delay
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#define WIFI_SCAN_TARGET_AP 16
|
||||
#define LV_SELECT_AP 17
|
||||
#define WIFI_ATTACK_AUTH 18
|
||||
#define WIFI_ATTACK_MIMIC 19
|
||||
|
||||
#define GRAPH_REFRESH 100
|
||||
|
||||
@@ -198,6 +199,7 @@ class WiFiScan
|
||||
void RunRickRoll(uint8_t scan_mode, uint16_t color);
|
||||
void RunBeaconSpam(uint8_t scan_mode, uint16_t color);
|
||||
void RunProbeFlood(uint8_t scan_mode, uint16_t color);
|
||||
void RunMimicFlood(uint8_t scan_mode, uint16_t color);
|
||||
void RunBeaconList(uint8_t scan_mode, uint16_t color);
|
||||
void RunEspressifScan(uint8_t scan_mode, uint16_t color);
|
||||
void RunPwnScan(uint8_t scan_mode, uint16_t color);
|
||||
@@ -231,8 +233,9 @@ class WiFiScan
|
||||
|
||||
//lv_obj_t * scr = lv_cont_create(NULL, NULL);
|
||||
|
||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||
|
||||
char* stringToChar(String string);
|
||||
void RunSetup();
|
||||
int clearSSIDs();
|
||||
int clearAPs();
|
||||
|
||||
Reference in New Issue
Block a user