mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 14:58:36 -07:00
Formatting --nobuild
This commit is contained in:
@@ -71,7 +71,7 @@ static const char* type_names[ContinuityTypeCOUNT] = {
|
|||||||
[ContinuityTypeNearbyInfo] = "Nearby Info",
|
[ContinuityTypeNearbyInfo] = "Nearby Info",
|
||||||
[ContinuityTypeCustomCrash] = "Continuity Custom",
|
[ContinuityTypeCustomCrash] = "Continuity Custom",
|
||||||
};
|
};
|
||||||
static const char* continuity_get_name(const ProtocolCfg* _cfg) {
|
static const char* get_name(const ProtocolCfg* _cfg) {
|
||||||
const ContinuityCfg* cfg = &_cfg->continuity;
|
const ContinuityCfg* cfg = &_cfg->continuity;
|
||||||
return type_names[cfg->type];
|
return type_names[cfg->type];
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ static uint8_t packet_sizes[ContinuityTypeCOUNT] = {
|
|||||||
[ContinuityTypeNearbyInfo] = HEADER_LEN + 5,
|
[ContinuityTypeNearbyInfo] = HEADER_LEN + 5,
|
||||||
[ContinuityTypeCustomCrash] = HEADER_LEN + 11,
|
[ContinuityTypeCustomCrash] = HEADER_LEN + 11,
|
||||||
};
|
};
|
||||||
static void continuity_make_packet(uint8_t* _size, uint8_t** _packet, const ProtocolCfg* _cfg) {
|
static void make_packet(uint8_t* _size, uint8_t** _packet, const ProtocolCfg* _cfg) {
|
||||||
const ContinuityCfg* cfg = _cfg ? &_cfg->continuity : NULL;
|
const ContinuityCfg* cfg = _cfg ? &_cfg->continuity : NULL;
|
||||||
|
|
||||||
ContinuityType type;
|
ContinuityType type;
|
||||||
@@ -376,7 +376,7 @@ static void na_action_changed(VariableItem* item) {
|
|||||||
variable_item_set_current_value_text(item, "Random");
|
variable_item_set_current_value_text(item, "Random");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static void continuity_extra_config(Ctx* ctx) {
|
static void extra_config(Ctx* ctx) {
|
||||||
ContinuityCfg* cfg = &ctx->attack->payload.cfg.continuity;
|
ContinuityCfg* cfg = &ctx->attack->payload.cfg.continuity;
|
||||||
VariableItemList* list = ctx->variable_item_list;
|
VariableItemList* list = ctx->variable_item_list;
|
||||||
VariableItem* item;
|
VariableItem* item;
|
||||||
@@ -502,17 +502,17 @@ static uint8_t config_counts[ContinuityTypeCOUNT] = {
|
|||||||
[ContinuityTypeNearbyInfo] = 0,
|
[ContinuityTypeNearbyInfo] = 0,
|
||||||
[ContinuityTypeCustomCrash] = ConfigCcCOUNT - ConfigExtraStart - 1,
|
[ContinuityTypeCustomCrash] = ConfigCcCOUNT - ConfigExtraStart - 1,
|
||||||
};
|
};
|
||||||
static uint8_t continuity_config_count(const ProtocolCfg* _cfg) {
|
static uint8_t config_count(const ProtocolCfg* _cfg) {
|
||||||
const ContinuityCfg* cfg = &_cfg->continuity;
|
const ContinuityCfg* cfg = &_cfg->continuity;
|
||||||
return config_counts[cfg->type];
|
return config_counts[cfg->type];
|
||||||
}
|
}
|
||||||
|
|
||||||
const Protocol protocol_continuity = {
|
const Protocol protocol_continuity = {
|
||||||
.icon = &I_apple,
|
.icon = &I_apple,
|
||||||
.get_name = continuity_get_name,
|
.get_name = get_name,
|
||||||
.make_packet = continuity_make_packet,
|
.make_packet = make_packet,
|
||||||
.extra_config = continuity_extra_config,
|
.extra_config = extra_config,
|
||||||
.config_count = continuity_config_count,
|
.config_count = config_count,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void pp_model_callback(void* _ctx, uint32_t index) {
|
static void pp_model_callback(void* _ctx, uint32_t index) {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ static const char* type_names[EasysetupTypeCOUNT] = {
|
|||||||
[EasysetupTypeBuds] = "EasySetup Buds",
|
[EasysetupTypeBuds] = "EasySetup Buds",
|
||||||
[EasysetupTypeWatch] = "EasySetup Watch",
|
[EasysetupTypeWatch] = "EasySetup Watch",
|
||||||
};
|
};
|
||||||
static const char* easysetup_get_name(const ProtocolCfg* _cfg) {
|
static const char* get_name(const ProtocolCfg* _cfg) {
|
||||||
const EasysetupCfg* cfg = &_cfg->easysetup;
|
const EasysetupCfg* cfg = &_cfg->easysetup;
|
||||||
return type_names[cfg->type];
|
return type_names[cfg->type];
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ static uint8_t packet_sizes[EasysetupTypeCOUNT] = {
|
|||||||
[EasysetupTypeBuds] = 31,
|
[EasysetupTypeBuds] = 31,
|
||||||
[EasysetupTypeWatch] = 15,
|
[EasysetupTypeWatch] = 15,
|
||||||
};
|
};
|
||||||
void easysetup_make_packet(uint8_t* out_size, uint8_t** out_packet, const ProtocolCfg* _cfg) {
|
void make_packet(uint8_t* out_size, uint8_t** out_packet, const ProtocolCfg* _cfg) {
|
||||||
const EasysetupCfg* cfg = _cfg ? &_cfg->easysetup : NULL;
|
const EasysetupCfg* cfg = _cfg ? &_cfg->easysetup : NULL;
|
||||||
|
|
||||||
EasysetupType type;
|
EasysetupType type;
|
||||||
@@ -241,7 +241,7 @@ static void watch_model_changed(VariableItem* item) {
|
|||||||
variable_item_set_current_value_text(item, "Random");
|
variable_item_set_current_value_text(item, "Random");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static void easysetup_extra_config(Ctx* ctx) {
|
static void extra_config(Ctx* ctx) {
|
||||||
EasysetupCfg* cfg = &ctx->attack->payload.cfg.easysetup;
|
EasysetupCfg* cfg = &ctx->attack->payload.cfg.easysetup;
|
||||||
VariableItemList* list = ctx->variable_item_list;
|
VariableItemList* list = ctx->variable_item_list;
|
||||||
VariableItem* item;
|
VariableItem* item;
|
||||||
@@ -313,17 +313,17 @@ static uint8_t config_counts[EasysetupTypeCOUNT] = {
|
|||||||
[EasysetupTypeBuds] = ConfigBudsCOUNT - ConfigExtraStart - 1,
|
[EasysetupTypeBuds] = ConfigBudsCOUNT - ConfigExtraStart - 1,
|
||||||
[EasysetupTypeWatch] = ConfigWatchCOUNT - ConfigExtraStart - 1,
|
[EasysetupTypeWatch] = ConfigWatchCOUNT - ConfigExtraStart - 1,
|
||||||
};
|
};
|
||||||
static uint8_t easysetup_config_count(const ProtocolCfg* _cfg) {
|
static uint8_t config_count(const ProtocolCfg* _cfg) {
|
||||||
const EasysetupCfg* cfg = &_cfg->easysetup;
|
const EasysetupCfg* cfg = &_cfg->easysetup;
|
||||||
return config_counts[cfg->type];
|
return config_counts[cfg->type];
|
||||||
}
|
}
|
||||||
|
|
||||||
const Protocol protocol_easysetup = {
|
const Protocol protocol_easysetup = {
|
||||||
.icon = &I_android,
|
.icon = &I_android,
|
||||||
.get_name = easysetup_get_name,
|
.get_name = get_name,
|
||||||
.make_packet = easysetup_make_packet,
|
.make_packet = make_packet,
|
||||||
.extra_config = easysetup_extra_config,
|
.extra_config = extra_config,
|
||||||
.config_count = easysetup_config_count,
|
.config_count = config_count,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void buds_model_callback(void* _ctx, uint32_t index) {
|
static void buds_model_callback(void* _ctx, uint32_t index) {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const struct {
|
|||||||
{0x00000C, "Set Up Device"},
|
{0x00000C, "Set Up Device"},
|
||||||
|
|
||||||
// Genuine devices
|
// Genuine devices
|
||||||
{0x00000a, "Anti-Spoofing Test (lmao)"},
|
{0x00000A, "Anti-Spoofing Test (lmao)"},
|
||||||
{0x0001F0, "Bisto CSR8670 Dev Board"},
|
{0x0001F0, "Bisto CSR8670 Dev Board"},
|
||||||
{0x000047, "Arduino 101"},
|
{0x000047, "Arduino 101"},
|
||||||
{0xCD8256, "Bose NC 700"},
|
{0xCD8256, "Bose NC 700"},
|
||||||
@@ -46,12 +46,12 @@ const struct {
|
|||||||
};
|
};
|
||||||
const uint8_t models_count = COUNT_OF(models);
|
const uint8_t models_count = COUNT_OF(models);
|
||||||
|
|
||||||
static const char* fastpair_get_name(const ProtocolCfg* _cfg) {
|
static const char* get_name(const ProtocolCfg* _cfg) {
|
||||||
UNUSED(_cfg);
|
UNUSED(_cfg);
|
||||||
return "FastPair";
|
return "FastPair";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fastpair_make_packet(uint8_t* _size, uint8_t** _packet, const ProtocolCfg* _cfg) {
|
static void make_packet(uint8_t* _size, uint8_t** _packet, const ProtocolCfg* _cfg) {
|
||||||
const FastpairCfg* cfg = _cfg ? &_cfg->fastpair : NULL;
|
const FastpairCfg* cfg = _cfg ? &_cfg->fastpair : NULL;
|
||||||
|
|
||||||
uint32_t model;
|
uint32_t model;
|
||||||
@@ -118,7 +118,7 @@ static void model_changed(VariableItem* item) {
|
|||||||
variable_item_set_current_value_text(item, "Random");
|
variable_item_set_current_value_text(item, "Random");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static void fastpair_extra_config(Ctx* ctx) {
|
static void extra_config(Ctx* ctx) {
|
||||||
FastpairCfg* cfg = &ctx->attack->payload.cfg.fastpair;
|
FastpairCfg* cfg = &ctx->attack->payload.cfg.fastpair;
|
||||||
VariableItemList* list = ctx->variable_item_list;
|
VariableItemList* list = ctx->variable_item_list;
|
||||||
VariableItem* item;
|
VariableItem* item;
|
||||||
@@ -152,17 +152,17 @@ static void fastpair_extra_config(Ctx* ctx) {
|
|||||||
variable_item_list_set_enter_callback(list, config_callback, ctx);
|
variable_item_list_set_enter_callback(list, config_callback, ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint8_t fastpair_config_count(const ProtocolCfg* _cfg) {
|
static uint8_t config_count(const ProtocolCfg* _cfg) {
|
||||||
UNUSED(_cfg);
|
UNUSED(_cfg);
|
||||||
return ConfigCOUNT - ConfigExtraStart - 1;
|
return ConfigCOUNT - ConfigExtraStart - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Protocol protocol_fastpair = {
|
const Protocol protocol_fastpair = {
|
||||||
.icon = &I_android,
|
.icon = &I_android,
|
||||||
.get_name = fastpair_get_name,
|
.get_name = get_name,
|
||||||
.make_packet = fastpair_make_packet,
|
.make_packet = make_packet,
|
||||||
.extra_config = fastpair_extra_config,
|
.extra_config = extra_config,
|
||||||
.config_count = fastpair_config_count,
|
.config_count = config_count,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void model_callback(void* _ctx, uint32_t index) {
|
static void model_callback(void* _ctx, uint32_t index) {
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
// Hacked together by @Willy-JL and @Spooks4576
|
// Hacked together by @Willy-JL and @Spooks4576
|
||||||
// Documentation at https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/bluetooth-swift-pair
|
// Documentation at https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/bluetooth-swift-pair
|
||||||
|
|
||||||
static const char* swiftpair_get_name(const ProtocolCfg* _cfg) {
|
static const char* get_name(const ProtocolCfg* _cfg) {
|
||||||
UNUSED(_cfg);
|
UNUSED(_cfg);
|
||||||
return "SwiftPair";
|
return "SwiftPair";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void swiftpair_make_packet(uint8_t* _size, uint8_t** _packet, const ProtocolCfg* _cfg) {
|
static void make_packet(uint8_t* _size, uint8_t** _packet, const ProtocolCfg* _cfg) {
|
||||||
const SwiftpairCfg* cfg = _cfg ? &_cfg->swiftpair : NULL;
|
const SwiftpairCfg* cfg = _cfg ? &_cfg->swiftpair : NULL;
|
||||||
|
|
||||||
const char* name;
|
const char* name;
|
||||||
@@ -66,7 +66,7 @@ static void config_callback(void* _ctx, uint32_t index) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static void swiftpair_extra_config(Ctx* ctx) {
|
static void extra_config(Ctx* ctx) {
|
||||||
SwiftpairCfg* cfg = &ctx->attack->payload.cfg.swiftpair;
|
SwiftpairCfg* cfg = &ctx->attack->payload.cfg.swiftpair;
|
||||||
VariableItemList* list = ctx->variable_item_list;
|
VariableItemList* list = ctx->variable_item_list;
|
||||||
VariableItem* item;
|
VariableItem* item;
|
||||||
@@ -79,17 +79,17 @@ static void swiftpair_extra_config(Ctx* ctx) {
|
|||||||
variable_item_list_set_enter_callback(list, config_callback, ctx);
|
variable_item_list_set_enter_callback(list, config_callback, ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint8_t swiftpair_config_count(const ProtocolCfg* _cfg) {
|
static uint8_t config_count(const ProtocolCfg* _cfg) {
|
||||||
UNUSED(_cfg);
|
UNUSED(_cfg);
|
||||||
return ConfigCOUNT - ConfigExtraStart - 1;
|
return ConfigCOUNT - ConfigExtraStart - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Protocol protocol_swiftpair = {
|
const Protocol protocol_swiftpair = {
|
||||||
.icon = &I_windows,
|
.icon = &I_windows,
|
||||||
.get_name = swiftpair_get_name,
|
.get_name = get_name,
|
||||||
.make_packet = swiftpair_make_packet,
|
.make_packet = make_packet,
|
||||||
.extra_config = swiftpair_extra_config,
|
.extra_config = extra_config,
|
||||||
.config_count = swiftpair_config_count,
|
.config_count = config_count,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void name_callback(void* _ctx) {
|
static void name_callback(void* _ctx) {
|
||||||
|
|||||||
Reference in New Issue
Block a user