mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 13:12:17 +08:00
Shamrock
: 更新反检测逻辑
Signed-off-by: WhiteChi <whitechi73@outlook.com>
This commit is contained in:
parent
547f224140
commit
79f2594a2f
@ -345,7 +345,8 @@ internal object GlobalEventTransmitter: BaseSvc() {
|
|||||||
|
|
||||||
@ShamrockDsl
|
@ShamrockDsl
|
||||||
suspend inline fun onNoticeEvent(collector: FlowCollector<NoticeEvent>) {
|
suspend inline fun onNoticeEvent(collector: FlowCollector<NoticeEvent>) {
|
||||||
noticeEventFlow.collect(collector)
|
noticeEventFlow
|
||||||
|
.collect(collector)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
@file:Suppress("UNCHECKED_CAST")
|
||||||
|
package moe.fuqiuluo.shamrock.xposed.actions
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import moe.fuqiuluo.shamrock.tools.hookMethod
|
||||||
|
import java.lang.Exception
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 反检测
|
||||||
|
*/
|
||||||
|
class AntiDetection: IAction {
|
||||||
|
override fun invoke(ctx: Context) {
|
||||||
|
Thread::class.java.hookMethod("getStackTrace").after {
|
||||||
|
val result = it.result as Array<StackTraceElement>
|
||||||
|
it.result = result.filter {
|
||||||
|
!it.className.contains("fuqiuluo") && !it.className.contains("shamrock")
|
||||||
|
}.toTypedArray()
|
||||||
|
}
|
||||||
|
|
||||||
|
Throwable::class.java.hookMethod("getStackTrace").after {
|
||||||
|
val result = it.result as Array<StackTraceElement>
|
||||||
|
it.result = result.filter {
|
||||||
|
!it.className.contains("fuqiuluo") && !it.className.contains("shamrock")
|
||||||
|
}.toTypedArray()
|
||||||
|
}
|
||||||
|
|
||||||
|
Throwable::class.java.hookMethod("getOurStackTrace").after {
|
||||||
|
val result = it.result as Array<StackTraceElement>
|
||||||
|
it.result = result.filter {
|
||||||
|
!it.className.contains("fuqiuluo") && !it.className.contains("shamrock")
|
||||||
|
}.toTypedArray()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -8,6 +8,7 @@ import kotlin.reflect.full.createInstance
|
|||||||
|
|
||||||
object ActionLoader {
|
object ActionLoader {
|
||||||
private val ACTION_FIRST_LIST = arrayOf(
|
private val ACTION_FIRST_LIST = arrayOf(
|
||||||
|
AntiDetection::class,
|
||||||
DataReceiver::class, // 注册一个接收数据的动态广播
|
DataReceiver::class, // 注册一个接收数据的动态广播
|
||||||
IpcService::class,
|
IpcService::class,
|
||||||
PullConfig::class, // 从APP进程拉扯配置文件
|
PullConfig::class, // 从APP进程拉扯配置文件
|
||||||
|
Loading…
x
Reference in New Issue
Block a user