Skip to content

Commit 154b337

Browse files
committed
feat: 禁用NT登录流程
1 parent 475e3d0 commit 154b337

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

app/src/main/java/moe/ore/xposed/base/LoadApp.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,10 @@ object LoadApp {
161161

162162
if (injectClassloader(moduleClassLoader)) {
163163
// TODO 先暂时用原来的,后面再改
164+
165+
AntiDetection() // 由于进程作用域不同,现在它不能放进isMsf的判断中
166+
164167
if (ProcUtil.isMsf) {
165-
AntiDetection()
166168
MainHook(0, ctx)
167169
}
168170
}

app/src/main/java/moe/ore/xposed/hook/AntiDetection.kt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,32 @@ internal object AntiDetection {
77

88
operator fun invoke() {
99
disableSwitch()
10+
// isLoginByNTHook()
1011
}
1112

1213
private fun disableSwitch() {
1314
val configClass = load("com.tencent.freesia.UnitedConfig")
1415
configClass?.let {
1516
it.hookMethod("isSwitchOn")?.after { param ->
1617
val tag = param.args[1] as String
17-
if (tag == "msf_init_optimize" || tag == "msf_network_service_switch_new") {
18-
param.result = false
18+
when (tag) {
19+
"msf_init_optimize", "msf_network_service_switch_new" -> {
20+
param.result = false
21+
}
22+
"wt_login_upgrade" -> {
23+
param.result = false
24+
}
25+
"nt_login_downgrade" -> { // 强制降级到WT流程
26+
param.result = true
27+
}
1928
}
2029
}
2130
}
2231
}
32+
33+
private fun isLoginByNTHook() {
34+
load("mqq.app.MobileQQ")?.hookMethod("isLoginByNT")?.after { param ->
35+
param.result = false
36+
}
37+
}
2338
}

0 commit comments

Comments
 (0)