Skip to content

Commit

Permalink
fix(youtube/spoof-signature-verification): use correct fingerprint
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Mar 14, 2023
1 parent 79589a3 commit 13090ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 13090ee

Please sign in to comment.