2022-10-15 20:25:42 +08:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
2024-04-17 00:35:43 +08:00
|
|
|
|
#define WECHAREXE L"WeChat.exe"
|
|
|
|
|
#define WECHATWINDLL L"WeChatWin.dll"
|
|
|
|
|
#define WCFSDKDLL L"sdk.dll"
|
|
|
|
|
#define WCFSPYDLL L"spy.dll"
|
|
|
|
|
#define WCFSPYDLL_DEBUG L"spy_debug.dll"
|
2022-10-15 20:25:42 +08:00
|
|
|
|
|
2023-05-25 00:18:10 +08:00
|
|
|
|
#define GET_DWORD(addr) ((DWORD) * (DWORD *)(addr))
|
2023-07-16 14:25:46 +08:00
|
|
|
|
#define GET_QWORD(addr) ((uint64_t) * (uint64_t *)(addr))
|
2023-05-25 00:18:10 +08:00
|
|
|
|
#define GET_STRING(addr) ((CHAR *)(*(DWORD *)(addr)))
|
|
|
|
|
#define GET_WSTRING(addr) ((WCHAR *)(*(DWORD *)(addr)))
|
|
|
|
|
#define GET_STRING_FROM_P(addr) ((CHAR *)(addr))
|
|
|
|
|
#define GET_WSTRING_FROM_P(addr) ((WCHAR *)(addr))
|
2022-10-15 20:25:42 +08:00
|
|
|
|
|
2023-05-21 20:29:21 +08:00
|
|
|
|
typedef struct PortPath {
|
|
|
|
|
int port;
|
|
|
|
|
char path[MAX_PATH];
|
|
|
|
|
} PortPath_t;
|
|
|
|
|
|
2023-02-25 02:11:04 +08:00
|
|
|
|
DWORD GetWeChatPid();
|
2022-10-15 20:25:42 +08:00
|
|
|
|
int OpenWeChat(DWORD *pid);
|
|
|
|
|
int GetWeChatVersion(wchar_t *version);
|
|
|
|
|
int GetWstringByAddress(DWORD address, wchar_t *buffer, DWORD buffer_size);
|
|
|
|
|
DWORD GetMemoryIntByAddress(HANDLE hProcess, DWORD address);
|
|
|
|
|
std::wstring GetUnicodeInfoByAddress(HANDLE hProcess, DWORD address);
|
|
|
|
|
std::wstring String2Wstring(std::string s);
|
|
|
|
|
std::string Wstring2String(std::wstring ws);
|
2023-11-22 22:35:00 +08:00
|
|
|
|
std::string GB2312ToUtf8(const char *gb2312);
|
2022-10-15 20:25:42 +08:00
|
|
|
|
std::string GetStringByAddress(DWORD address);
|
2023-06-08 16:23:21 +08:00
|
|
|
|
std::string GetStringByStrAddr(DWORD addr);
|
|
|
|
|
std::string GetStringByWstrAddr(DWORD addr);
|
2023-05-25 00:18:10 +08:00
|
|
|
|
void DbgMsg(const char *zcFormat, ...);
|