Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simondankelmann/new action modals #190

Merged
merged 2 commits into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified app/debug/app-debug.apk
Binary file not shown.
Binary file modified app/release/app-release.apk
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class ContinuityActionModalAdvertisementSetGenerator: IAdvertisementSetGenerator
"06" to "Pair AppleTV",
"0D" to "HomeKit AppleTV Setup",
"2B" to "AppleID for AppleTV?",
"05" to "Apple Watch",
"24" to "Apple Vision Pro",
"2F" to "Connect to other Device",
"21" to "Software Update",
)

companion object {
Expand All @@ -49,20 +53,29 @@ class ContinuityActionModalAdvertisementSetGenerator: IAdvertisementSetGenerator
val action = payload[3]
var flag = payload[2]

// Change flag from time to time
if ((StringHelpers.byteToHexString(action) == "20") && Random.nextBoolean()) {
flag = StringHelpers.decodeHex("BF")[0]
}

// Change flag from time to time
if ((StringHelpers.byteToHexString(action) == "09") && Random.nextBoolean()) {
flag = StringHelpers.decodeHex("40")[0]
}

// Change flag each time
if ((StringHelpers.byteToHexString(action) == "21")) {
flag = StringHelpers.decodeHex("40")[0]
}

payload[2] = flag

// randomize auth tag
payload[4] = Random.nextBytes(1)[0]
payload[5] = Random.nextBytes(1)[0]
payload[6] = Random.nextBytes(1)[0]

advertisementSet.advertiseData.manufacturerData[0].manufacturerSpecificData = payload
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,16 @@ class ContinuityIos17CrashAdvertisementSetGenerator: IAdvertisementSetGenerator
val action = payload[3]
var flag = payload[2]

// Change flag from time to time
if((StringHelpers.byteToHexString(action) == "20") && Random.nextBoolean()){
flag = StringHelpers.decodeHex("BF")[0]
}

// Change flag from time to time
if((StringHelpers.byteToHexString(action) == "09") && Random.nextBoolean()){
flag = StringHelpers.decodeHex("40")[0]
}

payload[2] = flag

// randomize auth tag
Expand All @@ -78,6 +81,7 @@ class ContinuityIos17CrashAdvertisementSetGenerator: IAdvertisementSetGenerator
payload[12] = Random.nextBytes(1)[0]
}

advertisementSet.advertiseData.manufacturerData[0].manufacturerSpecificData = payload
}
}

Expand Down