Initial commit: handshake capture firmware for ESP32-C6 1.47" LCD
Made-with: Cursor
This commit is contained in:
49
handshake-capture-c6/HandshakeCapture.h
Normal file
49
handshake-capture-c6/HandshakeCapture.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <WiFi.h>
|
||||
#include "esp_wifi.h"
|
||||
#include <SD.h>
|
||||
|
||||
typedef struct {
|
||||
uint32_t magic_number;
|
||||
uint16_t version_major;
|
||||
uint16_t version_minor;
|
||||
int32_t thiszone;
|
||||
uint32_t sigfigs;
|
||||
uint32_t snaplen;
|
||||
uint32_t network;
|
||||
} __attribute__((packed)) pcap_global_header_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t ts_sec;
|
||||
uint32_t ts_usec;
|
||||
uint32_t incl_len;
|
||||
uint32_t orig_len;
|
||||
} __attribute__((packed)) pcap_record_header_t;
|
||||
|
||||
typedef struct {
|
||||
String ssid;
|
||||
uint8_t bssid[6];
|
||||
int ch;
|
||||
int rssi;
|
||||
String encryption;
|
||||
bool handshake_captured;
|
||||
} WifiNetwork;
|
||||
|
||||
extern WifiNetwork networks[20];
|
||||
extern WifiNetwork target;
|
||||
extern bool is_capturing;
|
||||
extern bool with_deauth;
|
||||
|
||||
void handshakeCaptureInit();
|
||||
bool wasBssidCaptured(const uint8_t* bssid);
|
||||
void markBssidCaptured(const uint8_t* bssid);
|
||||
void scanNetworksSortedByRSSI();
|
||||
void startCapture(bool deauth);
|
||||
void stopCapture();
|
||||
void setTarget(int index);
|
||||
int getCurrentTargetIndex();
|
||||
bool isHandshakeCaptured(int index);
|
||||
bool isCaptureable(int index);
|
||||
void handshakeCaptureLoop();
|
||||
Reference in New Issue
Block a user