自学内容网 自学内容网

小邪大佬最新版微信hook

目前小邪大佬已经更新到最新版本微信hook了。

/发送文件
BOOL SendCdnFilePbMsg(string sendId, string cdnkey, string aes_key,string file_name,string md5, int size, string syncKey)
{
FileMessage sfm;
sfm.set_file_id(cdnkey);
sfm.set_size(size);
sfm.set_aes_key(aes_key);
sfm.set_md5(md5);
string msgpb;
sfm.SerializeToString(&msgpb);
SendMsgFun(sendId, StringToHex(msgpb),0xf, syncKey,"");
return TRUE;
}

//发送视频
BOOL SendCdnVideoPbMsg(string sendId, string cdnkey, string aes_key, string md5, int size, string syncKey)
{
VideoMessage sfm;
sfm.set_video_id(cdnkey);
sfm.set_size(size);
sfm.set_video_duration(5);
sfm.set_video_height(0);
sfm.set_video_width(0);
sfm.set_aes_key(aes_key);
string msgpb;
sfm.SerializeToString(&msgpb);
SendMsgFun(sendId, StringToHex(msgpb), 23, syncKey,"");
return TRUE;
}

//发送文本消息
BOOL SendTextPbMsg(string sendId, string msg, string syncKey)
{
TextMsgData tmd;
tmd.set_val(msg);

SendTextMsgList stm;
TextContentData *tcd = stm.add_textcontentdata();
tcd->set_msgtype(0);
tcd->set_msgdatabuf(tmd.SerializeAsString());

string msgpb;
stm.SerializeToString(&msgpb);
SendMsgFun(sendId, StringToHex(msgpb), 2, syncKey,"");
//forwardMsg(sendId, StringToHex(msgpb),2);

return TRUE;
}

//发送表情消息
BOOL SendTextEmjoPbMsg(string sendId,string syncKey, nlohmann::json content)
{

SendTextMsgList stm;
for (int i = 0; i < content.size();i++) {
if (content[i]["msgtype"].is_number()==false) {
return FALSE;
}
int msgType = content[i]["msgtype"];
string msg = content[i]["msg"];
TextMsgData tmd;
tmd.set_val(msg);
TextContentData *tcd = stm.add_textcontentdata();
tcd->set_msgtype(msgType);
tcd->set_msgdatabuf(tmd.SerializeAsString());
}
string msgpb;
stm.SerializeToString(&msgpb);
SendMsgFun(sendId, StringToHex(msgpb), 2, syncKey,"");
//forwardMsg(sendId, StringToHex(msgpb),2);

return TRUE;
}


原文地址:https://blog.csdn.net/m0_68138958/article/details/139364933

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!