Skip to content

Commit

Permalink
feat(CandyLink): Remove non-functional Unlock pro patch
Browse files Browse the repository at this point in the history
Servers now check the purchase status.
  • Loading branch information
oSumAtrIX committed Aug 5, 2024
1 parent 5919035 commit 7ae9f8f
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
package app.revanced.patches.candylinkvpn

import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.candylinkvpn.fingerprints.IsPremiumPurchasedFingerprint
import app.revanced.util.exception

@Patch(
name = "Unlock pro",
compatiblePackages = [CompatiblePackage("com.candylink.openvpn")]
compatiblePackages = [CompatiblePackage("com.candylink.openvpn")],
)
@Deprecated(
"This patch does not work anymore and will be removed in the future, " +
"because the servers now check the purchase status.",
)
@Suppress("unused")
object UnlockProPatch : BytecodePatch(
setOf(IsPremiumPurchasedFingerprint)
setOf(IsPremiumPurchasedFingerprint),
) {
override fun execute(context: BytecodeContext) {
IsPremiumPurchasedFingerprint.result?.mutableMethod?.addInstructions(
0,
"""
const/4 v0, 0x1
return v0
"""
""",
) ?: throw IsPremiumPurchasedFingerprint.exception
}
}
}

0 comments on commit 7ae9f8f

Please sign in to comment.