forked from warwick320/5G-deauther-with-OLED-SSD1306
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwifi_cust_tx.h
45 lines (39 loc) · 1.37 KB
/
wifi_cust_tx.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef WIFI_CUST_TX
#define WIFI_CUST_TX
#include <Arduino.h>
typedef struct {
uint16_t frame_control = 0xC0;
uint16_t duration = 0xFFFF;
uint8_t destination[6];
uint8_t source[6];
uint8_t access_point[6];
const uint16_t sequence_number = 0;
uint16_t reason = 0x06;
} DeauthFrame;
typedef struct {
uint16_t frame_control = 0x80;
uint16_t duration = 0;
uint8_t destination[6];
uint8_t source[6];
uint8_t access_point[6];
const uint16_t sequence_number = 0;
const uint64_t timestamp = 0;
uint16_t beacon_interval = 0x64;
uint16_t ap_capabilities = 0x21;
const uint8_t ssid_tag = 0;
uint8_t ssid_length = 0;
uint8_t ssid[255];
} BeaconFrame;
/*
* Import the needed c functions from the closed-source libraries
* The function definitions might not be 100% accurate with the arguments as the types get lost during compilation and cannot be retrieved back during decompilation
* However, these argument types seem to work perfect
*/
extern uint8_t* rltk_wlan_info;
extern "C" void* alloc_mgtxmitframe(void* ptr);
extern "C" void update_mgntframe_attrib(void* ptr, void* frame_control);
extern "C" int dump_mgntframe(void* ptr, void* frame_control);
void wifi_tx_raw_frame(void* frame, size_t length);
void wifi_tx_deauth_frame(void* src_mac, void* dst_mac, uint16_t reason = 0x06);
void wifi_tx_beacon_frame(void* src_mac, void* dst_mac, const char *ssid);
#endif