mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-23 07:29:14 -08:00
Add wardrive array
This commit is contained in:
@@ -45,18 +45,18 @@ char index_html[MAX_HTML_SIZE] = "TEST";
|
|||||||
struct ssid {
|
struct ssid {
|
||||||
String essid;
|
String essid;
|
||||||
uint8_t channel;
|
uint8_t channel;
|
||||||
int bssid[6];
|
uint8_t bssid[6];
|
||||||
bool selected;
|
bool selected;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AccessPoint {
|
struct AccessPoint {
|
||||||
String essid;
|
String essid;
|
||||||
int channel;
|
uint8_t channel;
|
||||||
int bssid[6];
|
uint8_t bssid[6];
|
||||||
bool selected;
|
bool selected;
|
||||||
LinkedList<char>* beacon;
|
LinkedList<char>* beacon;
|
||||||
int rssi;
|
char rssi;
|
||||||
LinkedList<int>* stations;
|
LinkedList<uint8_t>* stations;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CaptiveRequestHandler : public AsyncWebHandler {
|
class CaptiveRequestHandler : public AsyncWebHandler {
|
||||||
|
|||||||
@@ -2132,8 +2132,7 @@ void MenuFunctions::showMenuList(Menu * menu, int layer)
|
|||||||
void MenuFunctions::addNodes(Menu * menu, String name, uint16_t color, Menu * child, int place, std::function<void()> callable, bool selected, String command)
|
void MenuFunctions::addNodes(Menu * menu, String name, uint16_t color, Menu * child, int place, std::function<void()> callable, bool selected, String command)
|
||||||
{
|
{
|
||||||
TFT_eSPI_Button new_button;
|
TFT_eSPI_Button new_button;
|
||||||
menu->list->add(MenuNode{name, command, color, place, &new_button, selected, callable});
|
menu->list->add(MenuNode{name, false, color, place, &new_button, selected, callable});
|
||||||
//menu->list->add(MenuNode{name, color, place, callable});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MenuFunctions::buildButtons(Menu * menu, int starting_index)
|
void MenuFunctions::buildButtons(Menu * menu, int starting_index)
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ struct Menu;
|
|||||||
|
|
||||||
struct MenuNode {
|
struct MenuNode {
|
||||||
String name;
|
String name;
|
||||||
String command;
|
bool command;
|
||||||
uint16_t color;
|
uint16_t color;
|
||||||
uint8_t icon;
|
uint8_t icon;
|
||||||
TFT_eSPI_Button* button;
|
TFT_eSPI_Button* button;
|
||||||
|
|||||||
@@ -1718,7 +1718,7 @@ void WiFiScan::apSnifferCallbackFull(void* buf, wifi_promiscuous_pkt_type_t type
|
|||||||
ap.bssid[4] = snifferPacket->payload[14];
|
ap.bssid[4] = snifferPacket->payload[14];
|
||||||
ap.bssid[5] = snifferPacket->payload[15];
|
ap.bssid[5] = snifferPacket->payload[15];
|
||||||
ap.selected = false;
|
ap.selected = false;
|
||||||
ap.stations = new LinkedList<int>();
|
ap.stations = new LinkedList<uint8_t>();
|
||||||
|
|
||||||
ap.beacon = new LinkedList<char>();
|
ap.beacon = new LinkedList<char>();
|
||||||
|
|
||||||
@@ -1866,7 +1866,7 @@ void WiFiScan::apSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
|
|||||||
false,
|
false,
|
||||||
NULL,
|
NULL,
|
||||||
snifferPacket->rx_ctrl.rssi,
|
snifferPacket->rx_ctrl.rssi,
|
||||||
new LinkedList<int>()};
|
new LinkedList<uint8_t>()};
|
||||||
|
|
||||||
access_points->add(ap);
|
access_points->add(ap);
|
||||||
|
|
||||||
@@ -2582,7 +2582,7 @@ void WiFiScan::broadcastCustomBeacon(uint32_t current_time, ssid custom_ssid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Function to send beacons with random ESSID length
|
// Function to send beacons with random ESSID length
|
||||||
void WiFiScan::broadcastSetSSID(uint32_t current_time, char* ESSID) {
|
void WiFiScan::broadcastSetSSID(uint32_t current_time, const char* ESSID) {
|
||||||
set_channel = random(1,12);
|
set_channel = random(1,12);
|
||||||
esp_wifi_set_channel(set_channel, WIFI_SECOND_CHAN_NONE);
|
esp_wifi_set_channel(set_channel, WIFI_SECOND_CHAN_NONE);
|
||||||
delay(1);
|
delay(1);
|
||||||
@@ -2731,7 +2731,7 @@ void WiFiScan::sendProbeAttack(uint32_t currentTime) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WiFiScan::sendDeauthFrame(int bssid[6], int channel, uint8_t mac[6]) {
|
void WiFiScan::sendDeauthFrame(uint8_t bssid[6], int channel, uint8_t mac[6]) {
|
||||||
WiFiScan::set_channel = channel;
|
WiFiScan::set_channel = channel;
|
||||||
esp_wifi_set_channel(channel, WIFI_SECOND_CHAN_NONE);
|
esp_wifi_set_channel(channel, WIFI_SECOND_CHAN_NONE);
|
||||||
delay(1);
|
delay(1);
|
||||||
|
|||||||
@@ -125,6 +125,12 @@ esp_err_t esp_wifi_80211_tx(wifi_interface_t ifx, const void *buffer, int len, b
|
|||||||
LinkedList<int>* stations;
|
LinkedList<int>* stations;
|
||||||
};*/
|
};*/
|
||||||
|
|
||||||
|
#define mac_history_len 512
|
||||||
|
|
||||||
|
struct mac_addr {
|
||||||
|
unsigned char bytes[6];
|
||||||
|
};
|
||||||
|
|
||||||
struct Station {
|
struct Station {
|
||||||
uint8_t mac[6];
|
uint8_t mac[6];
|
||||||
bool selected;
|
bool selected;
|
||||||
@@ -133,8 +139,11 @@ struct Station {
|
|||||||
class WiFiScan
|
class WiFiScan
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
// Wardriver thanks to https://github.com/JosephHewitt
|
||||||
|
struct mac_addr mac_history[mac_history_len];
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
int channel_hop_delay = 1;
|
uint8_t channel_hop_delay = 1;
|
||||||
bool force_pmkid = false;
|
bool force_pmkid = false;
|
||||||
bool force_probe = false;
|
bool force_probe = false;
|
||||||
bool save_pcap = false;
|
bool save_pcap = false;
|
||||||
@@ -161,7 +170,7 @@ class WiFiScan
|
|||||||
uint32_t initTime = 0;
|
uint32_t initTime = 0;
|
||||||
bool run_setup = true;
|
bool run_setup = true;
|
||||||
void initWiFi(uint8_t scan_mode);
|
void initWiFi(uint8_t scan_mode);
|
||||||
int bluetoothScanTime = 5;
|
uint8_t bluetoothScanTime = 5;
|
||||||
int packets_sent = 0;
|
int packets_sent = 0;
|
||||||
const wifi_promiscuous_filter_t filt = {.filter_mask=WIFI_PROMIS_FILTER_MASK_MGMT | WIFI_PROMIS_FILTER_MASK_DATA};
|
const wifi_promiscuous_filter_t filt = {.filter_mask=WIFI_PROMIS_FILTER_MASK_MGMT | WIFI_PROMIS_FILTER_MASK_DATA};
|
||||||
#ifdef HAS_BT
|
#ifdef HAS_BT
|
||||||
@@ -169,9 +178,9 @@ class WiFiScan
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//String connected_network = "";
|
//String connected_network = "";
|
||||||
String alfa = "1234567890qwertyuiopasdfghjkklzxcvbnm QWERTYUIOPASDFGHJKLZXCVBNM_";
|
const String alfa = "1234567890qwertyuiopasdfghjkklzxcvbnm QWERTYUIOPASDFGHJKLZXCVBNM_";
|
||||||
|
|
||||||
char* rick_roll[8] = {
|
const char* rick_roll[8] = {
|
||||||
"01 Never gonna give you up",
|
"01 Never gonna give you up",
|
||||||
"02 Never gonna let you down",
|
"02 Never gonna let you down",
|
||||||
"03 Never gonna run around",
|
"03 Never gonna run around",
|
||||||
@@ -212,16 +221,6 @@ class WiFiScan
|
|||||||
/* SSID */
|
/* SSID */
|
||||||
/*36*/ 0x00
|
/*36*/ 0x00
|
||||||
};
|
};
|
||||||
uint8_t auth_packet[65] = {0xb0, 0x00, 0x3c, 0x00,
|
|
||||||
0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
|
|
||||||
0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
|
|
||||||
0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
|
|
||||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
|
||||||
0x7f, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x40, 0xdd, 0x0b, 0x00, 0x17, 0xf2, 0x0a,
|
|
||||||
0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0xdd,
|
|
||||||
0x0a, 0x00, 0x10, 0x18, 0x02, 0x00, 0x00, 0x10,
|
|
||||||
0x00, 0x00, 0x00};
|
|
||||||
|
|
||||||
uint8_t prob_req_packet[128] = {0x40, 0x00, 0x00, 0x00,
|
uint8_t prob_req_packet[128] = {0x40, 0x00, 0x00, 0x00,
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // Destination
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // Destination
|
||||||
@@ -254,11 +253,11 @@ class WiFiScan
|
|||||||
void sendProbeAttack(uint32_t currentTime);
|
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 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(int bssid[6], int channel, uint8_t mac[6]);
|
void sendDeauthFrame(uint8_t bssid[6], int channel, uint8_t mac[6]);
|
||||||
void broadcastRandomSSID(uint32_t currentTime);
|
void broadcastRandomSSID(uint32_t currentTime);
|
||||||
void broadcastCustomBeacon(uint32_t current_time, ssid custom_ssid);
|
void broadcastCustomBeacon(uint32_t current_time, ssid custom_ssid);
|
||||||
void broadcastCustomBeacon(uint32_t current_time, AccessPoint custom_ssid);
|
void broadcastCustomBeacon(uint32_t current_time, AccessPoint custom_ssid);
|
||||||
void broadcastSetSSID(uint32_t current_time, char* ESSID);
|
void broadcastSetSSID(uint32_t current_time, const char* ESSID);
|
||||||
void RunAPScan(uint8_t scan_mode, uint16_t color);
|
void RunAPScan(uint8_t scan_mode, uint16_t color);
|
||||||
void RunGPSInfo();
|
void RunGPSInfo();
|
||||||
void RunMimicFlood(uint8_t scan_mode, uint16_t color);
|
void RunMimicFlood(uint8_t scan_mode, uint16_t color);
|
||||||
@@ -286,9 +285,9 @@ class WiFiScan
|
|||||||
|
|
||||||
//LinkedList<ssid>* ssids;
|
//LinkedList<ssid>* ssids;
|
||||||
|
|
||||||
int set_channel = 1;
|
uint8_t set_channel = 1;
|
||||||
|
|
||||||
int old_channel = 0;
|
uint8_t old_channel = 0;
|
||||||
|
|
||||||
bool orient_display = false;
|
bool orient_display = false;
|
||||||
bool wifi_initialized = false;
|
bool wifi_initialized = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user