1 Star 0 Fork 1

陈奇/ComWeChatRobot

forked from Janisa/ComWeChatRobot 
Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
GetMsgCDN.cpp 966 Bytes
Copy Edit Raw Blame History
Jack Li authored 3 years ago . 添加新的支持
#include "pch.h"
wstring GetMsgCND(DWORD pid, ULONG64 msgid)
{
WeChatProcess hp(pid);
if (!hp.m_init)
return L"";
DWORD GetMsgCDNRemoteAddr = hp.GetProcAddr(GetMsgCDNRemote);
if (GetMsgCDNRemoteAddr == 0)
{
return L"";
}
WeChatData<ULONG64 *> r_msgid(hp.GetHandle(), &msgid, sizeof(ULONG64));
if (!r_msgid.GetAddr())
{
return L"";
}
DWORD dwRet = CallRemoteFunction(hp.GetHandle(), GetMsgCDNRemoteAddr, r_msgid.GetAddr());
if (dwRet == 0)
return L"";
DWORD get_cdn_resp[2] = {0};
ReadProcessMemory(hp.GetHandle(), (LPVOID)dwRet, &get_cdn_resp, sizeof(get_cdn_resp), 0);
if (!get_cdn_resp[0] || !get_cdn_resp[1])
return L"";
unique_ptr<wchar_t[]> path_buf = make_unique<wchar_t[]>(get_cdn_resp[1] + 1);
ReadProcessMemory(hp.GetHandle(), (LPVOID)get_cdn_resp[0], path_buf.get(), get_cdn_resp[1] * 2, 0);
return wstring(path_buf.get(), get_cdn_resp[1]);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/chen_q_i/ComWeChatRobot.git
git@gitee.com:chen_q_i/ComWeChatRobot.git
chen_q_i
ComWeChatRobot
ComWeChatRobot
master

Search