From c30eed1206dcee44673e9016b7e0942143b1f91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E5=9D=97=E5=90=9B?= Date: Sat, 14 May 2022 12:33:31 +0800 Subject: [PATCH] Add webview url hook --- app/src/main/java/xfk233/genshinproxy/MainHook.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/xfk233/genshinproxy/MainHook.kt b/app/src/main/java/xfk233/genshinproxy/MainHook.kt index f445e38..b35d100 100644 --- a/app/src/main/java/xfk233/genshinproxy/MainHook.kt +++ b/app/src/main/java/xfk233/genshinproxy/MainHook.kt @@ -612,6 +612,12 @@ class MainHook : IXposedHookLoadPackage, IXposedHookZygoteInit { findMethod("com.miHoYo.sdk.webview.MiHoYoWebview") { name == "load" && parameterTypes[0] == String::class.java && parameterTypes[1] == String::class.java }.hookBefore { replaceUrl(it, 1) } + findAllMethods("android.webkit.WebView") { name == "loadUrl" }.hookBefore { + replaceUrl(it, 0) + } + findAllMethods("android.webkit.WebView") { name == "postUrl" }.hookBefore { + replaceUrl(it, 0) + } findMethod("okhttp3.HttpUrl") { name == "parse" && parameterTypes[0] == String::class.java }.hookBefore { replaceUrl(it, 0)