fix(youtube/spoof-signature-verification): use correct fingerprint

This commit is contained in:
oSumAtrIX 2023-03-14 13:49:48 +01:00
parent 79589a3c8d
commit 13090eeb47
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 5 additions and 23 deletions

View File

@ -5,27 +5,9 @@ import org.jf.dexlib2.Opcode
object ProtobufParameterBuilderFingerprint : MethodFingerprint(
opcodes = listOf(
Opcode.MOVE_RESULT,
Opcode.CONST_16,
Opcode.MOVE_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT,
Opcode.MOVE_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_FROM16,
Opcode.MOVE_FROM16,
Opcode.MOVE_FROM16,
Opcode.INVOKE_VIRTUAL_RANGE, // target reference
// Opcode.MOVE_RESULT_OBJECT,
// Opcode.IPUT_OBJECT
Opcode.INVOKE_VIRTUAL_RANGE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT
),
strings = listOf(
"Prefetch request are disabled.",
"Unexpected empty videoId.",
)
strings = listOf("Unexpected empty videoId.", "Prefetch request are disabled.")
)

View File

@ -29,7 +29,7 @@ class SpoofSignatureVerificationPatch : BytecodePatch(
ProtobufParameterBuilderFingerprint.result?.let {
val setParamMethod = context
.toMethodWalker(it.method)
.nextMethod(it.scanResult.patternScanResult!!.endIndex, true).getMethod() as MutableMethod
.nextMethod(it.scanResult.patternScanResult!!.startIndex, true).getMethod() as MutableMethod
setParamMethod.apply {
val protobufParameterRegister = 3