From d2f2a7c4749edcd36e6e57f15bae7e4c4da560f1 Mon Sep 17 00:00:00 2001 From: Just Call Me Koko <25190487+justcallmekoko@users.noreply.github.com> Date: Sat, 23 Nov 2019 15:07:17 -0500 Subject: [PATCH] Update WiFiScan.h --- esp32_marauder/WiFiScan.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/esp32_marauder/WiFiScan.h b/esp32_marauder/WiFiScan.h index b87607c..18e9b98 100644 --- a/esp32_marauder/WiFiScan.h +++ b/esp32_marauder/WiFiScan.h @@ -18,8 +18,9 @@ #define WIFI_SCAN_AP 2 #define WIFI_SCAN_ST 3 #define WIFI_SCAN_ALL 4 -#define BT_SCAN_ALL 5 -#define BT_SCAN_SKIMMERS 6 +#define WIFI_ATTACK_BEACON_SPAM 5 +#define BT_SCAN_ALL 6 +#define BT_SCAN_SKIMMERS 7 extern Display display_obj; @@ -34,6 +35,12 @@ class WiFiScan const wifi_promiscuous_filter_t filt = {.filter_mask=WIFI_PROMIS_FILTER_MASK_MGMT | WIFI_PROMIS_FILTER_MASK_DATA}; BLEScan* pBLEScan; + esp_err_t esp_wifi_80211_tx(wifi_interface_t ifx, const void *buffer, int len, bool en_sys_seq); + + String alfa = "1234567890qwertyuiopasdfghjkklzxcvbnm QWERTYUIOPASDFGHJKLZXCVBNM_"; + + char* prefix = "G"; + typedef struct { int16_t fctl; @@ -50,6 +57,19 @@ class WiFiScan uint8_t payload[0]; } wifi_ieee80211_packet_t; + // barebones packet + uint8_t packet[128] = { 0x80, 0x00, 0x00, 0x00, //Frame Control, Duration + /*4*/ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //Destination address + /*10*/ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, //Source address - overwritten later + /*16*/ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, //BSSID - overwritten to the same as the source address + /*22*/ 0xc0, 0x6c, //Seq-ctl + /*24*/ 0x83, 0x51, 0xf7, 0x8f, 0x0f, 0x00, 0x00, 0x00, //timestamp - the number of microseconds the AP has been active + /*32*/ 0x64, 0x00, //Beacon interval + /*34*/ 0x01, 0x04, //Capability info + /* SSID */ + /*36*/ 0x00 + }; + void RunBeaconScan(uint8_t scan_mode, uint16_t color); void RunProbeScan(uint8_t scan_mode, uint16_t color); void RunBluetoothScan(uint8_t scan_mode, uint16_t color);