mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 14:08:36 -07:00
Refactor payload config, dont need 2 structs
This commit is contained in:
@@ -6,13 +6,14 @@
|
||||
#include "swiftpair.h"
|
||||
|
||||
typedef enum {
|
||||
ProtocolModeRandom,
|
||||
ProtocolModeValue,
|
||||
ProtocolModeBruteforce,
|
||||
} ProtocolMode;
|
||||
PayloadModeRandom,
|
||||
PayloadModeValue,
|
||||
PayloadModeBruteforce,
|
||||
} PayloadMode;
|
||||
|
||||
struct ProtocolCfg {
|
||||
ProtocolMode mode;
|
||||
struct Payload {
|
||||
bool random_mac;
|
||||
PayloadMode mode;
|
||||
struct {
|
||||
uint8_t counter;
|
||||
uint32_t value;
|
||||
@@ -23,18 +24,13 @@ struct ProtocolCfg {
|
||||
FastpairCfg fastpair;
|
||||
EasysetupCfg easysetup;
|
||||
SwiftpairCfg swiftpair;
|
||||
} specific;
|
||||
} cfg;
|
||||
};
|
||||
|
||||
extern const Protocol* protocols[];
|
||||
|
||||
extern const size_t protocols_count;
|
||||
|
||||
typedef struct {
|
||||
bool random_mac;
|
||||
ProtocolCfg cfg;
|
||||
} Payload;
|
||||
|
||||
struct Attack {
|
||||
const char* title;
|
||||
const char* text;
|
||||
|
||||
Reference in New Issue
Block a user