-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ljc545w
committed
Nov 2, 2022
1 parent
2369f90
commit d3c5e60
Showing
34 changed files
with
941 additions
and
116 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#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]); | ||
} |
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,9 +1,12 @@ | ||
#pragma once | ||
#include<windows.h> | ||
BOOL StartReceiveMessage(DWORD pid,int port); | ||
#include <windows.h> | ||
#include <iostream> | ||
using namespace std; | ||
BOOL StartReceiveMessage(DWORD pid, int port); | ||
BOOL StopReceiveMessage(DWORD pid); | ||
|
||
BOOL HookImageMsg(DWORD pid,wchar_t* savepath); | ||
BOOL HookVoiceMsg(DWORD pid,wchar_t* savepath); | ||
BOOL HookImageMsg(DWORD pid, wchar_t *savepath); | ||
BOOL HookVoiceMsg(DWORD pid, wchar_t *savepath); | ||
void UnHookImageMsg(DWORD pid); | ||
void UnHookVoiceMsg(DWORD pid); | ||
void UnHookVoiceMsg(DWORD pid); | ||
wstring GetMsgCND(DWORD pid, ULONG64 msgid); |
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,32 @@ | ||
#include "pch.h" | ||
|
||
struct SendEmotionStruct | ||
{ | ||
DWORD wxid; | ||
DWORD img_path; | ||
}; | ||
|
||
int SendEmotion(DWORD pid, wchar_t *wxid, wchar_t *img_path) | ||
{ | ||
WeChatProcess hp(pid); | ||
if (!hp.m_init) | ||
return 1; | ||
DWORD SendEmitonRemoteAddr = hp.GetProcAddr(SendEmotionRemote); | ||
if (SendEmitonRemoteAddr == 0) | ||
{ | ||
return 1; | ||
} | ||
SendEmotionStruct params = {0}; | ||
WeChatData<wchar_t *> r_wxid(hp.GetHandle(), wxid, TEXTLENGTH(wxid)); | ||
WeChatData<wchar_t *> r_img_path(hp.GetHandle(), img_path, TEXTLENGTH(img_path)); | ||
|
||
params.wxid = (DWORD)r_wxid.GetAddr(); | ||
params.img_path = (DWORD)r_img_path.GetAddr(); | ||
WeChatData<SendEmotionStruct *> r_params(hp.GetHandle(), ¶ms, sizeof(params)); | ||
if (!params.wxid || !params.img_path || !r_params.GetAddr()) | ||
{ | ||
return 1; | ||
} | ||
DWORD dwRet = CallRemoteFunction(hp.GetHandle(), SendEmitonRemoteAddr, r_params.GetAddr()); | ||
return (dwRet != 1); | ||
} |
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,4 @@ | ||
#pragma once | ||
#include <windows.h> | ||
|
||
int SendEmotion(DWORD pid, wchar_t *wxid, wchar_t *img_path); |
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
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
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.