Skip to content

Commit

Permalink
优化 鲁班-绕过鲁班鉴权 hook逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
Sevtinge committed May 14, 2023
1 parent 2e17e6e commit 2c756b8
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package com.sevtinge.cemiuiler.module.mtb

import com.github.kyuubiran.ezxhelper.utils.field
import com.github.kyuubiran.ezxhelper.utils.findMethod
import com.github.kyuubiran.ezxhelper.utils.hookAfter
import com.github.kyuubiran.ezxhelper.utils.hookBefore
import com.github.kyuubiran.ezxhelper.utils.*
import com.sevtinge.cemiuiler.module.base.BaseHook

object BypassAuthentication : BaseHook() {
Expand All @@ -21,7 +18,8 @@ object BypassAuthentication : BaseHook() {
findMethod("com.xiaomi.mtb.activity.ModemTestBoxMainActivity") {
name == "updateClass"
}.hookBefore {
it.thisObject.field("mClassNet", true).set(it.thisObject, 0)
it.args[0] = 0
it.thisObject.putObject("mClassNet", 0)
}
} catch (_: Throwable) {
}
Expand All @@ -30,9 +28,10 @@ object BypassAuthentication : BaseHook() {
findMethod("com.xiaomi.mtb.activity.ModemTestBoxMainActivity") {
name == "initClassProduct"
}.hookAfter {
it.thisObject.field("mClassProduct", true).set(it.thisObject, 0)
it.thisObject.putObject("mClassProduct", 0)
}
} catch (_: Throwable) {
}
}

}

0 comments on commit 2c756b8

Please sign in to comment.