当前位置: 首页> 健康> 美食 > 广告创意设计与制作_logo网站在线制作_网络推广公司哪里好_seo营销课程培训

广告创意设计与制作_logo网站在线制作_网络推广公司哪里好_seo营销课程培训

时间:2025/7/19 18:21:22来源:https://blog.csdn.net/hongsegeming/article/details/145523110 浏览次数:0次
广告创意设计与制作_logo网站在线制作_网络推广公司哪里好_seo营销课程培训

Python

import frida
import sys
import json
from datetime import datetimedef on_message(message, data):if message['type'] == 'send':try:payload = message['payload']timestamp = datetime.fromtimestamp(payload['timestamp']/1000).strftime('%Y-%m-%d %H:%M:%S')print("\n" + "="*50)print(f"[{timestamp}] 收到消息:")if payload['type'] == 'getLocalId_result':print(f"函数: getLocalId 结果")print(f"输入参数: {payload['input']}")print(f"返回结果: {payload['result']}")elif payload['type'] == 'getMsgUiDataContent':print(f"函数: getMsgUiDataContent")msg = payload['message']print(f"发送者: {msg.get('nickname', '')}")print(f"内容类型: {msg.get('content_type', '')}")content = msg.get('content', '')if content:try:content_json = json.loads(content)if 'link' in content_json:print(f"链接: {content_json['link']}")else:print(f"内容: {content}")except:print(f"内容: {content}")else:link = msg.get('link', '')if link:print(f"链接: {link}")else:print(f"内容: {content}")elif payload['type'] == 'error':print(f"[!] 错误类型: {payload['error']}")print(f"错误详情: {payload['error_detail']}")if 'raw_message' in payload:print(f"原始消息: {payload['raw_message']}")except Exception as e:print(f"[!] 处理消息时出错: {str(e)}")print(f"原始消息: {message}")elif message['type'] == 'error':print(f"[!] Frida错误: {message['stack']}")try:# 连接到目标进程device = frida.get_usb_device()pid = device.spawn(["com.xingin.xhs"])session = device.attach(pid)# 加载JS脚本,使用UTF-8编码打开文件with open(r"C:\Users\xie__\Desktop\小红书测试.js", encoding='utf-8') as f:script = session.create_script(f.read())script.on('message', on_message)script.load()device.resume(pid)print("[*] Hook已加载,等待消息...")sys.stdin.read()except Exception as e:print(f"[!] 发生错误: {str(e)}")

JS

Java.perform(function() {// Hook MsgConvertUtilstry {var MsgConvertUtils = Java.use('com.xingin.chatbase.bean.convert.MsgConvertUtils');MsgConvertUtils.getLocalId.overload('java.lang.String').implementation = function(msgContent) {console.log('\n[+] MsgConvertUtils.getLocalId 被调用');// 发送数据到Pythonsend({type: "getLocalId",input: msgContent,timestamp: new Date().getTime()});// 调用原始方法var result = this.getLocalId(msgContent);// 发送结果到Pythonsend({type: "getLocalId_result",input: msgContent,result: result,timestamp: new Date().getTime()});return result;};// Hook getMsgUiDataContent 方法MsgConvertUtils.getMsgUiDataContent.overload('java.lang.String').implementation = function(msgContent) {         try {var msgJson = JSON.parse(msgContent);// 发送完整消息到Pythonsend({type: "getMsgUiDataContent",message: msgJson,timestamp: new Date().getTime()});} catch(e) {send({type: "error",error: "解析消息内容失败",raw_message: msgContent,error_detail: String(e),timestamp: new Date().getTime()});}// 调用原始方法并返回结果var result = this.getMsgUiDataContent(msgContent);return result;};} catch(e) {send({type: "error",error: "Hook MsgConvertUtils 失败",error_detail: String(e),timestamp: new Date().getTime()});}
});

关键字:广告创意设计与制作_logo网站在线制作_网络推广公司哪里好_seo营销课程培训

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: