Skip to content

Commit

Permalink
fix(youtube/spoof-signature-verification): remove auto re-enable func…
Browse files Browse the repository at this point in the history
…tionality (#2556)
  • Loading branch information
LisoUseInAIKyrios committed Jul 2, 2023
1 parent f27a6a4 commit b8df8fb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,17 @@ import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.OpenCronetDataSourceFingerprint
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.ProtobufParameterBuilderFingerprint
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction

@Name("spoof-signature-verification")
@Description("Spoofs a patched client to prevent playback issues.")
Expand All @@ -33,7 +30,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
class SpoofSignatureVerificationPatch : BytecodePatch(
listOf(
ProtobufParameterBuilderFingerprint,
OpenCronetDataSourceFingerprint,
)
) {
override fun execute(context: BytecodeContext): PatchResult {
Expand Down Expand Up @@ -72,23 +68,6 @@ class SpoofSignatureVerificationPatch : BytecodePatch(
}
} ?: return ProtobufParameterBuilderFingerprint.toErrorResult()

// hook video playback result
OpenCronetDataSourceFingerprint.result?.let {
it.mutableMethod.apply {
val getHeadersInstructionIndex = it.scanResult.patternScanResult!!.endIndex
val responseCodeRegister =
(getInstruction(getHeadersInstructionIndex - 2) as OneRegisterInstruction).registerA

addInstructions(
getHeadersInstructionIndex + 1,
"""
invoke-static {v$responseCodeRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->onResponse(I)V
"""
)
}

} ?: return OpenCronetDataSourceFingerprint.toErrorResult()

return PatchResultSuccess()
}

Expand Down

0 comments on commit b8df8fb

Please sign in to comment.