Skip to content

Commit

Permalink
fix: found wrong hookinfo of okhttp (#1591)
Browse files Browse the repository at this point in the history
- 修复okhttp的hookinfo
  • Loading branch information
TinyHai authored Dec 29, 2024
1 parent 1287ece commit 90ccf96
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/main/java/me/iacn/biliroaming/BiliBiliPackage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,11 @@ class BiliBiliPackage constructor(private val mClassLoader: ClassLoader, mContex
null,
null,
null,
true
).asSequence().firstNotNullOfOrNull {
false
).asSequence().mapNotNull {
dexHelper.decodeMethodIndex(it)
}.firstOrNull {
it.declaringClass?.name?.startsWith("okhttp3") == true
}?.declaringClass ?: return@okHttp
responseBodyClass ?: return@okHttp
val getMethod = dexHelper.findMethodUsingString(
Expand Down Expand Up @@ -562,7 +564,7 @@ class BiliBiliPackage constructor(private val mClassLoader: ClassLoader, mContex
}?.name ?: return@method
}
string = method {
name = responseBodyClass.methods.find {
name = responseBodyClass.declaredMethods.find {
it.parameterTypes.isEmpty() && it.returnType == String::class.java
}?.name ?: return@method
}
Expand Down

0 comments on commit 90ccf96

Please sign in to comment.