Update WiFiScan.h

This commit is contained in:
Just Call Me Koko
2019-11-23 15:07:17 -05:00
parent c827b1e8ae
commit d2f2a7c474

View File

@@ -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);