-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: wrong wire type in group recall
- Loading branch information
Showing
19 changed files
with
140 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@file:Suppress("LocalVariableName", "SpellCheckingInspection") | ||
package moe.qwq.miko.actions | ||
|
||
import android.content.Context | ||
import de.robv.android.xposed.XposedBridge | ||
import moe.fuqiuluo.processor.HookAction | ||
import moe.fuqiuluo.xposed.loader.LuoClassloader | ||
import moe.qwq.miko.ext.beforeHook | ||
import moe.qwq.miko.ext.hookMethod | ||
|
||
@HookAction(desc = "HookWrapperCodec实现捕获抓包") | ||
class HookCodec: AlwaysRunAction() { | ||
override fun onRun(ctx: Context) { | ||
val CodecWarpper = LuoClassloader.load("com.tencent.qphone.base.util.CodecWarpper") | ||
if (CodecWarpper == null) { | ||
XposedBridge.log("[QwQ] 无法注入CodecWarpper!") | ||
return | ||
} | ||
CodecWarpper.hookMethod("nativeEncodeRequest", beforeHook { | ||
|
||
}) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,65 @@ | ||
@file:Suppress("LocalVariableName") | ||
package moe.qwq.miko.actions | ||
|
||
import android.content.Context | ||
import com.tencent.mobileqq.msf.sdk.MsfMessagePair | ||
import com.tencent.qphone.base.remote.ToServiceMsg | ||
import de.robv.android.xposed.XposedBridge | ||
import moe.qwq.miko.internals.msf.MSFHandler.onPush | ||
import moe.qwq.miko.internals.msf.MSFHandler.onResp | ||
import moe.fuqiuluo.processor.HookAction | ||
import moe.fuqiuluo.xposed.loader.LuoClassloader | ||
import moe.qwq.miko.ext.beforeHook | ||
import moe.qwq.miko.ext.hookMethod | ||
import moe.qwq.miko.internals.hijackers.IHijacker | ||
|
||
@HookAction("注入MSF收包任务") | ||
class PatchMsfCore: AlwaysRunAction() { | ||
override fun onRun(ctx: Context) { | ||
runCatching { | ||
val MSFRespHandleTask = LuoClassloader.load("mqq.app.msghandle.MSFRespHandleTask") | ||
if (MSFRespHandleTask == null) { | ||
XposedBridge.log("[QwQ] 无法注入MSFRespHandleTask!") | ||
} else { | ||
val msfPair = MSFRespHandleTask.declaredFields.first { | ||
it.type == MsfMessagePair::class.java | ||
} | ||
msfPair.isAccessible = true | ||
MSFRespHandleTask.hookMethod("run").before { | ||
val pair = msfPair.get(it.thisObject) as MsfMessagePair | ||
if (pair.toServiceMsg == null) { | ||
onPush(pair.fromServiceMsg) | ||
} else { | ||
onResp(pair.toServiceMsg, pair.fromServiceMsg) | ||
} | ||
val MSFRespHandleTask = LuoClassloader.load("mqq.app.msghandle.MSFRespHandleTask") | ||
if (MSFRespHandleTask == null) { | ||
XposedBridge.log("[QwQ] 无法注入MSFRespHandleTask!") | ||
} else { | ||
val msfPair = MSFRespHandleTask.declaredFields.first { | ||
it.type == MsfMessagePair::class.java | ||
} | ||
msfPair.isAccessible = true | ||
MSFRespHandleTask.hookMethod("run").before { | ||
val pair = msfPair.get(it.thisObject) as MsfMessagePair | ||
if (pair.toServiceMsg == null) { | ||
onPush(pair.fromServiceMsg) | ||
} else { | ||
onResp(pair.toServiceMsg, pair.fromServiceMsg) | ||
} | ||
} | ||
}.onFailure { | ||
XposedBridge.log(it) | ||
} | ||
|
||
/* val MobileQQServiceBase = LuoClassloader.load("com.tencent.mobileqq.service.MobileQQServiceBase") | ||
if (MobileQQServiceBase == null) { | ||
XposedBridge.log("[QwQ] 无法注入MobileQQServiceBase!部分服务可能不可用!") | ||
} else { | ||
val realHandleRequest = kotlin.runCatching { MobileQQServiceBase.getMethod("realHandleRequest", ToServiceMsg::class.java, Class::class.java) } | ||
.getOrElse { | ||
MobileQQServiceBase.methods.firstOrNull { it.returnType == Void.TYPE && it.parameterTypes.size == 2 && it.parameterTypes[0] == ToServiceMsg::class.java && it.parameterTypes[1] == Class::class.java } | ||
} | ||
if (realHandleRequest == null) { | ||
XposedBridge.log("[QwQ] 无法注入MobileQQServiceBase.realHandleRequest!部分服务可能不可用!") | ||
} else { | ||
XposedBridge.hookMethod(realHandleRequest, beforeHook { | ||
val toServiceMsg = it.args[0] as ToServiceMsg | ||
val isPb = toServiceMsg.getAttribute("req_pb_protocol_flag", false) | ||
val cmd = toServiceMsg.serviceCmd | ||
if(hijackerList.firstOrNull { | ||
it.command == cmd | ||
}?.onHandle(toServiceMsg, isPb) == true) { | ||
it.result = Unit | ||
} | ||
}) | ||
} | ||
}*/ | ||
} | ||
|
||
/* companion object { | ||
val hijackerList = arrayListOf<IHijacker>() | ||
}*/ | ||
} |
2 changes: 1 addition & 1 deletion
2
...iko/internals/hooks/AllowGroupFlashPic.kt → .../moe/qwq/miko/hooks/AllowGroupFlashPic.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...ernals/hooks/BrowserAccessRestrictions.kt → ...q/miko/hooks/BrowserAccessRestrictions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../internals/hooks/DefaultPacketHijacker.kt → ...e/qwq/miko/hooks/DefaultPacketHijacker.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...o/internals/hooks/DisableFlashPictures.kt → ...oe/qwq/miko/hooks/DisableFlashPictures.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...q/miko/internals/hooks/ForceTabletMode.kt → ...ava/moe/qwq/miko/hooks/ForceTabletMode.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../miko/internals/hooks/HotUpdateSoPatch.kt → ...va/moe/qwq/miko/hooks/HotUpdateSoPatch.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package moe.qwq.miko.hooks | ||
|
||
import android.content.Context | ||
import com.tencent.qphone.base.remote.ToServiceMsg | ||
import de.robv.android.xposed.XposedBridge | ||
import moe.fuqiuluo.processor.HookAction | ||
import moe.qwq.miko.actions.ActionProcess | ||
import moe.qwq.miko.actions.IAction | ||
import moe.qwq.miko.actions.PatchMsfCore | ||
import moe.qwq.miko.internals.hijackers.IHijacker | ||
import moe.qwq.miko.internals.setting.QwQSetting | ||
|
||
@HookAction(desc = "消息加密抄送") | ||
class MessageEncrypt: IAction { | ||
override fun onRun(ctx: Context) { | ||
val encryptKey = QwQSetting.getSetting<String>(name).getValue(null, null) | ||
|
||
} | ||
|
||
override fun canRun(): Boolean { | ||
val setting = QwQSetting.getSetting<String>(name) | ||
return setting.getValue(null, null).isNotBlank() | ||
} | ||
|
||
//override val process: ActionProcess = ActionProcess.MAIN | ||
|
||
override val name: String = QwQSetting.MESSAGE_ENCRYPT | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../qwq/miko/internals/hooks/OneClickLike.kt → ...n/java/moe/qwq/miko/hooks/OneClickLike.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e/qwq/miko/internals/hooks/QQCrashHook.kt → ...in/java/moe/qwq/miko/hooks/QQCrashHook.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...qwq/miko/internals/hooks/RepeatMessage.kt → .../java/moe/qwq/miko/hooks/RepeatMessage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.