Airdrop airplay handoff tethering (disabled, wip) --nobuild

This commit is contained in:
Willy-JL
2023-09-06 02:33:06 +02:00
parent 2343532496
commit 5c83f3435a
3 changed files with 110 additions and 0 deletions

View File

@@ -21,6 +21,40 @@ typedef struct {
static Payload static Payload
payloads[] = payloads[] =
{ {
#if false
{.title = "AirDrop",
.text = "",
.random = false,
.msg =
{
.type = ContinuityTypeAirDrop,
.data = {.airdrop = {}},
}},
{.title = "Airplay Target",
.text = "",
.random = false,
.msg =
{
.type = ContinuityTypeAirplayTarget,
.data = {.airplay_target = {}},
}},
{.title = "Handoff",
.text = "",
.random = false,
.msg =
{
.type = ContinuityTypeHandoff,
.data = {.handoff = {}},
}},
{.title = "Tethering Source",
.text = "",
.random = false,
.msg =
{
.type = ContinuityTypeTetheringSource,
.data = {.tethering_source = {}},
}},
#endif
{.title = "Random Pair", {.title = "Random Pair",
.text = "Spam shuffle Proximity Pairs", .text = "Spam shuffle Proximity Pairs",
.random = true, .random = true,

View File

@@ -7,7 +7,11 @@
// Custom adv logic and Airtag ID from https://techryptic.github.io/2023/09/01/Annoying-Apple-Fans/ // Custom adv logic and Airtag ID from https://techryptic.github.io/2023/09/01/Annoying-Apple-Fans/
static const char* continuity_type_names[ContinuityTypeCount] = { static const char* continuity_type_names[ContinuityTypeCount] = {
[ContinuityTypeAirDrop] = "AirDrop",
[ContinuityTypeProximityPair] = "Proximity Pair", [ContinuityTypeProximityPair] = "Proximity Pair",
[ContinuityTypeAirplayTarget] = "Airplay Target",
[ContinuityTypeHandoff] = "Handoff",
[ContinuityTypeTetheringSource] = "Tethering Source",
[ContinuityTypeNearbyAction] = "Nearby Action", [ContinuityTypeNearbyAction] = "Nearby Action",
}; };
const char* continuity_get_type_name(ContinuityType type) { const char* continuity_get_type_name(ContinuityType type) {
@@ -15,7 +19,11 @@ const char* continuity_get_type_name(ContinuityType type) {
} }
static size_t continuity_packet_sizes[ContinuityTypeCount] = { static size_t continuity_packet_sizes[ContinuityTypeCount] = {
[ContinuityTypeAirDrop] = 24,
[ContinuityTypeProximityPair] = 31, [ContinuityTypeProximityPair] = 31,
[ContinuityTypeAirplayTarget] = 12,
[ContinuityTypeHandoff] = 20,
[ContinuityTypeTetheringSource] = 12,
[ContinuityTypeNearbyAction] = 11, [ContinuityTypeNearbyAction] = 11,
}; };
size_t continuity_get_packet_size(ContinuityType type) { size_t continuity_get_packet_size(ContinuityType type) {
@@ -36,6 +44,27 @@ void continuity_generate_packet(const ContinuityMsg* msg, uint8_t* packet) {
i++; i++;
switch(msg->type) { switch(msg->type) {
case ContinuityTypeAirDrop:
packet[i++] = 0x00; // Zeros
packet[i++] = 0x00; // ...
packet[i++] = 0x00; // ...
packet[i++] = 0x00; // ...
packet[i++] = 0x00; // ...
packet[i++] = 0x00; // ...
packet[i++] = 0x00; // ...
packet[i++] = 0x00; // ...
packet[i++] = 0x01; // Version
packet[i++] = (rand() % 256); // AppleID
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // Phone Number
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // Email
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // Email2
packet[i++] = (rand() % 256); // ...
packet[i++] = 0x00; // Zero
break;
case ContinuityTypeProximityPair: case ContinuityTypeProximityPair:
packet[i++] = msg->data.proximity_pair.prefix; // Prefix (paired 0x01 new0x07 airtag 0x05) packet[i++] = msg->data.proximity_pair.prefix; // Prefix (paired 0x01 new0x07 airtag 0x05)
packet[i++] = msg->data.proximity_pair.model >> 8; packet[i++] = msg->data.proximity_pair.model >> 8;
@@ -64,6 +93,41 @@ void continuity_generate_packet(const ContinuityMsg* msg, uint8_t* packet) {
packet[i++] = (rand() % 256); // ... packet[i++] = (rand() % 256); // ...
break; break;
case ContinuityTypeAirplayTarget:
packet[i++] = (rand() % 256); // Flags
packet[i++] = (rand() % 256); // Configuration Seed
packet[i++] = (rand() % 256); // IPv4 Address
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // ...
break;
case ContinuityTypeHandoff:
packet[i++] = 0x01; // Version
packet[i++] = (rand() % 256); // Initialization Vector
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // AES-GCM Auth Tag
packet[i++] = (rand() % 256); // Encrypted Payload
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // ...
packet[i++] = (rand() % 256); // ...
break;
case ContinuityTypeTetheringSource:
packet[i++] = 0x01; // Version
packet[i++] = (rand() % 256); // Flags
packet[i++] = (rand() % 101); // Battery Life
packet[i++] = 0x00; // Cell Service Type
packet[i++] = (rand() % 8); // ...
packet[i++] = (rand() % 5); // Cell Service Strength
break;
case ContinuityTypeNearbyAction: case ContinuityTypeNearbyAction:
packet[i++] = 0xc1; // Action Flags packet[i++] = 0xc1; // Action Flags
packet[i++] = msg->data.nearby_action.type; packet[i++] = msg->data.nearby_action.type;

View File

@@ -9,16 +9,28 @@
// Custom adv logic and Airtag ID from https://techryptic.github.io/2023/09/01/Annoying-Apple-Fans/ // Custom adv logic and Airtag ID from https://techryptic.github.io/2023/09/01/Annoying-Apple-Fans/
typedef enum { typedef enum {
ContinuityTypeAirDrop = 0x05,
ContinuityTypeProximityPair = 0x07, ContinuityTypeProximityPair = 0x07,
ContinuityTypeAirplayTarget = 0x09,
ContinuityTypeHandoff = 0x0C,
ContinuityTypeTetheringSource = 0x0E,
ContinuityTypeNearbyAction = 0x0F, ContinuityTypeNearbyAction = 0x0F,
ContinuityTypeCount ContinuityTypeCount
} ContinuityType; } ContinuityType;
typedef union { typedef union {
struct {
} airdrop;
struct { struct {
uint8_t prefix; uint8_t prefix;
uint16_t model; uint16_t model;
} proximity_pair; } proximity_pair;
struct {
} airplay_target;
struct {
} handoff;
struct {
} tethering_source;
struct { struct {
uint8_t type; uint8_t type;
} nearby_action; } nearby_action;