diff --git a/WeChatFerry/com/util.cpp b/WeChatFerry/com/util.cpp index e52790c..66f0a25 100644 --- a/WeChatFerry/com/util.cpp +++ b/WeChatFerry/com/util.cpp @@ -1,5 +1,5 @@ #include "Shlwapi.h" -#include "framework.h" +#include "../sdk/framework.h" #include #include #include diff --git a/WeChatFerry/com/util.h b/WeChatFerry/com/util.h index 8339464..5173857 100644 --- a/WeChatFerry/com/util.h +++ b/WeChatFerry/com/util.h @@ -1,6 +1,7 @@ #pragma once #include +#include #define WECHAREXE L"WeChat.exe" #define WECHATWINDLL L"WeChatWin.dll" diff --git a/WeChatFerry/rpc/tool/proto/__init__.pyc b/WeChatFerry/rpc/tool/proto/__init__.pyc new file mode 100644 index 0000000..535ce6f Binary files /dev/null and b/WeChatFerry/rpc/tool/proto/__init__.pyc differ diff --git a/WeChatFerry/rpc/tool/proto/_utils.pyc b/WeChatFerry/rpc/tool/proto/_utils.pyc new file mode 100644 index 0000000..80431e1 Binary files /dev/null and b/WeChatFerry/rpc/tool/proto/_utils.pyc differ diff --git a/WeChatFerry/sdk/SDK.vcxproj b/WeChatFerry/sdk/SDK.vcxproj index 5c17179..1d940d9 100644 --- a/WeChatFerry/sdk/SDK.vcxproj +++ b/WeChatFerry/sdk/SDK.vcxproj @@ -29,26 +29,26 @@ DynamicLibrary true - v142 + v143 Unicode DynamicLibrary false - v142 + v143 true Unicode DynamicLibrary true - v142 + v143 Unicode DynamicLibrary false - v142 + v143 true Unicode @@ -144,6 +144,7 @@ true Use pch.h + stdcpp17 Windows @@ -193,11 +194,21 @@ xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferry - - - - - + + NotUsing + + + NotUsing + + + NotUsing + + + NotUsing + + + NotUsing + diff --git a/WeChatFerry/sdk/injector.cpp b/WeChatFerry/sdk/injector.cpp index cc06298..76a2446 100644 --- a/WeChatFerry/sdk/injector.cpp +++ b/WeChatFerry/sdk/injector.cpp @@ -4,7 +4,7 @@ #include #include "injector.h" -#include "util.h" +#include "../com/util.h" using namespace std; diff --git a/WeChatFerry/sdk/sdk.cpp b/WeChatFerry/sdk/sdk.cpp index ff754d5..965e753 100644 --- a/WeChatFerry/sdk/sdk.cpp +++ b/WeChatFerry/sdk/sdk.cpp @@ -6,7 +6,7 @@ #include "injector.h" #include "sdk.h" -#include "util.h" +#include "../com/util.h" static BOOL injected = false; static HANDLE wcProcess = NULL; diff --git a/WeChatFerry/smc/Codec.lib b/WeChatFerry/smc/Codec.lib index b994395..96ce349 100755 Binary files a/WeChatFerry/smc/Codec.lib and b/WeChatFerry/smc/Codec.lib differ diff --git a/WeChatFerry/spy/Spy.vcxproj b/WeChatFerry/spy/Spy.vcxproj index 5277f1d..91865ef 100644 --- a/WeChatFerry/spy/Spy.vcxproj +++ b/WeChatFerry/spy/Spy.vcxproj @@ -31,26 +31,26 @@ DynamicLibrary true - v142 + v143 Unicode DynamicLibrary false - v142 + v143 true Unicode DynamicLibrary true - v142 + v143 Unicode DynamicLibrary false - v142 + v143 true Unicode @@ -97,7 +97,6 @@ true - Release true @@ -208,7 +207,7 @@ $(SolutionDir)rpc\tool\protoc --nanopb_out=. wcf.proto $(SolutionDir)com;$(SolutionDir)rpc;$(SolutionDir)rpc\nanopb;$(SolutionDir)rpc\proto;$(SolutionDir)smc;$(SolutionDir)spy;C:\Tools\vcpkg\installed\x64-windows-static\include true false - MultiThreaded + MultiThreadedDebug true 4251;4731;4819 @@ -226,7 +225,7 @@ $(SolutionDir)rpc\tool\protoc --nanopb_out=. wcf.proto cd $(SolutionDir)rpc\proto -$(SolutionDir)rpc\tool\protoc --nanopb_out=. wcf.proto +F:\C++\vcpkg\installed\x64-windows-static\tools\protobuf\protoc.exe --nanopb_out=. wcf.proto Generating PB files @@ -314,6 +313,7 @@ xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferry + diff --git a/WeChatFerry/spy/Spy.vcxproj.filters b/WeChatFerry/spy/Spy.vcxproj.filters index 8bd6b31..e5613ae 100644 --- a/WeChatFerry/spy/Spy.vcxproj.filters +++ b/WeChatFerry/spy/Spy.vcxproj.filters @@ -93,6 +93,9 @@ 头文件 + + 头文件 + diff --git a/WeChatFerry/spy/dllmain.cpp b/WeChatFerry/spy/dllmain.cpp index 580ec4c..8229961 100644 --- a/WeChatFerry/spy/dllmain.cpp +++ b/WeChatFerry/spy/dllmain.cpp @@ -4,11 +4,14 @@ #include #include "spy.h" - BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: + //PortPath_t p; + //p.port = 1234; + ////p.path = ""; + //InitSpy(&p); case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: diff --git a/WeChatFerry/spy/exec_sql.cpp b/WeChatFerry/spy/exec_sql.cpp index 51e5f81..9065a35 100644 --- a/WeChatFerry/spy/exec_sql.cpp +++ b/WeChatFerry/spy/exec_sql.cpp @@ -2,48 +2,48 @@ #include "exec_sql.h" #include "load_calls.h" -#include "log.h" #include "sqlite3.h" #include "util.h" -#define OFFSET_DB_INSTANCE 0x5A40598 -#define OFFSET_DB_MICROMSG 0xb8 -#define OFFSET_DB_CHAT_MSG 0x2c8 -#define OFFSET_DB_MISC 0x5f0 -#define OFFSET_DB_EMOTION 0x15f0 -#define OFFSET_DB_MEDIA 0xF48 -#define OFFSET_DB_BIZCHAT_MSG 0x1A70 -#define OFFSET_DB_FUNCTION_MSG 0x1b98 -#define OFFSET_DB_NAME 0x28 -#define OFFSET_DB_MSG_MGR 0x5ABB5D8 +#define OFFSET_DB_INSTANCE 0x2FFDDC8 +#define OFFSET_DB_MICROMSG 0x68 +#define OFFSET_DB_CHAT_MSG 0x1C0 +#define OFFSET_DB_MISC 0x3D8 +#define OFFSET_DB_EMOTION 0x558 +#define OFFSET_DB_MEDIA 0x9B8 +#define OFFSET_DB_BIZCHAT_MSG 0x1120 +#define OFFSET_DB_FUNCTION_MSG 0x11B0 +#define OFFSET_DB_NAME 0x14 +#define OFFSET_DB_MSG_MGR 0x30403B8 extern UINT64 g_WeChatWinDllAddr; -typedef map dbMap_t; +typedef map dbMap_t; static dbMap_t dbMap; - -static void GetDbHandle(QWORD base, QWORD offset) +#if 0 +static void GetDbHandle(DWORD base, DWORD offset) { - wchar_t *wsp = (wchar_t *)(*(QWORD *)(base + offset + OFFSET_DB_NAME)); + wchar_t *wsp; + wsp = (wchar_t *)(*(DWORD *)(base + offset + OFFSET_DB_NAME)); string dbname = Wstring2String(wstring(wsp)); - dbMap[dbname] = GET_QWORD(base + offset); + dbMap[dbname] = GET_DWORD(base + offset); } -static void GetMsgDbHandle(QWORD msgMgrAddr) +static void GetMsgDbHandle(DWORD msgMgrAddr) { - QWORD dbIndex = GET_QWORD(msgMgrAddr + 0x68); - QWORD pStart = GET_QWORD(msgMgrAddr + 0x50); + DWORD dbIndex = GET_DWORD(msgMgrAddr + 0x38); + DWORD pStart = GET_DWORD(msgMgrAddr + 0x2C); for (uint32_t i = 0; i < dbIndex; i++) { - QWORD dbAddr = GET_QWORD(pStart + i * 0x08); + DWORD dbAddr = GET_DWORD(pStart + i * 0x04); if (dbAddr) { // MSGi.db string dbname = Wstring2String(GET_WSTRING(dbAddr)); - dbMap[dbname] = GET_QWORD(dbAddr + 0x78); + dbMap[dbname] = GET_DWORD(dbAddr + 0x60); // MediaMsgi.db - QWORD mmdbAddr = GET_QWORD(dbAddr + 0x20); - string mmdbname = Wstring2String(GET_WSTRING(mmdbAddr + 0x78)); - dbMap[mmdbname] = GET_QWORD(mmdbAddr + 0x50); + DWORD mmdbAddr = GET_DWORD(dbAddr + 0x14); + string mmdbname = Wstring2String(GET_WSTRING(mmdbAddr + 0x4C)); + dbMap[mmdbname] = GET_DWORD(mmdbAddr + 0x38); } } } @@ -52,7 +52,7 @@ dbMap_t GetDbHandles() { dbMap.clear(); - QWORD dbInstanceAddr = GET_QWORD(g_WeChatWinDllAddr + OFFSET_DB_INSTANCE); + DWORD dbInstanceAddr = GET_DWORD(g_WeChatWinDllAddr + OFFSET_DB_INSTANCE); GetDbHandle(dbInstanceAddr, OFFSET_DB_MICROMSG); // MicroMsg.db GetDbHandle(dbInstanceAddr, OFFSET_DB_CHAT_MSG); // ChatMsg.db @@ -61,7 +61,7 @@ dbMap_t GetDbHandles() GetDbHandle(dbInstanceAddr, OFFSET_DB_MEDIA); // Media.db GetDbHandle(dbInstanceAddr, OFFSET_DB_FUNCTION_MSG); // Function.db - GetMsgDbHandle(GET_QWORD(g_WeChatWinDllAddr + OFFSET_DB_MSG_MGR)); // MSGi.db & MediaMsgi.db + GetMsgDbHandle(GET_DWORD(g_WeChatWinDllAddr + OFFSET_DB_MSG_MGR)); // MSGi.db & MediaMsgi.db return dbMap; } @@ -133,13 +133,7 @@ DbRows_t ExecDbQuery(const string db, const string sql) dbMap = GetDbHandles(); } - QWORD *stmt; - QWORD handle = dbMap[db]; - if (handle == 0) { - LOG_WARN("Empty handle, retrying..."); - dbMap = GetDbHandles(); - } - + DWORD *stmt; int rc = func_prepare(dbMap[db], sql.c_str(), -1, &stmt, 0); if (rc != SQLITE_OK) { return rows; @@ -168,16 +162,16 @@ DbRows_t ExecDbQuery(const string db, const string sql) int GetLocalIdandDbidx(uint64_t id, uint64_t *localId, uint32_t *dbIdx) { - QWORD msgMgrAddr = GET_QWORD(g_WeChatWinDllAddr + OFFSET_DB_MSG_MGR); - int dbIndex = (int)GET_QWORD(msgMgrAddr + 0x68); // 总不能 int 还不够吧? - QWORD pStart = GET_QWORD(msgMgrAddr + 0x50); + DWORD msgMgrAddr = GET_DWORD(g_WeChatWinDllAddr + OFFSET_DB_MSG_MGR); + DWORD dbIndex = GET_DWORD(msgMgrAddr + 0x38); + DWORD pStart = GET_DWORD(msgMgrAddr + 0x2C); *dbIdx = 0; for (int i = dbIndex - 1; i >= 0; i--) { // 从后往前遍历 - QWORD dbAddr = GET_QWORD(pStart + i * 0x08); + DWORD dbAddr = GET_DWORD(pStart + i * 0x04); if (dbAddr) { string dbname = Wstring2String(GET_WSTRING(dbAddr)); - dbMap[dbname] = GET_QWORD(dbAddr + 0x78); + dbMap[dbname] = GET_DWORD(dbAddr + 0x60); string sql = "SELECT localId FROM MSG WHERE MsgSvrID=" + to_string(id) + ";"; DbRows_t rows = ExecDbQuery(dbname, sql); if (rows.empty()) { @@ -193,7 +187,7 @@ int GetLocalIdandDbidx(uint64_t id, uint64_t *localId, uint32_t *dbIdx) } *localId = strtoull((const char *)(field.content.data()), NULL, 10); - *dbIdx = (uint32_t)(GET_QWORD(GET_QWORD(dbAddr + 0x28) + 0x1E8) >> 32); + *dbIdx = GET_DWORD(GET_DWORD(dbAddr + 0x18) + 0x144); return 0; } @@ -204,10 +198,10 @@ int GetLocalIdandDbidx(uint64_t id, uint64_t *localId, uint32_t *dbIdx) vector GetAudioData(uint64_t id) { - QWORD msgMgrAddr = GET_QWORD(g_WeChatWinDllAddr + OFFSET_DB_MSG_MGR); - int dbIndex = (int)GET_QWORD(msgMgrAddr + 0x68); + DWORD msgMgrAddr = GET_DWORD(g_WeChatWinDllAddr + OFFSET_DB_MSG_MGR); + DWORD dbIndex = GET_DWORD(msgMgrAddr + 0x38); - string sql = "SELECT Buf FROM Media WHERE Reserved0=" + to_string(id) + ";"; + string sql = "SELECT Buf from Media WHERE Reserved0=" + to_string(id) + ";"; for (int i = dbIndex - 1; i >= 0; i--) { string dbname = "MediaMSG" + to_string(i) + ".db"; DbRows_t rows = ExecDbQuery(dbname, sql); @@ -231,3 +225,4 @@ vector GetAudioData(uint64_t id) return vector(); } +#endif diff --git a/WeChatFerry/spy/funcs.cpp b/WeChatFerry/spy/funcs.cpp index 589cbbe..cd104ae 100644 --- a/WeChatFerry/spy/funcs.cpp +++ b/WeChatFerry/spy/funcs.cpp @@ -10,6 +10,7 @@ #include "log.h" #include "spy_types.h" #include "util.h" +#include "wechat_function.h" #define HEADER_PNG1 0x89 #define HEADER_PNG2 0x50 @@ -25,8 +26,9 @@ extern bool gIsListeningPyq; extern WxCalls_t g_WxCalls; extern UINT64 g_WeChatWinDllAddr; -int IsLogin(void) { return (int)GET_UINT64(g_WeChatWinDllAddr + g_WxCalls.login); } +int IsLogin(void) { return (int)GET_UINT64(g_WeChatWinDllAddr + offset::wcf_kLoginStatu); } +#if 0 static string get_key(uint8_t header1, uint8_t header2, uint8_t *key) { // PNG? @@ -53,7 +55,6 @@ static string get_key(uint8_t header1, uint8_t header2, uint8_t *key) string DecryptImage(string src, string dir) { if (!fs::exists(src)) { - LOG_ERROR("File not exists: {}", src); return ""; } @@ -114,7 +115,6 @@ string DecryptImage(string src, string dir) return dst; } -#if 0 static int GetFirstPage() { int rv = -1; @@ -323,7 +323,6 @@ int RevokeMsg(uint64_t id) return status; } -#endif string GetAudio(uint64_t id, string dir) { @@ -345,7 +344,6 @@ string GetAudio(uint64_t id, string dir) return mp3path; } -#if 0 OcrResult_t GetOcrResult(string path) { OcrResult_t ret = { -1, "" }; diff --git a/WeChatFerry/spy/load_calls.cpp b/WeChatFerry/spy/load_calls.cpp index 190c904..dbccaa9 100644 --- a/WeChatFerry/spy/load_calls.cpp +++ b/WeChatFerry/spy/load_calls.cpp @@ -6,42 +6,44 @@ #define SUPPORT_VERSION L"3.9.10.27" WxCalls_t wxCalls = { - 0x5AB8A2C, // Login Status - { 0x5AB7FB8, 0x5AB8098, 0x5AB7FD8, 0x5A7E190 }, // User Info: wxid, nickname, mobile, home - { 0x1C1E690, 0x238DDD0, 0x1C1FF10 }, // Send Text Message - /* Receive Message: - Hook, call, msgId, type, isSelf, ts, roomId, content, wxid, sign, thumb, extra, msgXml */ - { 0x00, 0x2205510, 0x30, 0x38, 0x3C, 0x44, 0x48, 0x88, 0x240, 0x260, 0x280, 0x2A0, 0x308 }, - { 0x1C28800, 0x1C1FF10, 0x1C1E690, 0x2383560 }, // Send Image Message - { 0x1C28800, 0x1C1FF10, 0x1C23630, 0x21969E0 }, // Send File Message - { 0xB8A70, 0x3ED5E0, 0x107F00, 0x3ED7B0, 0x2386FE4 }, // Send xml Message - { 0x771980, 0x4777E0, 0x239E888 }, // Send Emotion Message - /* Get Contacts: - call1, call2, wxId, Code, Remark,Name, Gender, Country, Province, City*/ - { 0x75A4A0, 0xC089F0, 0x10, 0x24, 0x58, 0x6C, 0x0E, 0x00, 0x00, 0x00 }, - /* Exec Sql: - Exec, base, start, end, slot, name*/ - { 0x141BDF0, 0x2366934, 0x1428, 0x142C, 0x3C, 0x50 }, - { 0xA17D50, 0xF59E40, 0xA18BD0, 0xA17E70 }, // Accept New Friend application - { 0x78CF20, 0xF59E40, 0xBD1DC0 }, // Add chatroom members - { 0x78CF20, 0xF59E40, 0xBD22A0 }, // Delete chatroom members - { 0x7B2E60, 0x15E2C20, 0x79C250 }, // Receive transfer - /* Receive PYQ - hook, call, call1, call2, call3, start, end, ts, wxid, content, xml, step*/ - { 0x14F9E15, 0x14FA0A0, 0xC39680, 0x14E2140, 0x14E21E0, 0x20, 0x24, 0x2C, 0x18, 0x3C, 0x384, 0xB48 }, - /* call1, call2, call3, call4, call5, call6*/ - { 0x76F010, 0x792700, 0xBC0370, 0x80F110, 0x82BB40, 0x756E30}, - /* call1, call2, call3, call4, call5*/ - {0x76F010, 0x792700, 0xBC0370, 0xBB5F70, 0x756E30}, - {0x1C27D50, 0x1C27120, 0x1C23630, 0x21A09C0}, // Send Rich Text Message - {0x2D669B0}, // Send Pat Message - /* call1, call2, call3, call4, call5, call6, call7, call8*/ - {0x78CB40, 0x7F99D0, 0x78CF20, 0x78CEF0, 0xF59E40, 0xBD1A00, 0x7FA980, 0x755060}, - /* call1, call2, call3 */ - {0x80A800, 0x80F270, 0x13DA3E0}, - {0x238D350}, // Forward message - /* call1, call2, url */ - {0xAE9DB0, 0xCDA6F0, 0x3040DE8} + //0x5AB8A2C, // Login Status + //{ 0x5AB7FB8, 0x5AB8098, 0x5AB7FD8, 0x5A7E190 }, // User Info: wxid, nickname, mobile, home + //{ 0x1C1E690, 0x238DDD0, 0x1C1FF10 }, // Send Text Message + ///* Receive Message: + // Hook, call, msgId, type, isSelf, ts, roomId, content, wxid, sign, thumb, extra, msgXml */ + //{ 0x00, 0x2205510, 0x30, 0x38, 0x3C, 0x44, 0x48, 0x88, 0x240, 0x260, 0x280, 0x2A0, 0x308 }, + //{ 0x1C28800, 0x1C1FF10, 0x1C1E690, 0x2383560 }, // Send Image Message + //{ 0x1C28800, 0x1C1FF10, 0x1C23630, 0x21969E0 }, // Send File Message + //{ 0xB8A70, 0x3ED5E0, 0x107F00, 0x3ED7B0, 0x2386FE4 }, // Send xml Message + //{ 0x771980, 0x4777E0, 0x239E888 }, // Send Emotion Message + ///* Get Contacts: + // call1, call2, wxId, Code, Remark,Name, Gender, Country, Province, City*/ + //{ 0x75A4A0, 0xC089F0, 0x10, 0x24, 0x58, 0x6C, 0x0E, 0x00, 0x00, 0x00 }, + ///* Exec Sql: + // Exec, base, start, end, slot, name*/ + //{ 0x141BDF0, 0x2366934, 0x1428, 0x142C, 0x3C, 0x50 }, + //{ 0xA17D50, 0xF59E40, 0xA18BD0, 0xA17E70 }, // Accept New Friend application + //{ 0x78CF20, 0xF59E40, 0xBD1DC0 }, // Add chatroom members + //{ 0x78CF20, 0xF59E40, 0xBD22A0 }, // Delete chatroom members + //{ 0x7B2E60, 0x15E2C20, 0x79C250 }, // Receive transfer + ///* Receive PYQ + // hook, call, call1, call2, call3, start, end, ts, wxid, content, xml, step*/ + //{ 0x14F9E15, 0x14FA0A0, 0xC39680, 0x14E2140, 0x14E21E0, 0x20, 0x24, 0x2C, 0x18, 0x3C, 0x384, 0xB48 }, + ///* call1, call2, call3, call4, call5, call6*/ + //{ 0x76F010, 0x792700, 0xBC0370, 0x80F110, 0x82BB40, 0x756E30}, + ///* call1, call2, call3, call4, call5*/ + //{0x76F010, 0x792700, 0xBC0370, 0xBB5F70, 0x756E30}, + //{0x1C27D50, 0x1C27120, 0x1C23630, 0x21A09C0}, // Send Rich Text Message + ///* call1, call2, call3 */ + //{0x931730, 0x1D58751, 0x1421940}, + ///* call1, call2, call3, call4, call5, call6, call7, call8*/ + //{0x78CB40, 0x7F99D0, 0x78CF20, 0x78CEF0, 0xF59E40, 0xBD1A00, 0x7FA980, 0x755060}, + ///* call1, call2, call3 */ + //{0x80A800, 0x80F270, 0x13DA3E0}, + ///* call1, call2 */ + //{0xF59E40, 0xCE6730}, + ///* call1, call2, url */ + //{0xAE9DB0, 0xCDA6F0, 0x3040DE8} }; int LoadCalls(const wchar_t *version, WxCalls_t *calls) diff --git a/WeChatFerry/spy/receive_msg.cpp b/WeChatFerry/spy/receive_msg.cpp index 8a518e9..6e77438 100644 --- a/WeChatFerry/spy/receive_msg.cpp +++ b/WeChatFerry/spy/receive_msg.cpp @@ -11,6 +11,7 @@ #include "receive_msg.h" #include "user_info.h" #include "util.h" +#include "wechat_function.h" // Defined in rpc_server.cpp extern bool gIsListening, gIsListeningPyq; @@ -71,22 +72,22 @@ static UINT64 DispatchMsg(UINT64 arg1, UINT64 arg2) { WxMsg_t wxMsg = { 0 }; try { - wxMsg.id = GET_QWORD(arg2 + g_WxCalls.recvMsg.msgId); - wxMsg.type = GET_DWORD(arg2 + g_WxCalls.recvMsg.type); - wxMsg.is_self = GET_DWORD(arg2 + g_WxCalls.recvMsg.isSelf); - wxMsg.ts = GET_DWORD(arg2 + g_WxCalls.recvMsg.ts); - wxMsg.content = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.content); - wxMsg.sign = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.sign); - wxMsg.xml = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.msgXml); + wxMsg.id = GET_QWORD(arg2 + offset::wcf_msgId); + wxMsg.type = GET_DWORD(arg2 + offset::wcf_type); + wxMsg.is_self = GET_DWORD(arg2 + offset::wcf_isSelf); + wxMsg.ts = GET_DWORD(arg2 + offset::wcf_ts); + wxMsg.content = GetStringByWstrAddr(arg2 + offset::wcf_content); + wxMsg.sign = GetStringByWstrAddr(arg2 + offset::wcf_sign); + wxMsg.xml = GetStringByWstrAddr(arg2 + offset::wcf_msgXml); - string roomid = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.roomId); + string roomid = GetStringByWstrAddr(arg2 + offset::wcf_roomId); if (roomid.find("@chatroom") != string::npos) { // 群 ID 的格式为 xxxxxxxxxxx@chatroom wxMsg.is_group = true; wxMsg.roomid = roomid; if (wxMsg.is_self) { wxMsg.sender = GetSelfWxid(); } else { - wxMsg.sender = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.wxid); + wxMsg.sender = GetStringByWstrAddr(arg2 + offset::wcf_wxid); } } else { wxMsg.is_group = false; @@ -97,13 +98,13 @@ static UINT64 DispatchMsg(UINT64 arg1, UINT64 arg2) } } - wxMsg.thumb = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.thumb); + wxMsg.thumb = GetStringByWstrAddr(arg2 + offset::wcf_thumb); if (!wxMsg.thumb.empty()) { wxMsg.thumb = GetHomePath() + wxMsg.thumb; replace(wxMsg.thumb.begin(), wxMsg.thumb.end(), '\\', '/'); } - wxMsg.extra = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.extra); + wxMsg.extra = GetStringByWstrAddr(arg2 + offset::wcf_extra); if (!wxMsg.extra.empty()) { wxMsg.extra = GetHomePath() + wxMsg.extra; replace(wxMsg.extra.begin(), wxMsg.extra.end(), '\\', '/'); @@ -130,7 +131,7 @@ void ListenMessage() LOG_WARN("gIsListening || (g_WeChatWinDllAddr == 0)"); return; } - funcRecvMsg = (funcRecvMsg_t)(g_WeChatWinDllAddr + g_WxCalls.recvMsg.call); + funcRecvMsg = (funcRecvMsg_t)(g_WeChatWinDllAddr + offset::wcf_HookCall); status = MH_Initialize(); if (status != MH_OK) { @@ -215,22 +216,22 @@ void DispatchMsg(DWORD reg) { WxMsg_t wxMsg; try { - wxMsg.id = GET_QWORD(reg + g_WxCalls.recvMsg.msgId); - wxMsg.type = GET_DWORD(reg + g_WxCalls.recvMsg.type); - wxMsg.is_self = GET_DWORD(reg + g_WxCalls.recvMsg.isSelf); - wxMsg.ts = GET_DWORD(reg + g_WxCalls.recvMsg.ts); - wxMsg.content = GetStringByWstrAddr(reg + g_WxCalls.recvMsg.content); - wxMsg.sign = GetStringByStrAddr(reg + g_WxCalls.recvMsg.sign); - wxMsg.xml = GetStringByStrAddr(reg + g_WxCalls.recvMsg.msgXml); + wxMsg.id = GET_QWORD(reg + offset::wcf_msgId); + wxMsg.type = GET_DWORD(reg + offset::wcf_type); + wxMsg.is_self = GET_DWORD(reg + offset::wcf_isSelf); + wxMsg.ts = GET_DWORD(reg + offset::wcf_ts); + wxMsg.content = GetStringByWstrAddr(reg + offset::wcf_content); + wxMsg.sign = GetStringByStrAddr(reg + offset::wcf_sign); + wxMsg.xml = GetStringByStrAddr(reg + offset::wcf_msgXml); - string roomid = GetStringByWstrAddr(reg + g_WxCalls.recvMsg.roomId); + string roomid = GetStringByWstrAddr(reg + offset::wcf_roomId); if (roomid.find("@chatroom") != string::npos) { // 群 ID 的格式为 xxxxxxxxxxx@chatroom wxMsg.is_group = true; wxMsg.roomid = roomid; if (wxMsg.is_self) { wxMsg.sender = GetSelfWxid(); } else { - wxMsg.sender = GetStringByStrAddr(reg + g_WxCalls.recvMsg.wxid); + wxMsg.sender = GetStringByStrAddr(reg + offset::wcf_wxid); } } else { wxMsg.is_group = false; @@ -241,13 +242,13 @@ void DispatchMsg(DWORD reg) } } - wxMsg.thumb = GetStringByStrAddr(reg + g_WxCalls.recvMsg.thumb); + wxMsg.thumb = GetStringByStrAddr(reg + offset::wcf_thumb); if (!wxMsg.thumb.empty()) { wxMsg.thumb = GetHomePath() + wxMsg.thumb; replace(wxMsg.thumb.begin(), wxMsg.thumb.end(), '\\', '/'); } - wxMsg.extra = GetStringByStrAddr(reg + g_WxCalls.recvMsg.extra); + wxMsg.extra = GetStringByStrAddr(reg + offset::wcf_extra); if (!wxMsg.extra.empty()) { wxMsg.extra = GetHomePath() + wxMsg.extra; replace(wxMsg.extra.begin(), wxMsg.extra.end(), '\\', '/'); @@ -290,8 +291,8 @@ void ListenMessage() return; } - recvMsgHookAddr = g_WeChatWinDllAddr + g_WxCalls.recvMsg.hook; - recvMsgCallAddr = g_WeChatWinDllAddr + g_WxCalls.recvMsg.call; + recvMsgHookAddr = g_WeChatWinDllAddr + offset::wcf_hook; + recvMsgCallAddr = g_WeChatWinDllAddr + offset::wcf_call; recvMsgJumpBackAddr = recvMsgHookAddr + 5; HookAddress(recvMsgHookAddr, RecieveMsgFunc, recvMsgBackupCode); diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index 4c5e8e0..39caf6a 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -149,7 +149,7 @@ bool func_get_contacts(uint8_t *out, size_t *len) return true; } -#endif + bool func_get_db_names(uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -214,7 +214,7 @@ bool func_get_audio_msg(uint64_t id, char *dir, uint8_t *out, size_t *len) return true; } - +#endif bool func_send_txt(TextMsg txt, uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -383,6 +383,7 @@ bool func_send_rich_txt(RichText rt, uint8_t *out, size_t *len) return true; } +#if 0 bool func_send_pat_msg(char *roomid, char *wxid, uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -428,7 +429,7 @@ bool func_forward_msg(uint64_t id, char *receiver, uint8_t *out, size_t *len) return true; } - +#endif static void PushMessage() { static uint8_t buffer[G_BUF_SIZE] = { 0 }; @@ -545,6 +546,7 @@ bool func_disable_recv_txt(uint8_t *out, size_t *len) return true; } +#if 0 bool func_exec_db_query(char *db, char *sql, uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -571,7 +573,6 @@ bool func_exec_db_query(char *db, char *sql, uint8_t *out, size_t *len) return true; } -#if 0 bool func_accept_friend(char *v3, char *v4, int32_t scene, uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -716,7 +717,6 @@ bool func_refresh_qrcode(uint8_t *out, size_t *len) return true; } -#endif bool func_decrypt_image(DecPath dec, uint8_t *out, size_t *len) { @@ -743,7 +743,6 @@ bool func_decrypt_image(DecPath dec, uint8_t *out, size_t *len) return true; } -#if 0 bool func_exec_ocr(char *path, uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -841,7 +840,6 @@ bool func_invite_room_members(char *roomid, char *wxids, uint8_t *out, size_t *l return true; } #endif - static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len) { bool ret = false; @@ -877,7 +875,6 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_get_contacts(out, out_len); break; } -#endif case Functions_FUNC_GET_DB_NAMES: { ret = func_get_db_names(out, out_len); break; @@ -890,6 +887,7 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_get_audio_msg(req.msg.am.id, req.msg.am.dir, out, out_len); break; } +#endif case Functions_FUNC_SEND_TXT: { ret = func_send_txt(req.msg.txt, out, out_len); break; @@ -906,6 +904,7 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_send_rich_txt(req.msg.rt, out, out_len); break; } +#if 0 case Functions_FUNC_SEND_PAT_MSG: { ret = func_send_pat_msg(req.msg.pm.roomid, req.msg.pm.wxid, out, out_len); break; @@ -914,7 +913,6 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_forward_msg(req.msg.fm.id, req.msg.fm.receiver, out, out_len); break; } -#if 0 case Functions_FUNC_SEND_XML: { ret = func_send_xml(req.msg.xml, out, out_len); break; @@ -932,11 +930,11 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_disable_recv_txt(out, out_len); break; } +#if 0 case Functions_FUNC_EXEC_DB_QUERY: { ret = func_exec_db_query(req.msg.query.db, req.msg.query.sql, out, out_len); break; } -#if 0 case Functions_FUNC_ACCEPT_FRIEND: { ret = func_accept_friend(req.msg.v.v3, req.msg.v.v4, req.msg.v.scene, out, out_len); break; @@ -965,12 +963,10 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_refresh_qrcode(out, out_len); break; } -#endif case Functions_FUNC_DECRYPT_IMAGE: { ret = func_decrypt_image(req.msg.dec, out, out_len); break; } -#if 0 case Functions_FUNC_EXEC_OCR: { ret = func_exec_ocr(req.msg.str, out, out_len); break; diff --git a/WeChatFerry/spy/send_msg.cpp b/WeChatFerry/spy/send_msg.cpp index 33ae4fc..cbc8166 100644 --- a/WeChatFerry/spy/send_msg.cpp +++ b/WeChatFerry/spy/send_msg.cpp @@ -7,6 +7,7 @@ #include "send_msg.h" #include "spy_types.h" #include "util.h" +#include "wechat_function.h" extern HANDLE g_hEvent; extern WxCalls_t g_WxCalls; @@ -23,8 +24,6 @@ typedef QWORD (*funcSendImageMsg_t)(QWORD, QWORD, QWORD, QWORD, QWORD); typedef QWORD (*funcSendFileMsg_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD *, QWORD, QWORD *, QWORD, QWORD *, QWORD, QWORD); typedef QWORD (*funcSendRichTextMsg_t)(QWORD, QWORD, QWORD); -typedef QWORD (*funcSendPatMsg_t)(QWORD, QWORD); -typedef QWORD (*funcForwardMsg_t)(QWORD, QWORD, QWORD, QWORD); void SendTextMessage(string wxid, string msg, string atWxids) { @@ -53,9 +52,9 @@ void SendTextMessage(string wxid, string msg, string atWxids) QWORD wxAters = (QWORD) & ((RawVector_t *)&vWxAtWxids)->start; char buffer[0x460] = { 0 }; - funcSendMsgMgr_t funcSendMsgMgr = (funcSendMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.sendText.call1); - funcSendTextMsg_t funcSendTextMsg = (funcSendTextMsg_t)(g_WeChatWinDllAddr + g_WxCalls.sendText.call2); - funcFree_t funcFree = (funcFree_t)(g_WeChatWinDllAddr + g_WxCalls.sendText.call3); + funcSendMsgMgr_t funcSendMsgMgr = (funcSendMsgMgr_t)(g_WeChatWinDllAddr + offset::kGetSendMessageMgr); + funcSendTextMsg_t funcSendTextMsg = (funcSendTextMsg_t)(g_WeChatWinDllAddr + offset::kSendTextMsg); + funcFree_t funcFree = (funcFree_t)(g_WeChatWinDllAddr + offset::kFreeChatMsg); funcSendMsgMgr(); success = funcSendTextMsg((QWORD)(&buffer), (QWORD)(&wxWxid), (QWORD)(&wxMsg), wxAters, 1, 1, 0, 0); funcFree((QWORD)(&buffer)); @@ -69,10 +68,10 @@ void SendImageMessage(string wxid, string path) WxString wxWxid(wsWxid); WxString wxPath(wsPath); - funcNew_t funcNew = (funcNew_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call1); - funcFree_t funcFree = (funcFree_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call2); - funcSendMsgMgr_t funcSendMsgMgr = (funcSendMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call3); - funcSendImageMsg_t funcSendImage = (funcSendImageMsg_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call4); + funcNew_t funcNew = (funcNew_t)(g_WeChatWinDllAddr + offset::kNewChatMsgByDownloadMgr); + funcFree_t funcFree = (funcFree_t)(g_WeChatWinDllAddr + offset::kFreeChatMsg); + funcSendMsgMgr_t funcSendMsgMgr = (funcSendMsgMgr_t)(g_WeChatWinDllAddr + offset::kGetSendMessageMgr); + funcSendImageMsg_t funcSendImage = (funcSendImageMsg_t)(g_WeChatWinDllAddr + offset::kSendImageMsg); char msg[0x460] = { 0 }; char msgTmp[0x460] = { 0 }; @@ -99,10 +98,10 @@ void SendFileMessage(string wxid, string path) WxString wxWxid(wsWxid); WxString wxPath(wsPath); - funcNew_t funcNew = (funcNew_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call1); - funcFree_t funcFree = (funcFree_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call2); - funcGetAppMsgMgr_t funcGetAppMsgMgr = (funcGetAppMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call3); - funcSendFileMsg_t funcSendFile = (funcSendFileMsg_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call4); + funcNew_t funcNew = (funcNew_t)(g_WeChatWinDllAddr + offset::kChatMsgInstanceCounter); + funcFree_t funcFree = (funcFree_t)(g_WeChatWinDllAddr + offset::kFreeChatMsg); + funcGetAppMsgMgr_t funcGetAppMsgMgr = (funcGetAppMsgMgr_t)(g_WeChatWinDllAddr + offset::kGetAppMsgMgr); + funcSendFileMsg_t funcSendFile = (funcSendFileMsg_t)(g_WeChatWinDllAddr + offset::kSendFileMsg); char msg[0x460] = { 0 }; QWORD tmp1[4] = { 0 }; @@ -146,10 +145,10 @@ int SendRichTextMessage(RichText_t &rt) wstring name = String2Wstring(rt.name); wstring digest = String2Wstring(rt.digest); - funcNew_t funcNew = (funcNew_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call1); - funcFree_t funcFree = (funcFree_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call2); - funcGetAppMsgMgr_t funcGetAppMsgMgr = (funcGetAppMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call3); - funcSendRichTextMsg_t funcForwordPublicMsg = (funcSendRichTextMsg_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call4); + funcNew_t funcNew = (funcNew_t)(g_WeChatWinDllAddr + offset::kNewRChatMsg); + funcFree_t funcFree = (funcFree_t)(g_WeChatWinDllAddr + offset::kFreeRChatMsg); + funcGetAppMsgMgr_t funcGetAppMsgMgr = (funcGetAppMsgMgr_t)(g_WeChatWinDllAddr + offset::kGetAppMsgMgr); + funcSendRichTextMsg_t funcForwordPublicMsg = (funcSendRichTextMsg_t)(g_WeChatWinDllAddr + offset::kSendRichTextMsg); char *buff = (char *)HeapAlloc(GetProcessHeap(), 0, SRTM_SIZE); if (buff == NULL) { @@ -181,45 +180,6 @@ int SendRichTextMessage(RichText_t &rt) return (int)status; } -int SendPatMessage(string roomid, string wxid) -{ - QWORD status = -1; - - wstring wsRoomid = String2Wstring(roomid); - wstring wsWxid = String2Wstring(wxid); - WxString wxRoomid(wsRoomid); - WxString wxWxid(wsWxid); - - funcSendPatMsg_t funcSendPatMsg = (funcSendPatMsg_t)(g_WeChatWinDllAddr + g_WxCalls.pm.call1); - - status = funcSendPatMsg((QWORD)(&wxRoomid), (QWORD)(&wxWxid)); - return (int)status; -} - -int ForwardMessage(QWORD msgid, string receiver) -{ - int status = -1; - uint32_t dbIdx = 0; - QWORD localId = 0; - - funcForwardMsg_t funcForwardMsg = (funcForwardMsg_t)(g_WeChatWinDllAddr + g_WxCalls.fm.call1); - if (GetLocalIdandDbidx(msgid, &localId, &dbIdx) != 0) { - LOG_ERROR("Failed to get localId, Please check id: {}", to_string(msgid)); - return status; - } - - wstring wsReceiver = String2Wstring(receiver); - WxString *pReceiver = NewWxString(wsReceiver); - - LARGE_INTEGER l; - l.HighPart = dbIdx; - l.LowPart = (DWORD)localId; - - status = (int)funcForwardMsg((QWORD)pReceiver, l.QuadPart, 0x4, 0x0); - - return status; -} - #if 0 void SendXmlMessage(string receiver, string xml, string path, int type) { @@ -344,4 +304,145 @@ void SendEmotionMessage(string wxid, string path) popad; } } + +int SendRichTextMessage(RichText_t &rt) +{ + int status = -1; + char buff[0x238] = { 0 }; + + DWORD rtCall3 = g_WeChatWinDllAddr + g_WxCalls.rt.call3; + DWORD rtCall2 = g_WeChatWinDllAddr + g_WxCalls.rt.call2; + DWORD rtCall1 = g_WeChatWinDllAddr + g_WxCalls.rt.call1; + DWORD rtCall5 = g_WeChatWinDllAddr + g_WxCalls.rt.call5; + DWORD rtCall4 = g_WeChatWinDllAddr + g_WxCalls.rt.call4; + + __asm { + pushad; + pushfd; + lea ecx,buff; + call rtCall1; + popfd; + popad; + } + + wstring receiver = String2Wstring(rt.receiver); + wstring title = String2Wstring(rt.title); + wstring url = String2Wstring(rt.url); + wstring thumburl = String2Wstring(rt.thumburl); + wstring account = String2Wstring(rt.account); + wstring name = String2Wstring(rt.name); + wstring digest = String2Wstring(rt.digest); + + WxString wxReceiver(receiver); + WxString wxTitle(title); + WxString wxUrl(url); + WxString wxThumburl(thumburl); + WxString wxAccount(account); + WxString wxName(name); + WxString wxDigest(digest); + + memcpy(&buff[0x4], &wxTitle, sizeof(wxTitle)); + memcpy(&buff[0x2C], &wxUrl, sizeof(wxUrl)); + memcpy(&buff[0x6C], &wxThumburl, sizeof(wxThumburl)); + memcpy(&buff[0x94], &wxDigest, sizeof(wxDigest)); + memcpy(&buff[0x1A0], &wxAccount, sizeof(wxAccount)); + memcpy(&buff[0x1B4], &wxName, sizeof(wxName)); + + __asm { + pushad; + pushfd; + call rtCall2; + lea ecx, buff; + push ecx; + sub esp, 0x14; + mov edi, eax; + mov ecx, esp; + lea ebx, wxReceiver; + push ebx; + call rtCall3; + mov ecx, edi; + call rtCall4; + mov status, eax; + add ebx, 0x14; + lea ecx, buff; + push 0x0; + call rtCall5; + popfd; + popad; + } + + return status; +} + +int SendPatMessage(string roomid, string wxid) +{ + int status = -1; + + wstring wsRoomid = String2Wstring(roomid); + wstring wsWxid = String2Wstring(wxid); + WxString wxRoomid(wsRoomid); + WxString wxWxid(wsWxid); + + DWORD pmCall1 = g_WeChatWinDllAddr + g_WxCalls.pm.call1; + DWORD pmCall2 = g_WeChatWinDllAddr + g_WxCalls.pm.call2; + DWORD pmCall3 = g_WeChatWinDllAddr + g_WxCalls.pm.call3; + + __asm { + pushad; + call pmCall1; + push pmCall2; + push 0x0; + push eax; + lea ecx, wxRoomid; + lea edx, wxWxid; + call pmCall3; + add esp, 0xc; + movzx eax, al; + mov status, eax; + popad; + } + + return status; +} + +int ForwardMessage(QWORD msgid, string receiver) +{ + int status = -1; + uint32_t dbIdx = 0; + QWORD localId = 0; + + if (GetLocalIdandDbidx(msgid, &localId, &dbIdx) != 0) { + LOG_ERROR("Failed to get localId, Please check id: {}", to_string(msgid)); + return status; + } + + wstring wsReceiver = String2Wstring(receiver); + WxString wxReceiver(wsReceiver); + + DWORD fmCall1 = g_WeChatWinDllAddr + g_WxCalls.fm.call1; + DWORD fmCall2 = g_WeChatWinDllAddr + g_WxCalls.fm.call2; + + __asm { + pushad; + pushfd; + mov edx, dword ptr [dbIdx]; + push edx; + mov eax, dword ptr [localId]; + push eax; + sub esp, 0x14; + mov ecx, esp; + lea esi, wxReceiver; + push esi; + call fmCall1; + xor ecx, ecx; + call fmCall2; + movzx eax, al; + mov status, eax; + add esp, 0x1c; + popfd; + popad; + } + + return status; +} #endif diff --git a/WeChatFerry/spy/spy.cpp b/WeChatFerry/spy/spy.cpp index ef711fe..0b440b1 100644 --- a/WeChatFerry/spy/spy.cpp +++ b/WeChatFerry/spy/spy.cpp @@ -6,7 +6,7 @@ #include "spy.h" #include "util.h" -WxCalls_t g_WxCalls = { 0 }; +//WxCalls_t g_WxCalls = { 0 }; UINT64 g_WeChatWinDllAddr = 0; void InitSpy(LPVOID args) @@ -27,11 +27,11 @@ void InitSpy(LPVOID args) return; } LOG_INFO("WeChat version: {}", Wstring2String(version).c_str()); - if (LoadCalls(version, &g_WxCalls) != 0) { // 加载微信版本对应的Call地址 - LOG_ERROR("不支持当前版本"); - MessageBox(NULL, L"不支持当前版本", L"错误", 0); - return; - } + //if (LoadCalls(version, &g_WxCalls) != 0) { // 加载微信版本对应的Call地址 + // LOG_ERROR("不支持当前版本"); + // MessageBox(NULL, L"不支持当前版本", L"错误", 0); + // return; + //} RpcStartServer(pp->port); } diff --git a/WeChatFerry/spy/spy.h b/WeChatFerry/spy/spy.h index 3aa41dd..358d8b7 100644 --- a/WeChatFerry/spy/spy.h +++ b/WeChatFerry/spy/spy.h @@ -2,5 +2,5 @@ #include "framework.h" -void InitSpy(int port); +void InitSpy(LPVOID port); void CleanupSpy(); diff --git a/WeChatFerry/spy/spy_types.h b/WeChatFerry/spy/spy_types.h index ded8abc..2031fa0 100644 --- a/WeChatFerry/spy/spy_types.h +++ b/WeChatFerry/spy/spy_types.h @@ -5,40 +5,54 @@ typedef uint64_t QWORD; typedef struct UserInfoCall { - DWORD wxid; - DWORD nickName; - DWORD mobile; - DWORD home; + DWORD wxid = 0x5AB7FB8; + DWORD nickName = 0x5AB8098; + DWORD mobile = 0x5AB7FD8; + DWORD home = 0x5A7E190; } UserInfoCall_t; typedef struct RecvMsg { - DWORD hook; // Hook地址 - DWORD call; // Call地址 - DWORD msgId; // 消息ID地址 - DWORD type; // 消息类型地址 - DWORD isSelf; // 是否自己发送标志地址 - DWORD ts; // TimeStamp - DWORD roomId; // 群聊时,为群ID;私聊时,为微信ID - DWORD content; // 消息内容地址 - DWORD wxid; // 私聊时,为空;群聊时,为发送者微信ID - DWORD sign; // Sign - DWORD thumb; // 缩略图 - DWORD extra; // 附加数据 - DWORD msgXml; // 消息xml内容地址 + DWORD hook = 0x00; // Hook地址 + DWORD call = 0x2205510; // Call地址 + DWORD msgId = 0x30; // 消息ID地址 + DWORD type = 0x38; // 消息类型地址 + DWORD isSelf = 0x3C; // 是否自己发送标志地址 + DWORD ts = 0x44; // TimeStamp + DWORD roomId = 0x48; // 群聊时,为群ID;私聊时,为微信ID + DWORD content = 0x88; // 消息内容地址 + DWORD wxid = 0x240; // 私聊时,为空;群聊时,为发送者微信ID + DWORD sign = 0x260; // Sign + DWORD thumb = 0x280; // 缩略图 + DWORD extra = 0x2A0; // 附加数据 + DWORD msgXml = 0x308; // 消息xml内容地址 } RecvMsg_t; typedef struct SendText { - DWORD call1; - DWORD call2; - DWORD call3; -} SendText_t; + DWORD call1 = 0x1C1E690; + DWORD call2 = 0x238DDD0; + DWORD call3 = 0x1C1FF10; +}; typedef struct Sendfile { - DWORD call1; - DWORD call2; - DWORD call3; - DWORD call4; -} Sendfile_t; + DWORD call1 = 0x1C28800; + DWORD call2 = 0x1C1FF10; + DWORD call3 = 0x1C23630; + DWORD call4 = 0x21969E0; +}; +typedef struct SendEmo { + DWORD call1 = 0x771980; + DWORD call2 = 0x4777E0; + DWORD call3 = 0x239E888; +}; + + +typedef struct SendImage { + DWORD call1 = 0x1C28800; + DWORD call2 = 0x1C1FF10; + DWORD call3 = 0x1C1E690; + DWORD call4 = 0x2383560; +}; + typedef struct Contact { DWORD base; @@ -69,11 +83,17 @@ typedef struct NewFriend { DWORD call4; } NewFriend_t; -typedef struct RoomMember { +typedef struct AddRoomMember { DWORD call1; DWORD call2; DWORD call3; -} RoomMember_t; +} ; + +typedef struct DelRoomMember { + DWORD call1; + DWORD call2; + DWORD call3; +}; typedef struct Xml { DWORD call1; @@ -130,6 +150,8 @@ typedef struct CallRichText { typedef struct CallPatMsg { DWORD call1; + DWORD call2; + DWORD call3; } CallPatMsg_t; typedef struct CallInviteCM { @@ -151,6 +173,7 @@ typedef struct CallOcr { typedef struct CallFm { DWORD call1; + DWORD call2; } CallFm_t; typedef struct CallRfLoginQr { @@ -160,29 +183,29 @@ typedef struct CallRfLoginQr { } CallRfLoginQr_t; typedef struct WxCalls { - DWORD login; // 登录状态 - UserInfoCall_t ui; // 用户信息 - SendText_t sendText; // 发送消息 - RecvMsg_t recvMsg; // 接收消息 - Sendfile_t sendImg; // 发送图片 - Sendfile_t sendFile; // 发送文件 - Xml_t sendXml; // 发送XML - Sendfile_t sendEmo; // 发送表情 - Contact_t contact; // 获取联系人 - Sql_t sql; // 执行 SQL - NewFriend_t anf; // 通过好友申请 - RoomMember_t arm; // 添加群成员 - RoomMember_t drm; // 删除群成员 - TF_t tf; // 接收转账 - Pyq_t pyq; // 接收朋友圈消息 - DlAttach_t da; // 下载资源(图片、文件、视频) - RevokeMsg_t rm; // 撤回消息 - CallRichText_t rt; // 发送消息卡片 - CallPatMsg_t pm; // 发送拍一拍消息 - CallInviteCM_t irm; // 邀请群成员 - CallOcr_t ocr; // OCR - CallFm_t fm; // 转发消息 - CallRfLoginQr_t rlq; // 刷新登录二维码 + //DWORD login = 0x5AB8A2C; // 登录状态 + //UserInfoCall_t ui; // 用户信息 + //SendText sendText; // 发送消息 + //RecvMsg_t recvMsg; // 接收消息 + //SendImage sendImg; // 发送图片 + //Sendfile sendFile; // 发送文件 + //Xml_t sendXml; // 发送XML + //SendEmo sendEmo; // 发送表情 + //Contact_t contact; // 获取联系人 + //Sql_t sql; // 执行 SQL + //NewFriend_t anf; // 通过好友申请 + //AddRoomMember arm; // 添加群成员 + //DelRoomMember drm; // 删除群成员 + //TF_t tf; // 接收转账 + //Pyq_t pyq; // 接收朋友圈消息 + //DlAttach_t da; // 下载资源(图片、文件、视频) + //RevokeMsg_t rm; // 撤回消息 + //CallRichText_t rt; // 发送消息卡片 + //CallPatMsg_t pm; // 发送拍一拍消息 + //CallInviteCM_t irm; // 邀请群成员 + //CallOcr_t ocr; // OCR + //CallFm_t fm; // 转发消息 + //CallRfLoginQr_t rlq; // 刷新登录二维码 } WxCalls_t; struct WxString { diff --git a/WeChatFerry/spy/sqlite3.h b/WeChatFerry/spy/sqlite3.h index fe34ab7..ac3d2e8 100644 --- a/WeChatFerry/spy/sqlite3.h +++ b/WeChatFerry/spy/sqlite3.h @@ -136,9 +136,9 @@ #define SQLITE_NULL 5 #define SQLITE_TEXT 3 -#define SQLITE3_EXEC_OFFSET 0x3AFBCE0 +#define SQLITE3_EXEC_OFFSET 0x1E24F70 #define SQLITE3_BACKUP_INIT_OFFSET 0x1DEA900 -#define SQLITE3_PREPARE_OFFSET 0x3B03990 +#define SQLITE3_PREPARE_OFFSET 0x1E2B8C0 #define SQLITE3_OPEN_OFFSET 0x1E598B0 #define SQLITE3_BACKUP_STEP_OFFSET 0x1DEAD00 #define SQLITE3_BACKUP_REMAINING_OFFSET 0x1DEB440 @@ -147,46 +147,46 @@ #define SQLITE3_SLEEP_OFFSET 0x1E5A0F0 #define SQLITE3_ERRCODE_OFFSET 0x1E58550 #define SQLITE3_CLOSE_OFFSET 0x1E56CD0 -#define SQLITE3_STEP_OFFSET 0x3ABFCE0 -#define SQLITE3_COLUMN_COUNT_OFFSET 0x3AC0500 -#define SQLITE3_COLUMN_NAME_OFFSET 0x3AC0F00 -#define SQLITE3_COLUMN_TYPE_OFFSET 0x3AC0D50 -#define SQLITE3_COLUMN_BLOB_OFFSET 0x3AC0530 -#define SQLITE3_COLUMN_BYTES_OFFSET 0x3AC0620 -#define SQLITE3_FINALIZE_OFFSET 0x3ABED90 +#define SQLITE3_STEP_OFFSET 0x1DF3770 +#define SQLITE3_COLUMN_COUNT_OFFSET 0x1DF3C80 +#define SQLITE3_COLUMN_NAME_OFFSET 0x1DF4570 +#define SQLITE3_COLUMN_TYPE_OFFSET 0x1DF4410 +#define SQLITE3_COLUMN_BLOB_OFFSET 0x1DF3CC0 +#define SQLITE3_COLUMN_BYTES_OFFSET 0x1DF3DA0 +#define SQLITE3_FINALIZE_OFFSET 0x1DF2740 typedef int (*Sqlite3_callback)(void *, int, char **, char **); -typedef int(__cdecl *Sqlite3_exec)(QWORD, /* An open database */ +typedef int(__cdecl *Sqlite3_exec)(DWORD, /* An open database */ const char *sql, /* SQL to be evaluated */ Sqlite3_callback, /* Callback function */ void *, /* 1st argument to callback */ char **errmsg /* Error msg written here */ ); -typedef QWORD(__cdecl *Sqlite3_backup_init)(QWORD *pDest, /* Destination database handle */ +typedef DWORD(__cdecl *Sqlite3_backup_init)(DWORD *pDest, /* Destination database handle */ const char *zDestName, /* Destination database name */ - QWORD *pSource, /* Source database handle */ + DWORD *pSource, /* Source database handle */ const char *zSourceName /* Source database name */ ); -typedef int(__cdecl *Sqlite3_prepare)(QWORD db, /* Database handle */ +typedef int(__cdecl *Sqlite3_prepare)(DWORD db, /* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ int nByte, /* Maximum length of zSql in bytes. */ - QWORD **ppStmt, /* OUT: Statement handle */ + DWORD **ppStmt, /* OUT: Statement handle */ const char **pzTail /* OUT: Pointer to unused portion of zSql */ ); -typedef int(__cdecl *Sqlite3_open)(const char *filename, QWORD **ppDb); -typedef int(__cdecl *Sqlite3_backup_step)(QWORD *p, int nPage); -typedef int(__cdecl *Sqlite3_backup_remaining)(QWORD *p); -typedef int(__cdecl *Sqlite3_backup_pagecount)(QWORD *p); -typedef int(__cdecl *Sqlite3_backup_finish)(QWORD *p); +typedef int(__cdecl *Sqlite3_open)(const char *filename, DWORD **ppDb); +typedef int(__cdecl *Sqlite3_backup_step)(DWORD *p, int nPage); +typedef int(__cdecl *Sqlite3_backup_remaining)(DWORD *p); +typedef int(__cdecl *Sqlite3_backup_pagecount)(DWORD *p); +typedef int(__cdecl *Sqlite3_backup_finish)(DWORD *p); typedef int(__cdecl *Sqlite3_sleep)(int); -typedef int(__cdecl *Sqlite3_errcode)(QWORD *db); -typedef int(__cdecl *Sqlite3_close)(QWORD *); +typedef int(__cdecl *Sqlite3_errcode)(DWORD *db); +typedef int(__cdecl *Sqlite3_close)(DWORD *); -typedef int(__cdecl *Sqlite3_step)(QWORD *); -typedef int(__cdecl *Sqlite3_column_count)(QWORD *pStmt); -typedef const char *(__cdecl *Sqlite3_column_name)(QWORD *, int N); -typedef int(__cdecl *Sqlite3_column_type)(QWORD *, int iCol); -typedef const void *(__cdecl *Sqlite3_column_blob)(QWORD *, int iCol); -typedef int(__cdecl *Sqlite3_column_bytes)(QWORD *, int iCol); -typedef int(__cdecl *Sqlite3_finalize)(QWORD *pStmt); +typedef int(__cdecl *Sqlite3_step)(DWORD *); +typedef int(__cdecl *Sqlite3_column_count)(DWORD *pStmt); +typedef const char *(__cdecl *Sqlite3_column_name)(DWORD *, int N); +typedef int(__cdecl *Sqlite3_column_type)(DWORD *, int iCol); +typedef const void *(__cdecl *Sqlite3_column_blob)(DWORD *, int iCol); +typedef int(__cdecl *Sqlite3_column_bytes)(DWORD *, int iCol); +typedef int(__cdecl *Sqlite3_finalize)(DWORD *pStmt); diff --git a/WeChatFerry/spy/user_info.cpp b/WeChatFerry/spy/user_info.cpp index f2e370d..e66cad3 100644 --- a/WeChatFerry/spy/user_info.cpp +++ b/WeChatFerry/spy/user_info.cpp @@ -2,6 +2,7 @@ #include "load_calls.h" #include "log.h" #include "util.h" +#include "wechat_function.h" extern WxCalls_t g_WxCalls; extern UINT64 g_WeChatWinDllAddr; @@ -11,7 +12,7 @@ static char home[MAX_PATH] = { 0 }; string GetHomePath() { if (home[0] == 0) { - string path = Wstring2String(GET_WSTRING(g_WeChatWinDllAddr + g_WxCalls.ui.home)) + "\\WeChat Files\\"; + string path = Wstring2String(GET_WSTRING(g_WeChatWinDllAddr + offset::wcf_home)) + "\\WeChat Files\\"; strncpy_s(home, path.c_str(), path.size()); } @@ -22,15 +23,15 @@ string GetSelfWxid() { UINT64 wxidType = 0; try { - wxidType = GET_UINT64(g_WeChatWinDllAddr + g_WxCalls.ui.wxid + 0x18); + wxidType = GET_UINT64(g_WeChatWinDllAddr + offset::wcf_iwxid + 0x18); if (wxidType == 0xF) { - return GET_STRING_FROM_P(g_WeChatWinDllAddr + g_WxCalls.ui.wxid); + return GET_STRING_FROM_P(g_WeChatWinDllAddr + offset::wcf_iwxid); } else { - return GET_STRING(g_WeChatWinDllAddr + g_WxCalls.ui.wxid); + return GET_STRING(g_WeChatWinDllAddr + offset::wcf_iwxid); } } catch (...) { LOG_ERROR("wxid type: {:#x}", wxidType); - LOG_BUFFER((uint8_t *)(g_WeChatWinDllAddr + g_WxCalls.ui.wxid), 20); + LOG_BUFFER((uint8_t *)(g_WeChatWinDllAddr + offset::wcf_iwxid), 20); return "empty_wxid"; } } @@ -41,14 +42,14 @@ UserInfo_t GetUserInfo() ui.wxid = GetSelfWxid(); - UINT64 nameType = GET_UINT64(g_WeChatWinDllAddr + g_WxCalls.ui.nickName + 0x18); + UINT64 nameType = GET_UINT64(g_WeChatWinDllAddr + offset::wcf_nickName + 0x18); if (nameType == 0xF) { - ui.name = GET_STRING_FROM_P(g_WeChatWinDllAddr + g_WxCalls.ui.nickName); + ui.name = GET_STRING_FROM_P(g_WeChatWinDllAddr + offset::wcf_nickName); } else { // 0x1F - ui.name = GET_STRING(g_WeChatWinDllAddr + g_WxCalls.ui.nickName); + ui.name = GET_STRING(g_WeChatWinDllAddr + offset::wcf_nickName); } - ui.mobile = GET_STRING_FROM_P(g_WeChatWinDllAddr + g_WxCalls.ui.mobile); + ui.mobile = GET_STRING_FROM_P(g_WeChatWinDllAddr + offset::wcf_mobile); ui.home = GetHomePath(); return ui; diff --git a/WeChatFerry/spy/wechat_function.h b/WeChatFerry/spy/wechat_function.h new file mode 100644 index 0000000..531bdcc --- /dev/null +++ b/WeChatFerry/spy/wechat_function.h @@ -0,0 +1,177 @@ +#include +#include +#include + +namespace offset { + const UINT64 kGetAccountServiceMgr = 0x1B50D00; //ok + const UINT64 kGetCurrentDataPath = 0x2248D40; //ok + const UINT64 kGetAppDataSavePath = 0x25DBFE0; //ok + const UINT64 kGetSendMessageMgr = 0x1B4F500; //OK + const UINT64 kNewChatMsgByDownloadMgr = 0x1B59670; //ok + const UINT64 kSendTextMsg = 0x22C2070; //OK + const UINT64 kFreeChatMsg = 0x1B50D80; //OK + + const UINT64 kDoAddMsg = 0x230A490; //ok + const UINT64 kSendImageMsg = 0x22B7800; //ok + const UINT64 kChatMsgInstanceCounter = kNewChatMsgByDownloadMgr; //ok + const UINT64 kSendFileMsg = 0x20CB750;//ok + const UINT64 kGetAppMsgMgr = 0x1B544A0; //ok + const UINT64 kGetContactMgr = 0x1B3CCD0;//ok + const UINT64 kGetContactList = 0x219A220;//ok + + const UINT64 k_sqlite3_exec = 0x3A59B40;//ok + const UINT64 k_sqlite3_prepare = 0x3A617F0;//ok + //const UINT64 k_sqlite3_open = 0x27242a0; //1 + const UINT64 k_sqlite3_step = 0x3A1DB40;//ok + const UINT64 k_sqlite3_column_count = 0x3A1E360;//ok + const UINT64 k_sqlite3_column_name = 0x3A1ED60;//ok + const UINT64 k_sqlite3_column_type = 0x3A1EBB0;//ok + const UINT64 k_sqlite3_column_blob = 0x3A1E390;//ok + const UINT64 k_sqlite3_column_bytes = 0x3A1E480;//ok + const UINT64 k_sqlite3_finalize = 0x3A1CBF0; //ok + + const UINT64 kGPInstance = 0x58DD340; //ok + + const UINT64 kMicroMsgDB = 0xb8; //ok + const UINT64 kChatMsgDB = 0x2c8; //ok + const UINT64 kMiscDB = 0x5f0; //ok + const UINT64 kEmotionDB = 0x15f0; //ok + const UINT64 kMediaDB = 0xF48; //ok + const UINT64 kBizchatMsgDB = 0x1AC0;//ok + + const UINT64 kFunctionMsgDB = 0x1b98;//ok + const UINT64 kDBName = 0x28; + const UINT64 kStorageStart = 0x0; + const UINT64 kStorageEnd = 0x0; + + + const UINT64 kMultiDBMgr = 0x593AC38; //ok + const UINT64 kPublicMsgMgr = 0x59381D8; //ok + const UINT64 kFavoriteStorageMgr = 0x593B7D0; //ok + + + const UINT64 kChatRoomMgr = 0x1B7EEC0; //ok + const UINT64 kGetChatRoomDetailInfo = 0x2160C10; //ok + const UINT64 kNewChatRoomInfo = 0x25051D0;//ok + const UINT64 kFreeChatRoomInfo = 0x25053B0;//ok + //const UINT64 kDoAddMemberToChatRoom = 0xe63c70; + //const UINT64 kDoModChatRoomMemberNickName = 0xe6db00; + //const UINT64 kDelMemberFromChatRoom = 0xe64290; + const UINT64 kGetMemberFromChatRoom = 0x2162460;//ok + const UINT64 kNewChatRoom = 0x25025F0;//ok + const UINT64 kFreeChatRoom = 0x25027F0;//ok + + //const UINT64 kTopMsg = 0xa5e4f0; + //const UINT64 kRemoveTopMsg = 0xe787b0; + //const UINT64 kInviteMember = 0xe63650; + //const UINT64 kHookLog = 0x1304e60; + + //const UINT64 kCreateChatRoom = 0xe63340; + //const UINT64 kQuitChatRoom = 0xe6e3b0; + const UINT64 kForwardMsg = 0x22C15F0; //ok + + //const UINT64 kOnSnsTimeLineSceneFinish = 0x1a73150; + //const UINT64 kSNSGetFirstPage = 0x1a51dd0; + //const UINT64 kSNSGetNextPageScene = 0x1a77240; + //const UINT64 kSNSDataMgr = 0xeebda0; + //const UINT64 kSNSTimeLineMgr = 0x19e83a0; + const UINT64 kGetMgrByPrefixLocalId = 0x213B010; //ok + //const UINT64 kAddFavFromMsg = 0x1601520; + const UINT64 kGetChatMgr = 0x1B82BF0; //ok + //const UINT64 kGetFavoriteMgr = 0x8c69b0; + //const UINT64 kAddFavFromImage = 0x160b920; + const UINT64 kGetContact = 0x2194630; //ok + const UINT64 kNewContact = 0x25193B0; //ok + const UINT64 kFreeContact = 0x2519A60; //ok + //const UINT64 kNewMMReaderItem = 0x8c79a0; + //const UINT64 kFreeMMReaderItem = 0x8c6da0; + //const UINT64 kForwordPublicMsg = 0xddc6c0; + const UINT64 kParseAppMsgXml = 0x24B3FD0; //ok + const UINT64 kNewAppMsgInfo = 0x1BCE7B0; //ok + const UINT64 kFreeAppMsgInfo = 0x1B93D80; //ok + const UINT64 kGetPreDownLoadMgr = 0x1C0A3A0; //ok + const UINT64 kPushAttachTask = 0x1CDA9B0; //ok + //const UINT64 kGetCustomSmileyMgr = 0x915c00; + //const UINT64 kSendCustomEmotion = 0xec0a40; + //const UINT64 kNewJsApiShareAppMessage = 0x13be1a0; + //const UINT64 kInitJsConfig = 0x137bc00; + //const UINT64 kSendApplet = 0x13c0920; + //const UINT64 kSendAppletSecond = 0x13c1150; + //const UINT64 kGetAppInfoByWaid = 0x13c5790; + //const UINT64 kCopyShareAppMessageRequest = 0x13c0670; + //const UINT64 kNewWAUpdatableMsgInfo = 0x919ca0; + //const UINT64 kFreeWAUpdatableMsgInfo = 0x8fc230; + //const UINT64 kSendPatMsg = 0x195f340; + //const UINT64 kGetOCRManager = 0x999780; + //const UINT64 kDoOCRTask = 0x190b2a0; + + const UINT64 kGetLockWechatMgr = 0x1C84DA0;//ok + const UINT64 kRequestLockWechat = 0x1C39860;//ok + const UINT64 kRequestUnLockWechat = 0x1C39B00;//ok + + const UINT64 kOnLoginBtnClick = 0x202BC90;//ok + const UINT64 kOnLoginBtnParam = 0x4ECEE08;//ok + + const UINT64 kGetQRCodeLoginMgr = 0x201E420;//ok + + const UINT64 kUpdateMsg = 0x2142200;//ok + const UINT64 kGetVoiceMgr = 0x1E13320;//ok + const UINT64 kChatMsg2NetSceneSendMsg = 0x1B71FD0;//ok + const UINT64 kTranslateVoice = 0x2353E00;//ok + const UINT64 kNewWebViewPageConfig = 0x1B53AE0; //ok + const UINT64 kFreeWebViewPageConfig = 0x1B53D10; //ok + const UINT64 kGetWebViewMgr = 0x1B43950; //ok + + const UINT64 kShowWebView = 0x302ED40;//ok + const UINT64 kSetUrl = 0x26155F0; //ok + + + + //发送小程序 + const UINT64 kNewJsApiShareAppMessage = 0x26CDA30; //ok + const UINT64 kInitJsConfig = 0x268A970; //ok + const UINT64 kSendApplet = 0x26D01D0; //ok + const UINT64 kSendAppletSecond = 0x26D0A00; //ok + const UINT64 kGetAppInfoByWaid = 0x26D4F80; //ok + const UINT64 kCopyShareAppMessageRequest = 0x26CFF20;//ok + const UINT64 kNewWAUpdatableMsgInfo = 0x1BCDD10; //ok + const UINT64 kFreeWAUpdatableMsgInfo = 0x1B92AC0;//ok + const UINT64 kSendPatMsg = 0x2CA97A0;//ok PatMgr::SendPatMsg + const UINT64 kSendAppletRcxParam = 0x4F64A60; //ok + + //取群联系人昵称 + const UINT64 kChatRoomNickNameMgr = 0x1B7F100; //ok + const UINT64 kGetChatRoomNickName = 0x21625D0; //ok + + + + //卡片 + //const UINT64 kRichTextMgr = 0x1C23630; + const UINT64 kSendRichTextMsg = 0x20D5730; + const UINT64 kNewRChatMsg = 0x1B58BC0; + const UINT64 kFreeRChatMsg = 0x1B57F90; + + //HOOK偏移 + const UINT64 wcf_hook = 0x00; // Hook地址 + const UINT64 wcf_HookCall = 0x213A2A0; // Call地址 + const UINT64 wcf_msgId = 0x30; // 消息ID地址 + const UINT64 wcf_type = 0x38; // 消息类型地址 + const UINT64 wcf_isSelf = 0x3C; // 是否自己发送标志地址 + const UINT64 wcf_ts = 0x44; // TimeStamp + const UINT64 wcf_roomId = 0x48; // 群聊时,为群ID;私聊时,为微信ID + const UINT64 wcf_content = 0x88; // 消息内容地址 + const UINT64 wcf_wxid = 0x240; // 私聊时,为空;群聊时,为发送者微信ID + const UINT64 wcf_sign = 0x260; // Sign + const UINT64 wcf_thumb = 0x280; // 缩略图 + const UINT64 wcf_extra = 0x2A0; // 附加数据 + const UINT64 wcf_msgXml = 0x308; // 消息xml内容地址 + + //登录状态 + const UINT64 wcf_kLoginStatu = 0x59380B0; + const UINT64 wcf_iwxid = 0x5AB7FB8; + const UINT64 wcf_nickName = 0x5AB8098; + const UINT64 wcf_mobile = 0x5AB7FD8; + const UINT64 wcf_home = 0x5A7E190; + + +} // namespace offset