本帖最后由 cdsgg 于 2022-10-31 11:50 编辑
版本 3.7.6.44 frIDA 发送消息不知道有没有人会的 想请教一下 [Python] 纯文本查看 复制代码 # coding=utf-8from __future__ import print_function
import frida
import sys
def on_message(message, data):
print(message) # 这里你们到时候可以处理消息 发消息的我不会弄
def main(target_process):
session = frida.attach(target_process)
script = session.create_script("""var wechatWinAddress=Process.findModuleByName('WeChatWin.dll');
var recvMessageHookAddress = wechatWinAddress.base.add('0x4BF858'); //撤销时候会触发
Interceptor.attach(recvMessageHookAddress, {
onEnter(args) {
var esp = this.context.esp;
var messageContent = Memory.readUtf16String(Memory.readPointer(esp.add("0x18")));
console.log("有人撤回了一条消息:"+messageContent);
//wxid 在0x94的位置 自己搞吧
send({messageContent});
}
});
""")
script.on('message', on_message)
script.load()
print("[!] Ctrl+D on UNIX, Ctrl+Z on Windows/cmd.exe to detach from instrumented program.\n\n")
sys.stdin.read()
session.detach()
if __name__ == '__main__':
main('wechat.exe')
|