Skip to content

Commit

Permalink
fix(Sync for Reddit - Spoof client): Fix patch by using correct finge…
Browse files Browse the repository at this point in the history
…rprints
  • Loading branch information
oSumAtrIX committed Nov 11, 2024
1 parent a0ad07e commit 5776de3
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ val spoofClientPatch = spoofClientPatch(
val randomName = (0..100000).random()
val userAgent = "$randomName:app.revanced.$randomName:v1.0.0 (by /u/revanced)"

imgurImageAPIFingerprint.method.replaceInstruction(
getUserAgentFingerprint.method.replaceInstruction(
0,
"""
const-string v0, "$userAgent"
return-object v0
""",
const-string v0, "$userAgent"
return-object v0
""",
)

// endregion

// region Patch Imgur API URL.

val apiUrlIndex = getUserAgentFingerprint.stringMatches!!.first().index
getUserAgentFingerprint.method.replaceInstruction(
val apiUrlIndex = imgurImageAPIFingerprint.stringMatches!!.first().index
imgurImageAPIFingerprint.method.replaceInstruction(
apiUrlIndex,
"const-string v1, \"https://api.imgur.com/3/image\"",
)
Expand Down

0 comments on commit 5776de3

Please sign in to comment.