From bf4a7eea7dec740ca3464a116f43731382f6fcda Mon Sep 17 00:00:00 2001 From: huangjiechen Date: Thu, 8 Aug 2024 17:10:29 +0800 Subject: [PATCH 01/53] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dwindows=E4=B8=8B?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=8F=91=E9=80=81=E4=B8=AD=E6=96=87=E5=90=8D?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WeChatFerry/spy/rpc_server.cpp | 75 +++++++++++++++++++++++++++++----- 1 file changed, 64 insertions(+), 11 deletions(-) diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index 679d38f..1a8b842 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -33,6 +33,10 @@ #include "user_info.h" #include "util.h" +#ifdef _WIN32 +#include +#endif + #define URL_SIZE 20 #define BASE_URL "tcp://0.0.0.0" #define G_BUF_SIZE (16 * 1024 * 1024) @@ -252,12 +256,35 @@ bool func_send_img(char *path, char *receiver, uint8_t *out, size_t *len) if ((path == NULL) || (receiver == NULL)) { LOG_ERROR("Empty path or receiver."); rsp.msg.status = -1; - } else if (!fs::exists(path)) { - LOG_ERROR("Path does not exists: {}", path); - rsp.msg.status = -2; } else { - SendImageMessage(receiver, path); - rsp.msg.status = 0; + bool fileExist = false; +#ifdef _WIN32 + // 将 char* 路径转换为 wide-char 格式 + std::wstring wpath = String2Wstring(path); + + // 使用 GetFileAttributesW() 检查文件是否存在 + DWORD attributes = GetFileAttributesW(wpath.c_str()); + if (attributes == INVALID_FILE_ATTRIBUTES) { + LOG_ERROR("Path does not exist: {}", path); + rsp.msg.status = -2; + } else { + fileExist = true; + } +#else + // On Linux and other systems + std::string spath(path); + if (!fs::exists(spath)) { + LOG_ERROR("Path does not exist: {}", path); + rsp.msg.status = -2; + return false; + } else { + fileExist = true; + } +#endif + if(fileExist) { + SendImageMessage(receiver, path); + rsp.msg.status = 0; + } } pb_ostream_t stream = pb_ostream_from_buffer(out, *len); @@ -279,12 +306,38 @@ bool func_send_file(char *path, char *receiver, uint8_t *out, size_t *len) if ((path == NULL) || (receiver == NULL)) { LOG_ERROR("Empty path or receiver."); rsp.msg.status = -1; - } else if (!fs::exists(path)) { - LOG_ERROR("Path does not exists: {}", path); - rsp.msg.status = -2; - } else { - SendImageMessage(receiver, path); - rsp.msg.status = 0; + } + else { + bool fileExist = false; +#ifdef _WIN32 + // 将 char* 路径转换为 wide-char 格式 + std::wstring wpath = String2Wstring(path); + + // 使用 GetFileAttributesW() 检查文件是否存在 + DWORD attributes = GetFileAttributesW(wpath.c_str()); + if (attributes == INVALID_FILE_ATTRIBUTES) { + LOG_ERROR("Path does not exist: {}", path); + rsp.msg.status = -2; + } + else { + fileExist = true; + } +#else + // On Linux and other systems + std::string spath(path); + if (!fs::exists(spath)) { + LOG_ERROR("Path does not exist: {}", path); + rsp.msg.status = -2; + return false; + } + else { + fileExist = true; + } +#endif + if (fileExist) { + SendImageMessage(receiver, path); + rsp.msg.status = 0; + } } pb_ostream_t stream = pb_ostream_from_buffer(out, *len); From 8098a8e9d82ad1af3cca1d52f8395b491cf2904a Mon Sep 17 00:00:00 2001 From: yuzifu Date: Thu, 19 Sep 2024 19:24:23 +0800 Subject: [PATCH 02/53] Update partial offset for 3.9.11.25 --- WeChatFerry/spy/chatroom_mgmt.cpp | 8 +++---- WeChatFerry/spy/contact_mgmt.cpp | 4 ++-- WeChatFerry/spy/exec_sql.cpp | 4 ++-- WeChatFerry/spy/funcs.cpp | 22 +++++++++---------- WeChatFerry/spy/receive_msg.cpp | 4 ++-- WeChatFerry/spy/send_msg.cpp | 26 +++++++++++----------- WeChatFerry/spy/sqlite3.h | 36 +++++++++++++++---------------- 7 files changed, 52 insertions(+), 52 deletions(-) diff --git a/WeChatFerry/spy/chatroom_mgmt.cpp b/WeChatFerry/spy/chatroom_mgmt.cpp index f26e351..43a28aa 100644 --- a/WeChatFerry/spy/chatroom_mgmt.cpp +++ b/WeChatFerry/spy/chatroom_mgmt.cpp @@ -9,10 +9,10 @@ using namespace std; extern QWORD g_WeChatWinDllAddr; -#define OS_GET_CHATROOM_MGR 0x1C4E200 -#define OS_ADD_MEMBERS 0x221B8A0 -#define OS_DELETE_MEMBERS 0x221BEE0 -#define OS_INVITE_MEMBERS 0x221B280 +#define OS_GET_CHATROOM_MGR 0x1b83bd0 +#define OS_ADD_MEMBERS 0x2155100 +#define OS_DELETE_MEMBERS 0x2155740 +#define OS_INVITE_MEMBERS 0x2154ae0 typedef QWORD (*GetChatRoomMgr_t)(); typedef QWORD (*AddMemberToChatRoom_t)(QWORD, QWORD, QWORD, QWORD); diff --git a/WeChatFerry/spy/contact_mgmt.cpp b/WeChatFerry/spy/contact_mgmt.cpp index 3b7b559..f81d1c1 100644 --- a/WeChatFerry/spy/contact_mgmt.cpp +++ b/WeChatFerry/spy/contact_mgmt.cpp @@ -7,8 +7,8 @@ using namespace std; extern QWORD g_WeChatWinDllAddr; -#define OS_GET_CONTACT_MGR 0x1C0BDE0 -#define OS_GET_CONTACT_LIST 0x2265540 +#define OS_GET_CONTACT_MGR 0x1B417A0 +#define OS_GET_CONTACT_LIST 0x219ED10 #define OS_CONTACT_BIN 0x200 #define OS_CONTACT_BIN_LEN 0x208 #define OS_CONTACT_WXID 0x10 diff --git a/WeChatFerry/spy/exec_sql.cpp b/WeChatFerry/spy/exec_sql.cpp index 5de9628..6253164 100644 --- a/WeChatFerry/spy/exec_sql.cpp +++ b/WeChatFerry/spy/exec_sql.cpp @@ -5,7 +5,7 @@ #include "sqlite3.h" #include "util.h" -#define OFFSET_DB_INSTANCE 0x5A40598 +#define OFFSET_DB_INSTANCE 0x5902000 #define OFFSET_DB_MICROMSG 0xb8 #define OFFSET_DB_CHAT_MSG 0x2c8 #define OFFSET_DB_MISC 0x5f0 @@ -14,7 +14,7 @@ #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_MSG_MGR 0x595F900 extern UINT64 g_WeChatWinDllAddr; diff --git a/WeChatFerry/spy/funcs.cpp b/WeChatFerry/spy/funcs.cpp index 9ff3edc..0c3cb7e 100644 --- a/WeChatFerry/spy/funcs.cpp +++ b/WeChatFerry/spy/funcs.cpp @@ -24,17 +24,17 @@ extern QWORD g_WeChatWinDllAddr; #define HEADER_GIF1 0x47 #define HEADER_GIF2 0x49 -#define OS_LOGIN_STATUS 0x5AB86A8 -#define OS_GET_SNS_DATA_MGR 0x22A91C0 -#define OS_GET_SNS_FIRST_PAGE 0x2ED9080 -#define OS_GET_SNS_TIMELINE_MGR 0x2E6B110 -#define OS_GET_SNS_NEXT_PAGE 0x2EFEC00 -#define OS_NEW_CHAT_MSG 0x1C28800 -#define OS_FREE_CHAT_MSG 0x1C1FF10 -#define OS_GET_CHAT_MGR 0x1C51CF0 -#define OS_GET_MGR_BY_PREFIX_LOCAL_ID 0x2206280 -#define OS_GET_PRE_DOWNLOAD_MGR 0x1CD87E0 -#define OS_PUSH_ATTACH_TASK 0x1DA69C0 +#define OS_LOGIN_STATUS 0x595C9E8 +#define OS_GET_SNS_DATA_MGR 0x21E2200 +#define OS_GET_SNS_FIRST_PAGE 0x2E212d0 +#define OS_GET_SNS_TIMELINE_MGR 0x2DB3390 +#define OS_GET_SNS_NEXT_PAGE 0x2EC8970 +#define OS_NEW_CHAT_MSG 0x1B5E140 +#define OS_FREE_CHAT_MSG 0x1B55850 +#define OS_GET_CHAT_MGR 0x1B876C0 +#define OS_GET_MGR_BY_PREFIX_LOCAL_ID 0x213FB00 +#define OS_GET_PRE_DOWNLOAD_MGR 0x1C0EE70 +#define OS_PUSH_ATTACH_TASK 0x1CDF4E0 typedef QWORD (*GetSNSDataMgr_t)(); typedef QWORD (*GetSnsTimeLineMgr_t)(); diff --git a/WeChatFerry/spy/receive_msg.cpp b/WeChatFerry/spy/receive_msg.cpp index 8d385db..a9a40fa 100644 --- a/WeChatFerry/spy/receive_msg.cpp +++ b/WeChatFerry/spy/receive_msg.cpp @@ -38,8 +38,8 @@ extern QWORD g_WeChatWinDllAddr; #define OS_PYQ_MSG_XML 0x9B8 #define OS_PYQ_MSG_SENDER 0x18 #define OS_PYQ_MSG_CONTENT 0x48 -#define OS_PYQ_MSG_CALL 0x2EFAA10 -#define OS_WXLOG 0x26DA2D0 +#define OS_PYQ_MSG_CALL 0x2e42c90 +#define OS_WXLOG 0x2613d20 typedef QWORD (*RecvMsg_t)(QWORD, QWORD); typedef QWORD (*WxLog_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); diff --git a/WeChatFerry/spy/send_msg.cpp b/WeChatFerry/spy/send_msg.cpp index 70b0900..a6df0a7 100644 --- a/WeChatFerry/spy/send_msg.cpp +++ b/WeChatFerry/spy/send_msg.cpp @@ -14,20 +14,20 @@ extern string GetSelfWxid(); // Defined in spy.cpp #define SRTM_SIZE 0x3F0 -#define OS_NEW 0x1C28800 -#define OS_FREE 0x1C1FF10 -#define OS_SEND_MSG_MGR 0x1C1E690 -#define OS_SEND_TEXT 0x238DDD0 -#define OS_SEND_IMAGE 0x2383560 -#define OS_GET_APP_MSG_MGR 0x1C23630 -#define OS_SEND_FILE 0x21969E0 -#define OS_RTM_NEW 0x1C27D50 -#define OS_RTM_FREE 0x1C27120 +#define OS_NEW 0x1b5e140 +#define OS_FREE 0x1b55850 +#define OS_SEND_MSG_MGR 0x1ca4f70 +#define OS_SEND_TEXT 0x22c6b60 +#define OS_SEND_IMAGE 0x22bc2f0 +#define OS_GET_APP_MSG_MGR 0x1b557d0 +#define OS_SEND_FILE 0x20d0230 +#define OS_RTM_NEW 0x1b5d690 +#define OS_RTM_FREE 0x1b5ca60 #define OS_SEND_RICH_TEXT 0x21A09C0 -#define OS_SEND_PAT_MSG 0x2D669B0 -#define OS_FORWARD_MSG 0x238D350 -#define OS_GET_EMOTION_MGR 0x1C988D0 -#define OS_SEND_EMOTION 0x227B9E0 +#define OS_SEND_PAT_MSG 0x2caec00 +#define OS_FORWARD_MSG 0x22C60E0 +#define OS_GET_EMOTION_MGR 0x1bcef10 +#define OS_SEND_EMOTION 0x21b52d5 typedef QWORD (*New_t)(QWORD); typedef QWORD (*Free_t)(QWORD); diff --git a/WeChatFerry/spy/sqlite3.h b/WeChatFerry/spy/sqlite3.h index 09bc15d..9b1b604 100644 --- a/WeChatFerry/spy/sqlite3.h +++ b/WeChatFerry/spy/sqlite3.h @@ -138,24 +138,24 @@ #define SQLITE_NULL 5 #define SQLITE_TEXT 3 -#define SQLITE3_EXEC_OFFSET 0x3AFBCE0 -#define SQLITE3_BACKUP_INIT_OFFSET 0x1DEA900 -#define SQLITE3_PREPARE_OFFSET 0x3B03990 -#define SQLITE3_OPEN_OFFSET 0x1E598B0 -#define SQLITE3_BACKUP_STEP_OFFSET 0x1DEAD00 -#define SQLITE3_BACKUP_REMAINING_OFFSET 0x1DEB440 -#define SQLITE3_BACKUP_PAGECOUNT_OFFSET 0x1DEB450 -#define SQLITE3_BACKUP_FINISH_OFFSET 0x1DEB340 -#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_EXEC_OFFSET 0x3A5EDA0 +#define SQLITE3_BACKUP_INIT_OFFSET 0x3A18EA0 +#define SQLITE3_PREPARE_OFFSET 0x3A66A20 +#define SQLITE3_OPEN_OFFSET 0x3A9E210 +#define SQLITE3_BACKUP_STEP_OFFSET 0x3A193F0 +#define SQLITE3_BACKUP_REMAINING_OFFSET 0x1B26EB0 +#define SQLITE3_BACKUP_PAGECOUNT_OFFSET 0x1B26EE0 +#define SQLITE3_BACKUP_FINISH_OFFSET 0x3A19AF0 +#define SQLITE3_SLEEP_OFFSET 0x3A9EE70 +#define SQLITE3_ERRCODE_OFFSET 0x3A9CB10 +#define SQLITE3_CLOSE_OFFSET 0x3A9AC70 +#define SQLITE3_STEP_OFFSET 0x3A22DA0 +#define SQLITE3_COLUMN_COUNT_OFFSET 0x3A235C0 +#define SQLITE3_COLUMN_NAME_OFFSET 0x3A23FC0 +#define SQLITE3_COLUMN_TYPE_OFFSET 0x3A23E10 +#define SQLITE3_COLUMN_BLOB_OFFSET 0x3A235F0 +#define SQLITE3_COLUMN_BYTES_OFFSET 0x3A236E0 +#define SQLITE3_FINALIZE_OFFSET 0x3A21E50 typedef int (*Sqlite3_callback)(void *, int, char **, char **); From 8f9d10bf3b362c76a3fc0830de1c85cd8c868124 Mon Sep 17 00:00:00 2001 From: yuzifu Date: Fri, 20 Sep 2024 16:27:15 +0800 Subject: [PATCH 03/53] Update partial offset for 3.9.11.25 --- WeChatFerry/spy/send_msg.cpp | 2 +- WeChatFerry/spy/spy.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WeChatFerry/spy/send_msg.cpp b/WeChatFerry/spy/send_msg.cpp index a6df0a7..4946108 100644 --- a/WeChatFerry/spy/send_msg.cpp +++ b/WeChatFerry/spy/send_msg.cpp @@ -23,7 +23,7 @@ extern string GetSelfWxid(); // Defined in spy.cpp #define OS_SEND_FILE 0x20d0230 #define OS_RTM_NEW 0x1b5d690 #define OS_RTM_FREE 0x1b5ca60 -#define OS_SEND_RICH_TEXT 0x21A09C0 +#define OS_SEND_RICH_TEXT 0x20da210 #define OS_SEND_PAT_MSG 0x2caec00 #define OS_FORWARD_MSG 0x22C60E0 #define OS_GET_EMOTION_MGR 0x1bcef10 diff --git a/WeChatFerry/spy/spy.h b/WeChatFerry/spy/spy.h index f985134..525109a 100644 --- a/WeChatFerry/spy/spy.h +++ b/WeChatFerry/spy/spy.h @@ -2,7 +2,7 @@ #include "framework.h" -#define SUPPORT_VERSION L"3.9.10.27" +#define SUPPORT_VERSION L"3.9.11.25" void InitSpy(int port); void CleanupSpy(); From 3d95fc34b708eb39fbd45c85b64636a1435c5bf1 Mon Sep 17 00:00:00 2001 From: yuzifu Date: Mon, 23 Sep 2024 15:16:52 +0800 Subject: [PATCH 04/53] Update partial offset for 3.9.11.25 --- WeChatFerry/spy/receive_msg.cpp | 2 +- WeChatFerry/spy/user_info.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/WeChatFerry/spy/receive_msg.cpp b/WeChatFerry/spy/receive_msg.cpp index a9a40fa..ec538f7 100644 --- a/WeChatFerry/spy/receive_msg.cpp +++ b/WeChatFerry/spy/receive_msg.cpp @@ -31,7 +31,7 @@ extern QWORD g_WeChatWinDllAddr; #define OS_RECV_MSG_THUMB 0x280 #define OS_RECV_MSG_EXTRA 0x2A0 #define OS_RECV_MSG_XML 0x308 -#define OS_RECV_MSG_CALL 0x2205510 +#define OS_RECV_MSG_CALL 0x2147680 #define OS_PYQ_MSG_START 0x30 #define OS_PYQ_MSG_END 0x38 #define OS_PYQ_MSG_TS 0x38 diff --git a/WeChatFerry/spy/user_info.cpp b/WeChatFerry/spy/user_info.cpp index 3c7152c..41268d0 100644 --- a/WeChatFerry/spy/user_info.cpp +++ b/WeChatFerry/spy/user_info.cpp @@ -4,10 +4,10 @@ extern UINT64 g_WeChatWinDllAddr; -#define OS_USER_HOME 0x5A7E190 -#define OS_USER_WXID 0x5AB7F30 -#define OS_USER_NAME 0x5AB8098 -#define OS_USER_MOBILE 0x5AB7FD8 +#define OS_USER_HOME 0x5932770 +#define OS_USER_WXID 0x595c270 +#define OS_USER_NAME 0x595c3d8 +#define OS_USER_MOBILE 0x595c318 static char home[MAX_PATH] = { 0 }; From 19079bc468fe6681a65887a42a9215a9ec7392d1 Mon Sep 17 00:00:00 2001 From: kingmo888 <17401091+kingmo888@users.noreply.github.com> Date: Thu, 26 Sep 2024 08:46:09 +0800 Subject: [PATCH 05/53] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=A0=E6=97=A0logs?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9=E5=AF=BC=E8=87=B4=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82c++?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=A2=9E=E5=8A=A0=20/utf8=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=EF=BC=8C=E8=A7=A3=E5=86=B3=E7=BC=96=E7=A0=81=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WeChatFerry/com/log.cpp | 6 +++++- WeChatFerry/sdk/SDK.vcxproj | 1 + WeChatFerry/spy/Spy.vcxproj | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/WeChatFerry/com/log.cpp b/WeChatFerry/com/log.cpp index e06c0e9..6524dd0 100644 --- a/WeChatFerry/com/log.cpp +++ b/WeChatFerry/com/log.cpp @@ -14,7 +14,11 @@ void InitLogger(std::string path) if (logger != nullptr) { return; } - + // check and create logs folder + std::filesystem::path logDir = std::filesystem::path(path) / "logs"; + if (!std::filesystem::exists(logDir)) { + std::filesystem::create_directory(logDir); + } auto filename = std::filesystem::path(path + LOGGER_FILE_NAME).make_preferred().string(); try { logger = spdlog::rotating_logger_mt(LOGGER_NAME, filename, LOGGER_MAX_SIZE, LOGGER_MAX_FILES); diff --git a/WeChatFerry/sdk/SDK.vcxproj b/WeChatFerry/sdk/SDK.vcxproj index af47a4b..a796526 100644 --- a/WeChatFerry/sdk/SDK.vcxproj +++ b/WeChatFerry/sdk/SDK.vcxproj @@ -117,6 +117,7 @@ true MultiThreaded + /utf-8 %(AdditionalOptions) Windows diff --git a/WeChatFerry/spy/Spy.vcxproj b/WeChatFerry/spy/Spy.vcxproj index 0c44f9a..02a49a0 100644 --- a/WeChatFerry/spy/Spy.vcxproj +++ b/WeChatFerry/spy/Spy.vcxproj @@ -192,7 +192,7 @@ xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferryfalse 4251;4731;4819 - /EHa %(AdditionalOptions) + /EHa /utf-8 %(AdditionalOptions) MultiThreaded From 7efe6bce55faba94d5e179148b4b5e772c497b0e Mon Sep 17 00:00:00 2001 From: lzb Date: Thu, 26 Sep 2024 19:53:15 +0800 Subject: [PATCH 06/53] =?UTF-8?q?=E6=B2=A1=E6=B5=8B=E8=BF=87=E7=9A=84?= =?UTF-8?q?=E5=8F=91=E9=80=81xml..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WeChatFerry/spy/send_msg.cpp | 93 +++++++++++++++--------------------- 1 file changed, 39 insertions(+), 54 deletions(-) diff --git a/WeChatFerry/spy/send_msg.cpp b/WeChatFerry/spy/send_msg.cpp index 4946108..6be13c0 100644 --- a/WeChatFerry/spy/send_msg.cpp +++ b/WeChatFerry/spy/send_msg.cpp @@ -28,6 +28,8 @@ extern string GetSelfWxid(); // Defined in spy.cpp #define OS_FORWARD_MSG 0x22C60E0 #define OS_GET_EMOTION_MGR 0x1bcef10 #define OS_SEND_EMOTION 0x21b52d5 +#define OS_XML_BUGSIGN 0x24F0D70 +#define OS_SEND_XML 0x20CF360 typedef QWORD (*New_t)(QWORD); typedef QWORD (*Free_t)(QWORD); @@ -43,6 +45,10 @@ typedef QWORD (*ForwardMsg_t)(QWORD, QWORD, QWORD, QWORD); typedef QWORD (*GetEmotionMgr_t)(); typedef QWORD (*SendEmotion_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); + +typedef QWORD(*__XmlBufSignFunc)(QWORD, QWORD, QWORD); +typedef QWORD(*__SendXmlMsgFunc)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); + void SendTextMessage(string wxid, string msg, string atWxids) { QWORD success = 0; @@ -228,70 +234,49 @@ void SendEmotionMessage(string wxid, string path) SendEmotion(mgr, (QWORD)pWxPath, (QWORD)buff, (QWORD)pWxWxid, 2, (QWORD)buff, 0, (QWORD)buff); } -#if 0 + void SendXmlMessage(string receiver, string xml, string path, int type) { if (g_WeChatWinDllAddr == 0) { return; } - // 发送消息Call地址 = 微信基址 + 偏移 - DWORD sendXmlCall1 = g_WeChatWinDllAddr + g_WxCalls.sendXml.call1; - DWORD sendXmlCall2 = g_WeChatWinDllAddr + g_WxCalls.sendXml.call2; - DWORD sendXmlCall3 = g_WeChatWinDllAddr + g_WxCalls.sendXml.call3; - DWORD sendXmlCall4 = g_WeChatWinDllAddr + g_WxCalls.sendXml.call4; - DWORD sendXmlParam = g_WeChatWinDllAddr + g_WxCalls.sendXml.param; - char buffer[0xFF0] = { 0 }; + New_t funcNew = (New_t)(g_WeChatWinDllAddr + OS_NEW); + Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + OS_FREE); + + DWORD xmlBufSign = g_WeChatWinDllAddr + OS_XML_BUGSIGN; + DWORD sendXmlMsg = g_WeChatWinDllAddr + OS_SEND_XML; + __XmlBufSignFunc xmlBufSignFunc = (__XmlBufSignFunc)xmlBufSign; + __SendXmlMsgFunc sendXmlMsgFunc = (__SendXmlMsgFunc)sendXmlMsg; + + + char buff[0x500] = { 0 }; + char buff2[0x500] = { 0 }; char nullBuf[0x1C] = { 0 }; - wstring wsSender = String2Wstring(GetSelfWxid()); - wstring wsReceiver = String2Wstring(receiver); - wstring wsXml = String2Wstring(xml); + DWORD pBuf = reinterpret_cast(&buff); + DWORD pBuf2 = reinterpret_cast(&buff2); - WxString wxPath; - WxString wxNull; - WxString wxXml(wsXml); - WxString wxSender(wsSender); - WxString wxReceiver(wsReceiver); - if (!path.empty()) { - wstring wsPath = String2Wstring(path); - wxPath = WxString(wsPath); - } + funcNew(pBuf); + funcNew(pBuf2); - DWORD sendtype = type; - __asm { - pushad; - pushfd; - lea ecx, buffer; - call sendXmlCall1; - mov eax, [sendtype]; - push eax; - lea eax, nullBuf; - lea edx, wxSender; - push eax; - lea eax, wxPath; - push eax; - lea eax, wxXml; - push eax; - lea edi, wxReceiver; - push edi; - lea ecx, buffer; - call sendXmlCall2; - add esp, 0x14; - lea eax, wxNull; - push eax; - lea ecx, buffer; - call sendXmlCall3; - mov dl, 0x0; - lea ecx, buffer; - push sendXmlParam; - push sendXmlParam; - call sendXmlCall4; - add esp, 0x8; - popfd; - popad; - } + DWORD sbuf[4] = { 0,0,0, 0 }; + + DWORD sign = xmlBufSignFunc(pBuf2, reinterpret_cast(&sbuf), 0x1); + + + WxString* pReceiver = NewWxStringFromStr(receiver); + WxString* pXml = NewWxStringFromStr(xml); + WxString* pPath = NewWxStringFromStr(path); + WxString* pType = NewWxStringFromStr(type); + + wstring* pSender = NewWxStringFromStr(GetSelfWxid()); + + sendXmlMsgFunc(pBuf, pSender, pReceiver, pXml, pPath, reinterpret_cast(&nullBuf), pType, 0x4, sign, pBuf2); + + funcFree(reinterpret_cast(&buff)); + funcFree(reinterpret_cast(&buff2)); } -#endif + From d00edd8add6c6ea89abe3d5519bbfb46aeac764e Mon Sep 17 00:00:00 2001 From: wxlinzebin Date: Thu, 26 Sep 2024 23:24:35 +0800 Subject: [PATCH 07/53] =?UTF-8?q?OK=E7=BC=96=E8=AF=91=E9=80=9A=E8=BF=87?= =?UTF-8?q?=EF=BC=8C=E7=BE=A4=E4=B8=BB=E6=B5=8B=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WeChatFerry/spy/send_msg.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/WeChatFerry/spy/send_msg.cpp b/WeChatFerry/spy/send_msg.cpp index 6be13c0..2e50985 100644 --- a/WeChatFerry/spy/send_msg.cpp +++ b/WeChatFerry/spy/send_msg.cpp @@ -235,13 +235,14 @@ void SendEmotionMessage(string wxid, string path) } -void SendXmlMessage(string receiver, string xml, string path, int type) +void SendXmlMessage(string receiver, string xml, string path, QWORD type) { if (g_WeChatWinDllAddr == 0) { return; } + New_t funcNew = (New_t)(g_WeChatWinDllAddr + OS_NEW); Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + OS_FREE); @@ -270,11 +271,12 @@ void SendXmlMessage(string receiver, string xml, string path, int type) WxString* pReceiver = NewWxStringFromStr(receiver); WxString* pXml = NewWxStringFromStr(xml); WxString* pPath = NewWxStringFromStr(path); - WxString* pType = NewWxStringFromStr(type); - wstring* pSender = NewWxStringFromStr(GetSelfWxid()); + WxString* pSender = NewWxStringFromStr(GetSelfWxid()); + + //sendXmlMsgFunc(pBuf, pSender, pReceiver, pXml, pPath, reinterpret_cast(&nullBuf), pType, 0x4, sign, pBuf2); + sendXmlMsgFunc(pBuf, reinterpret_cast(pSender), reinterpret_cast(pReceiver), reinterpret_cast(pXml), reinterpret_cast(pPath), reinterpret_cast(&nullBuf), type, 0x4, sign, pBuf2); - sendXmlMsgFunc(pBuf, pSender, pReceiver, pXml, pPath, reinterpret_cast(&nullBuf), pType, 0x4, sign, pBuf2); funcFree(reinterpret_cast(&buff)); funcFree(reinterpret_cast(&buff2)); From 44afafd5d72ed6b6e12700e4c60a114801fcb360 Mon Sep 17 00:00:00 2001 From: Changhua Date: Mon, 14 Oct 2024 18:55:55 +0800 Subject: [PATCH 08/53] Add contributors --- README.MD | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.MD b/README.MD index 58c17fc..79b0de4 100644 --- a/README.MD +++ b/README.MD @@ -61,6 +61,10 @@ +## 感谢大佬们贡献代码 + +![](https://contrib.rocks/image?repo=lich0821/WeChatFerry) + ## 快速开始 ### Python [![PyPi](https://img.shields.io/pypi/v/wcferry.svg)](https://pypi.python.org/pypi/wcferry) [![Downloads](https://static.pepy.tech/badge/wcferry)](https://pypi.python.org/pypi/wcferry) [![Documentation Status](https://readthedocs.org/projects/wechatferry/badge/?version=latest)](https://wechatferry.readthedocs.io/zh/latest/?badge=latest) From f488ab0f053fa1097887606297a66fa11d7d7446 Mon Sep 17 00:00:00 2001 From: Chef <38160059+Chef5@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:51:21 +0800 Subject: [PATCH 09/53] docs: update README.MD --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 55c5708..d955978 100644 --- a/README.MD +++ b/README.MD @@ -133,7 +133,7 @@ vcpkg integrate install #### 安装 Python3 -通过微软商店或者 python.org 自行下载均可,注意配置好环境变量,确保 `python3` 在命令行下可用。 +通过微软商店或者 python.org 自行下载均可,注意安装`python`的版本不能太高,否则无法安装下方依赖,`python <= 3.10`,然后配置好环境变量,确保 `python3` 在命令行下可用。 安装依赖: ```sh From 5ab489cae32391113b4d652d2dc31060f677892b Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 17 Oct 2024 15:54:38 +0800 Subject: [PATCH 10/53] docs: update README.MD --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index d955978..11f3a2b 100644 --- a/README.MD +++ b/README.MD @@ -133,7 +133,7 @@ vcpkg integrate install #### 安装 Python3 -通过微软商店或者 python.org 自行下载均可,注意安装`python`的版本不能太高,否则无法安装下方依赖,`python <= 3.10`,然后配置好环境变量,确保 `python3` 在命令行下可用。 +通过微软商店或者 python.org 自行下载均可(注意 `python` 版本不能太高,否则需要自行编译依赖,建议使用 python 3.10),然后配置好环境变量,确保 `python` 在命令行下可用。 安装依赖: ```sh From 86c0920445eed5cf69a90cdd4b857ff09efc9f60 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 31 Oct 2024 22:53:01 +0800 Subject: [PATCH 11/53] Reformat --- WeChatFerry/spy/chatroom_mgmt.cpp | 4 +- WeChatFerry/spy/exec_sql.cpp | 10 ++--- WeChatFerry/spy/receive_msg.cpp | 4 +- WeChatFerry/spy/send_msg.cpp | 74 +++++++++++++------------------ WeChatFerry/spy/sqlite3.h | 20 ++++----- WeChatFerry/spy/user_info.cpp | 6 +-- 6 files changed, 54 insertions(+), 64 deletions(-) diff --git a/WeChatFerry/spy/chatroom_mgmt.cpp b/WeChatFerry/spy/chatroom_mgmt.cpp index 43a28aa..41d1da5 100644 --- a/WeChatFerry/spy/chatroom_mgmt.cpp +++ b/WeChatFerry/spy/chatroom_mgmt.cpp @@ -9,10 +9,10 @@ using namespace std; extern QWORD g_WeChatWinDllAddr; -#define OS_GET_CHATROOM_MGR 0x1b83bd0 +#define OS_GET_CHATROOM_MGR 0x1B83BD0 #define OS_ADD_MEMBERS 0x2155100 #define OS_DELETE_MEMBERS 0x2155740 -#define OS_INVITE_MEMBERS 0x2154ae0 +#define OS_INVITE_MEMBERS 0x2154AE0 typedef QWORD (*GetChatRoomMgr_t)(); typedef QWORD (*AddMemberToChatRoom_t)(QWORD, QWORD, QWORD, QWORD); diff --git a/WeChatFerry/spy/exec_sql.cpp b/WeChatFerry/spy/exec_sql.cpp index 6253164..c3f114f 100644 --- a/WeChatFerry/spy/exec_sql.cpp +++ b/WeChatFerry/spy/exec_sql.cpp @@ -6,13 +6,13 @@ #include "util.h" #define OFFSET_DB_INSTANCE 0x5902000 -#define OFFSET_DB_MICROMSG 0xb8 -#define OFFSET_DB_CHAT_MSG 0x2c8 -#define OFFSET_DB_MISC 0x5f0 -#define OFFSET_DB_EMOTION 0x15f0 +#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_FUNCTION_MSG 0x1B98 #define OFFSET_DB_NAME 0x28 #define OFFSET_DB_MSG_MGR 0x595F900 diff --git a/WeChatFerry/spy/receive_msg.cpp b/WeChatFerry/spy/receive_msg.cpp index ec538f7..3ba59f1 100644 --- a/WeChatFerry/spy/receive_msg.cpp +++ b/WeChatFerry/spy/receive_msg.cpp @@ -38,8 +38,8 @@ extern QWORD g_WeChatWinDllAddr; #define OS_PYQ_MSG_XML 0x9B8 #define OS_PYQ_MSG_SENDER 0x18 #define OS_PYQ_MSG_CONTENT 0x48 -#define OS_PYQ_MSG_CALL 0x2e42c90 -#define OS_WXLOG 0x2613d20 +#define OS_PYQ_MSG_CALL 0x2E42C90 +#define OS_WXLOG 0x2613D20 typedef QWORD (*RecvMsg_t)(QWORD, QWORD); typedef QWORD (*WxLog_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); diff --git a/WeChatFerry/spy/send_msg.cpp b/WeChatFerry/spy/send_msg.cpp index 2e50985..fba7c1a 100644 --- a/WeChatFerry/spy/send_msg.cpp +++ b/WeChatFerry/spy/send_msg.cpp @@ -14,20 +14,20 @@ extern string GetSelfWxid(); // Defined in spy.cpp #define SRTM_SIZE 0x3F0 -#define OS_NEW 0x1b5e140 -#define OS_FREE 0x1b55850 -#define OS_SEND_MSG_MGR 0x1ca4f70 -#define OS_SEND_TEXT 0x22c6b60 -#define OS_SEND_IMAGE 0x22bc2f0 -#define OS_GET_APP_MSG_MGR 0x1b557d0 -#define OS_SEND_FILE 0x20d0230 -#define OS_RTM_NEW 0x1b5d690 -#define OS_RTM_FREE 0x1b5ca60 -#define OS_SEND_RICH_TEXT 0x20da210 -#define OS_SEND_PAT_MSG 0x2caec00 +#define OS_NEW 0x1B5E140 +#define OS_FREE 0x1B55850 +#define OS_SEND_MSG_MGR 0x1CA4F70 +#define OS_SEND_TEXT 0x22C6B60 +#define OS_SEND_IMAGE 0x22BC2F0 +#define OS_GET_APP_MSG_MGR 0x1B557D0 +#define OS_SEND_FILE 0x20D0230 +#define OS_RTM_NEW 0x1B5D690 +#define OS_RTM_FREE 0x1B5CA60 +#define OS_SEND_RICH_TEXT 0x20DA210 +#define OS_SEND_PAT_MSG 0x2CAEC00 #define OS_FORWARD_MSG 0x22C60E0 -#define OS_GET_EMOTION_MGR 0x1bcef10 -#define OS_SEND_EMOTION 0x21b52d5 +#define OS_GET_EMOTION_MGR 0x1BCEF10 +#define OS_SEND_EMOTION 0x21B52D5 #define OS_XML_BUGSIGN 0x24F0D70 #define OS_SEND_XML 0x20CF360 @@ -45,9 +45,8 @@ typedef QWORD (*ForwardMsg_t)(QWORD, QWORD, QWORD, QWORD); typedef QWORD (*GetEmotionMgr_t)(); typedef QWORD (*SendEmotion_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); - -typedef QWORD(*__XmlBufSignFunc)(QWORD, QWORD, QWORD); -typedef QWORD(*__SendXmlMsgFunc)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); +typedef QWORD (*__XmlBufSignFunc)(QWORD, QWORD, QWORD); +typedef QWORD (*__SendXmlMsgFunc)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); void SendTextMessage(string wxid, string msg, string atWxids) { @@ -234,51 +233,42 @@ void SendEmotionMessage(string wxid, string path) SendEmotion(mgr, (QWORD)pWxPath, (QWORD)buff, (QWORD)pWxWxid, 2, (QWORD)buff, 0, (QWORD)buff); } - void SendXmlMessage(string receiver, string xml, string path, QWORD type) { if (g_WeChatWinDllAddr == 0) { return; } - - - New_t funcNew = (New_t)(g_WeChatWinDllAddr + OS_NEW); + New_t funcNew = (New_t)(g_WeChatWinDllAddr + OS_NEW); Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + OS_FREE); - DWORD xmlBufSign = g_WeChatWinDllAddr + OS_XML_BUGSIGN; - DWORD sendXmlMsg = g_WeChatWinDllAddr + OS_SEND_XML; + DWORD xmlBufSign = g_WeChatWinDllAddr + OS_XML_BUGSIGN; + DWORD sendXmlMsg = g_WeChatWinDllAddr + OS_SEND_XML; __XmlBufSignFunc xmlBufSignFunc = (__XmlBufSignFunc)xmlBufSign; __SendXmlMsgFunc sendXmlMsgFunc = (__SendXmlMsgFunc)sendXmlMsg; - - char buff[0x500] = { 0 }; - char buff2[0x500] = { 0 }; + char buff[0x500] = { 0 }; + char buff2[0x500] = { 0 }; char nullBuf[0x1C] = { 0 }; - DWORD pBuf = reinterpret_cast(&buff); - DWORD pBuf2 = reinterpret_cast(&buff2); - + DWORD pBuf = (DWORD)(&buff); + DWORD pBuf2 = (DWORD)(&buff2); funcNew(pBuf); funcNew(pBuf2); - DWORD sbuf[4] = { 0,0,0, 0 }; + DWORD sbuf[4] = { 0, 0, 0, 0 }; - DWORD sign = xmlBufSignFunc(pBuf2, reinterpret_cast(&sbuf), 0x1); + DWORD sign = xmlBufSignFunc(pBuf2, (DWORD)(&sbuf), 0x1); + WxString *pReceiver = NewWxStringFromStr(receiver); + WxString *pXml = NewWxStringFromStr(xml); + WxString *pPath = NewWxStringFromStr(path); + WxString *pSender = NewWxStringFromStr(GetSelfWxid()); - WxString* pReceiver = NewWxStringFromStr(receiver); - WxString* pXml = NewWxStringFromStr(xml); - WxString* pPath = NewWxStringFromStr(path); + sendXmlMsgFunc(pBuf, (QWORD)pSender, (QWORD)pReceiver, (QWORD)pXml, (QWORD)pPath, (QWORD)(&nullBuf), type, 0x4, + sign, pBuf2); - WxString* pSender = NewWxStringFromStr(GetSelfWxid()); - - //sendXmlMsgFunc(pBuf, pSender, pReceiver, pXml, pPath, reinterpret_cast(&nullBuf), pType, 0x4, sign, pBuf2); - sendXmlMsgFunc(pBuf, reinterpret_cast(pSender), reinterpret_cast(pReceiver), reinterpret_cast(pXml), reinterpret_cast(pPath), reinterpret_cast(&nullBuf), type, 0x4, sign, pBuf2); - - - funcFree(reinterpret_cast(&buff)); - funcFree(reinterpret_cast(&buff2)); + funcFree((QWORD)&buff)); + funcFree((QWORD)&buff2)); } - diff --git a/WeChatFerry/spy/sqlite3.h b/WeChatFerry/spy/sqlite3.h index 9b1b604..b50ec2a 100644 --- a/WeChatFerry/spy/sqlite3.h +++ b/WeChatFerry/spy/sqlite3.h @@ -159,22 +159,22 @@ typedef int (*Sqlite3_callback)(void *, int, char **, char **); -typedef int(__cdecl *Sqlite3_exec)(QWORD, /* 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 int(__cdecl *Sqlite3_exec)(QWORD, /* 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 */ const char *zDestName, /* Destination database name */ QWORD *pSource, /* Source database handle */ const char *zSourceName /* Source database name */ ); -typedef int(__cdecl *Sqlite3_prepare)(QWORD db, /* Database handle */ - const char *zSql, /* SQL statement, UTF-8 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - QWORD **ppStmt, /* OUT: Statement handle */ - const char **pzTail /* OUT: Pointer to unused portion of zSql */ +typedef int(__cdecl *Sqlite3_prepare)(QWORD db, /* Database handle */ + const char *zSql, /* SQL statement, UTF-8 encoded */ + int nByte, /* Maximum length of zSql in bytes. */ + QWORD **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); diff --git a/WeChatFerry/spy/user_info.cpp b/WeChatFerry/spy/user_info.cpp index 41268d0..f7f2b53 100644 --- a/WeChatFerry/spy/user_info.cpp +++ b/WeChatFerry/spy/user_info.cpp @@ -5,9 +5,9 @@ extern UINT64 g_WeChatWinDllAddr; #define OS_USER_HOME 0x5932770 -#define OS_USER_WXID 0x595c270 -#define OS_USER_NAME 0x595c3d8 -#define OS_USER_MOBILE 0x595c318 +#define OS_USER_WXID 0x595C270 +#define OS_USER_NAME 0x595C3D8 +#define OS_USER_MOBILE 0x595C318 static char home[MAX_PATH] = { 0 }; From c66b1f7eb2b99d080e5647fee92c0bbdf10d7f41 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 31 Oct 2024 22:59:27 +0800 Subject: [PATCH 12/53] Fix SendXmlMessage --- WeChatFerry/rpc/proto/wcf.proto | 2 +- WeChatFerry/spy/rpc_server.cpp | 4 +--- WeChatFerry/spy/send_msg.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/WeChatFerry/rpc/proto/wcf.proto b/WeChatFerry/rpc/proto/wcf.proto index 270e5e6..f859336 100644 --- a/WeChatFerry/rpc/proto/wcf.proto +++ b/WeChatFerry/rpc/proto/wcf.proto @@ -117,7 +117,7 @@ message XmlMsg string receiver = 1; // 消息接收人 string content = 2; // xml 内容 string path = 3; // 图片路径 - int32 type = 4; // 消息类型 + uint64 type = 4; // 消息类型 } message MsgTypes { map types = 1; } diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index 679d38f..bb72d42 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -321,7 +321,6 @@ bool func_send_emotion(char *path, char *receiver, uint8_t *out, size_t *len) return true; } -#if 0 bool func_send_xml(XmlMsg xml, uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -335,7 +334,7 @@ bool func_send_xml(XmlMsg xml, uint8_t *out, size_t *len) string receiver(xml.receiver); string content(xml.content); string path(xml.path ? xml.path : ""); - uint32_t type = (uint32_t)xml.type; + uint64_t type = (uint64_t)xml.type; SendXmlMessage(receiver, content, path, type); rsp.msg.status = 0; } @@ -349,7 +348,6 @@ bool func_send_xml(XmlMsg xml, uint8_t *out, size_t *len) return true; } -#endif bool func_send_rich_txt(RichText rt, uint8_t *out, size_t *len) { diff --git a/WeChatFerry/spy/send_msg.h b/WeChatFerry/spy/send_msg.h index 1abd0fd..0218a5d 100644 --- a/WeChatFerry/spy/send_msg.h +++ b/WeChatFerry/spy/send_msg.h @@ -17,7 +17,7 @@ typedef struct { void SendTextMessage(string wxid, string msg, string atWxids); void SendImageMessage(string wxid, string path); void SendFileMessage(string wxid, string path); -void SendXmlMessage(string receiver, string xml, string path, int type); +void SendXmlMessage(string receiver, string xml, string path, uint64_t type); void SendEmotionMessage(string wxid, string path); int SendRichTextMessage(RichText_t &rt); int SendPatMessage(string roomid, string wxid); From fe890aefebaae12490c364b437a6cd4222d42463 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 31 Oct 2024 23:07:22 +0800 Subject: [PATCH 13/53] Bump to v39.3.0 --- README.MD | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.MD b/README.MD index 79b0de4..a6a5ebc 100644 --- a/README.MD +++ b/README.MD @@ -38,6 +38,7 @@ * 发送图片消息 * 发送文件消息 * 发送卡片消息 +* 发送 XML 消息 * 发送 GIF 消息 * 拍一拍群友 * 转发消息 @@ -100,6 +101,7 @@ pip install --upgrade wcferry ## 一起开发 > 🚫 非开发用户不需要往下看。 +> > **开发用户**:可以根据文档和错误提示,自行解决编译错误的人员。 ### 安装开发环境 @@ -205,9 +207,9 @@ WeChatFerry ## 版本更新 -### v39.2.4 +### v39.3.0 -* 修复 wxid 问题 +* 适配 `3.9.11.24`
点击查看更多 @@ -219,6 +221,10 @@ WeChatFerry * `y` 是 `WeChatFerry` 的版本,从 0 开始 * `z` 是各客户端的版本,从 0 开始 +### v39.2.4 + +* 修复 wxid 问题 + ### v39.2.3 * 实现发送 GIF From af34a151d5e70ecb036cd32eddf7f50ea1534bff Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 31 Oct 2024 23:16:08 +0800 Subject: [PATCH 14/53] Bump to v39.3.0 --- README.MD | 2 +- WeChatFerry/spy/spy.aps | Bin 2612 -> 2612 bytes WeChatFerry/spy/spy.rc | 8 ++++---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.MD b/README.MD index a6a5ebc..a5ec8e4 100644 --- a/README.MD +++ b/README.MD @@ -209,7 +209,7 @@ WeChatFerry ### v39.3.0 -* 适配 `3.9.11.24` +* 适配 `3.9.11.25`
点击查看更多 diff --git a/WeChatFerry/spy/spy.aps b/WeChatFerry/spy/spy.aps index 1c00a30d35eec932acc8280af45bc1cd0d94584b..9a2d14615a1ade6b64b35523c2ca58ff7c926d61 100644 GIT binary patch delta 50 zcmdlYvPEP88$UCHIs*uBGB7hpGH_4kXZy}-%%I0$u$h}(nUUQP$TVUw-E7M7pAi7f C?g)DT delta 50 zcmdlYvPEP88$T0+Is*d(3j-$uGlMh(*JOUS@2o})dJHC;x!IK&*$se9BL?%$rX2qn E0nV)mg8%>k diff --git a/WeChatFerry/spy/spy.rc b/WeChatFerry/spy/spy.rc index 381b4eb..1c1c4e9 100644 --- a/WeChatFerry/spy/spy.rc +++ b/WeChatFerry/spy/spy.rc @@ -51,8 +51,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 39,2,4,0 - PRODUCTVERSION 3,9,10,27 + FILEVERSION 39,3,0,0 + PRODUCTVERSION 3,9,11,25 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -69,12 +69,12 @@ BEGIN BEGIN VALUE "CompanyName", "WeChatFerry" VALUE "FileDescription", "WeChatFerry" - VALUE "FileVersion", "39.2.4.0" + VALUE "FileVersion", "39.3.0.0" VALUE "InternalName", "spy.dll" VALUE "LegalCopyright", "Copyright (C) 2023" VALUE "OriginalFilename", "spy.dll" VALUE "ProductName", "WeChatFerry" - VALUE "ProductVersion", "3.9.10.27" + VALUE "ProductVersion", "3.9.11.25" END END BLOCK "VarFileInfo" From b05756fec3807b3670505f8a01908e591ec21e23 Mon Sep 17 00:00:00 2001 From: Changhua Date: Fri, 1 Nov 2024 00:29:11 +0800 Subject: [PATCH 15/53] Fix sendXML --- WeChatFerry/spy/send_msg.cpp | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/WeChatFerry/spy/send_msg.cpp b/WeChatFerry/spy/send_msg.cpp index fba7c1a..ee0bbf9 100644 --- a/WeChatFerry/spy/send_msg.cpp +++ b/WeChatFerry/spy/send_msg.cpp @@ -1,4 +1,5 @@ -#include "framework.h" + +#include "framework.h" #include #include @@ -28,7 +29,7 @@ extern string GetSelfWxid(); // Defined in spy.cpp #define OS_FORWARD_MSG 0x22C60E0 #define OS_GET_EMOTION_MGR 0x1BCEF10 #define OS_SEND_EMOTION 0x21B52D5 -#define OS_XML_BUGSIGN 0x24F0D70 +#define OS_XML_BUFSIGN 0x24F0D70 #define OS_SEND_XML 0x20CF360 typedef QWORD (*New_t)(QWORD); @@ -45,8 +46,8 @@ typedef QWORD (*ForwardMsg_t)(QWORD, QWORD, QWORD, QWORD); typedef QWORD (*GetEmotionMgr_t)(); typedef QWORD (*SendEmotion_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); -typedef QWORD (*__XmlBufSignFunc)(QWORD, QWORD, QWORD); -typedef QWORD (*__SendXmlMsgFunc)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); +typedef QWORD (*XmlBufSign_t)(QWORD, QWORD, QWORD); +typedef QWORD (*SendXmlMsg_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); void SendTextMessage(string wxid, string msg, string atWxids) { @@ -242,33 +243,31 @@ void SendXmlMessage(string receiver, string xml, string path, QWORD type) New_t funcNew = (New_t)(g_WeChatWinDllAddr + OS_NEW); Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + OS_FREE); - DWORD xmlBufSign = g_WeChatWinDllAddr + OS_XML_BUGSIGN; - DWORD sendXmlMsg = g_WeChatWinDllAddr + OS_SEND_XML; - __XmlBufSignFunc xmlBufSignFunc = (__XmlBufSignFunc)xmlBufSign; - __SendXmlMsgFunc sendXmlMsgFunc = (__SendXmlMsgFunc)sendXmlMsg; + XmlBufSign_t xmlBufSign = (XmlBufSign_t)(g_WeChatWinDllAddr + OS_XML_BUFSIGN); + SendXmlMsg_t sendXmlMsg = (SendXmlMsg_t)(g_WeChatWinDllAddr + OS_SEND_XML); char buff[0x500] = { 0 }; char buff2[0x500] = { 0 }; char nullBuf[0x1C] = { 0 }; - DWORD pBuf = (DWORD)(&buff); - DWORD pBuf2 = (DWORD)(&buff2); + QWORD pBuf = (QWORD)(&buff); + QWORD pBuf2 = (QWORD)(&buff2); funcNew(pBuf); funcNew(pBuf2); - DWORD sbuf[4] = { 0, 0, 0, 0 }; + QWORD sbuf[4] = { 0, 0, 0, 0 }; - DWORD sign = xmlBufSignFunc(pBuf2, (DWORD)(&sbuf), 0x1); + QWORD sign = xmlBufSign(pBuf2, (QWORD)(&sbuf), 0x1); WxString *pReceiver = NewWxStringFromStr(receiver); WxString *pXml = NewWxStringFromStr(xml); WxString *pPath = NewWxStringFromStr(path); WxString *pSender = NewWxStringFromStr(GetSelfWxid()); - sendXmlMsgFunc(pBuf, (QWORD)pSender, (QWORD)pReceiver, (QWORD)pXml, (QWORD)pPath, (QWORD)(&nullBuf), type, 0x4, - sign, pBuf2); + sendXmlMsg(pBuf, (QWORD)pSender, (QWORD)pReceiver, (QWORD)pXml, (QWORD)pPath, (QWORD)(&nullBuf), type, 0x4, sign, + pBuf2); - funcFree((QWORD)&buff)); - funcFree((QWORD)&buff2)); + funcFree((QWORD)&buff); + funcFree((QWORD)&buff2); } From d21ecb370638239c7e35c3dd8148379856443e41 Mon Sep 17 00:00:00 2001 From: Changhua Date: Fri, 1 Nov 2024 00:29:46 +0800 Subject: [PATCH 16/53] Add build options --- WeChatFerry/sdk/SDK.vcxproj | 2 ++ WeChatFerry/spy/Spy.vcxproj | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WeChatFerry/sdk/SDK.vcxproj b/WeChatFerry/sdk/SDK.vcxproj index a796526..5c5c18a 100644 --- a/WeChatFerry/sdk/SDK.vcxproj +++ b/WeChatFerry/sdk/SDK.vcxproj @@ -77,6 +77,7 @@ true Use pch.h + /utf-8 %(AdditionalOptions) Windows @@ -93,6 +94,7 @@ true Use pch.h + /utf-8 %(AdditionalOptions) Windows diff --git a/WeChatFerry/spy/Spy.vcxproj b/WeChatFerry/spy/Spy.vcxproj index 02a49a0..14d2b71 100644 --- a/WeChatFerry/spy/Spy.vcxproj +++ b/WeChatFerry/spy/Spy.vcxproj @@ -96,7 +96,7 @@ true 4251;4731;4819 - /EHa %(AdditionalOptions) + /EHa /utf-8 %(AdditionalOptions) Windows @@ -145,7 +145,7 @@ xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferry 4251;4731;4819 - /EHa %(AdditionalOptions) + /EHa /utf-8 %(AdditionalOptions) Windows From f2cad6ece0841e14d1ddd1fa377b34e4f2cf0912 Mon Sep 17 00:00:00 2001 From: Changhua Date: Fri, 1 Nov 2024 00:53:08 +0800 Subject: [PATCH 17/53] Add vcpkg.json --- vcpkg.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 vcpkg.json diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..b387a7b --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "WCF", + "version-string": "1.0.0", + "dependencies": [ + "protobuf[zlib]", + "spdlog", + "nng", + "magic-enum", + "minhook" + ] +} \ No newline at end of file From 06d360525ac08ed5c101e7aa0267913640221d68 Mon Sep 17 00:00:00 2001 From: Changhua Date: Fri, 1 Nov 2024 00:54:04 +0800 Subject: [PATCH 18/53] Cache vcpkg --- .github/workflows/Build-WeChatFerry.yml | 28 +++++++++++++++---------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index e238613..79a93f3 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -40,28 +40,35 @@ jobs: pip install grpcio-tools==1.48.2 - name: 设置缓存 - id: cache-dependencies + id: cache-vcpkg uses: actions/cache@v4 with: path: | C:/Tools/vcpkg - key: ${{ runner.os }}-dependencies-${{ hashFiles('**/WeChatFerry/spy/spy.rc') }} + key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json') }} restore-keys: | - ${{ runner.os }}-dependencies- + ${{ runner.os }}-vcpkg- - - name: 安装 vcpkg 和依赖项 + - name: 安装 vcpkg 并初始化依赖项 run: | + # 设置 vcpkg 目录 + mkdir -p C:/Tools cd C:/Tools + + # 克隆并引导 vcpkg git clone https://github.com/microsoft/vcpkg .\vcpkg\bootstrap-vcpkg.bat - .\vcpkg\vcpkg install protobuf[zlib]:x64-windows-static - .\vcpkg\vcpkg install spdlog:x64-windows-static - .\vcpkg\vcpkg install nng:x64-windows-static - .\vcpkg\vcpkg install magic-enum:x64-windows-static - .\vcpkg\vcpkg install minhook:x64-windows-static - .\vcpkg\vcpkg integrate install + + # 设置 VCPKG_ROOT 环境变量 echo "VCPKG_ROOT=C:/Tools/vcpkg" >> $GITHUB_ENV + # 将 vcpkg 与 Visual Studio 集成 + .\vcpkg\vcpkg integrate install + + # 返回到项目目录并安装依赖 + cd ${{ github.workspace }} + C:/Tools/vcpkg/vcpkg install --triplet x64-windows + - name: 解析并构建配置 run: | $configurations = "Release,Debug".Split(',') @@ -75,7 +82,6 @@ jobs: run: | New-Item -ItemType Directory -Force -Path "WeChatFerry/tmp" Compress-Archive -Path "WeChatFerry/Out/sdk.dll", "WeChatFerry/Out/spy.dll", "WeChatFerry/Out/spy_debug.dll" -DestinationPath "WeChatFerry/tmp/v${{ env.version }}.zip" - # Compress-Archive -Path "WeChatFerry/Out/*" -DestinationPath "WeChatFerry/tmp/v${{ env.version }}-debug.zip" Invoke-WebRequest -Uri "https://github.com/tom-snow/wechat-windows-versions/releases/download/v${{ env.wechat_version }}/WeChatSetup-${{ env.wechat_version }}.exe" -OutFile "WeChatFerry/tmp/WeChatSetup-${{ env.wechat_version }}.exe" shell: pwsh From bad06ac7f04513097eb4424e7d0b14c52d38469a Mon Sep 17 00:00:00 2001 From: yuzifu Date: Fri, 1 Nov 2024 16:13:06 +0800 Subject: [PATCH 19/53] Fix SendMsgMgr offset --- WeChatFerry/spy/send_msg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeChatFerry/spy/send_msg.cpp b/WeChatFerry/spy/send_msg.cpp index fba7c1a..a5dcf4e 100644 --- a/WeChatFerry/spy/send_msg.cpp +++ b/WeChatFerry/spy/send_msg.cpp @@ -16,7 +16,7 @@ extern string GetSelfWxid(); // Defined in spy.cpp #define OS_NEW 0x1B5E140 #define OS_FREE 0x1B55850 -#define OS_SEND_MSG_MGR 0x1CA4F70 +#define OS_SEND_MSG_MGR 0x1B53FD0 #define OS_SEND_TEXT 0x22C6B60 #define OS_SEND_IMAGE 0x22BC2F0 #define OS_GET_APP_MSG_MGR 0x1B557D0 From 91bd5cd817677f24e14a66cb0d9167197e9c08d2 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sat, 2 Nov 2024 12:58:01 +0800 Subject: [PATCH 20/53] Fix mkdir --- .github/workflows/Build-WeChatFerry.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index 79a93f3..ff42865 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -52,11 +52,13 @@ jobs: - name: 安装 vcpkg 并初始化依赖项 run: | # 设置 vcpkg 目录 - mkdir -p C:/Tools + if (!(Test-Path -Path 'C:/Tools')) { + New-Item -ItemType Directory -Force -Path 'C:/Tools' + } cd C:/Tools # 克隆并引导 vcpkg - git clone https://github.com/microsoft/vcpkg + git clone https://github.com/microsoft/vcpkg || echo "vcpkg already cloned" .\vcpkg\bootstrap-vcpkg.bat # 设置 VCPKG_ROOT 环境变量 From 6214fa8b68af6edc6ef93e4c94a79b0fe593eaec Mon Sep 17 00:00:00 2001 From: Changhua Date: Sat, 2 Nov 2024 13:06:03 +0800 Subject: [PATCH 21/53] Update vcpkg.json --- vcpkg.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vcpkg.json b/vcpkg.json index b387a7b..d831f6d 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,11 +1,14 @@ { - "name": "WCF", + "name": "wcf", "version-string": "1.0.0", "dependencies": [ - "protobuf[zlib]", + { + "name": "protobuf", + "features": [ "zlib" ] + }, "spdlog", "nng", "magic-enum", "minhook" ] -} \ No newline at end of file +} From 14cf7f2793b0d86860989fdc7e2e60a2d376640c Mon Sep 17 00:00:00 2001 From: Changhua Date: Sat, 2 Nov 2024 13:47:23 +0800 Subject: [PATCH 22/53] Add Env, minimal verbosity --- .github/workflows/Build-WeChatFerry.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index ff42865..2c28c46 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -58,25 +58,28 @@ jobs: cd C:/Tools # 克隆并引导 vcpkg - git clone https://github.com/microsoft/vcpkg || echo "vcpkg already cloned" + if (!(Test-Path -Path 'C:/Tools/vcpkg')) { + git clone https://github.com/microsoft/vcpkg + } .\vcpkg\bootstrap-vcpkg.bat # 设置 VCPKG_ROOT 环境变量 + setx VCPKG_ROOT "C:/Tools/vcpkg" /M echo "VCPKG_ROOT=C:/Tools/vcpkg" >> $GITHUB_ENV - # 将 vcpkg 与 Visual Studio 集成 - .\vcpkg\vcpkg integrate install - # 返回到项目目录并安装依赖 cd ${{ github.workspace }} - C:/Tools/vcpkg/vcpkg install --triplet x64-windows + vcpkg install --triplet x64-windows + + # 将 vcpkg 与 Visual Studio 集成 + vcpkg integrate install - name: 解析并构建配置 run: | $configurations = "Release,Debug".Split(',') foreach ($config in $configurations) { Write-Host "Building configuration: $config" - msbuild WeChatFerry/WeChatFerry.sln /p:Configuration=$config /p:Platform="x64" /verbosity:detailed + msbuild WeChatFerry/WeChatFerry.sln /p:Configuration=$config /p:Platform="x64" /verbosity:minimal } shell: pwsh From 8f46f56cb68d662233f0cc494150003519899340 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sat, 2 Nov 2024 13:48:02 +0800 Subject: [PATCH 23/53] Bump to v39.3.1 --- WeChatFerry/spy/spy.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WeChatFerry/spy/spy.rc b/WeChatFerry/spy/spy.rc index 1c1c4e9..502ddf3 100644 --- a/WeChatFerry/spy/spy.rc +++ b/WeChatFerry/spy/spy.rc @@ -51,7 +51,7 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 39,3,0,0 + FILEVERSION 39,3,1,0 PRODUCTVERSION 3,9,11,25 FILEFLAGSMASK 0x3fL #ifdef _DEBUG @@ -69,7 +69,7 @@ BEGIN BEGIN VALUE "CompanyName", "WeChatFerry" VALUE "FileDescription", "WeChatFerry" - VALUE "FileVersion", "39.3.0.0" + VALUE "FileVersion", "39.3.1.0" VALUE "InternalName", "spy.dll" VALUE "LegalCopyright", "Copyright (C) 2023" VALUE "OriginalFilename", "spy.dll" From 434b0d39a0736fe7e50aaa1154932d43f1c9e4f5 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sat, 2 Nov 2024 14:22:44 +0800 Subject: [PATCH 24/53] Fix build script --- .github/workflows/Build-WeChatFerry.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index 2c28c46..146f695 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -64,22 +64,22 @@ jobs: .\vcpkg\bootstrap-vcpkg.bat # 设置 VCPKG_ROOT 环境变量 - setx VCPKG_ROOT "C:/Tools/vcpkg" /M echo "VCPKG_ROOT=C:/Tools/vcpkg" >> $GITHUB_ENV + $env:VCPKG_ROOT = 'C:/Tools/vcpkg' + + # 将 vcpkg 与 Visual Studio 集成 + C:/Tools/vcpkg/vcpkg integrate install # 返回到项目目录并安装依赖 cd ${{ github.workspace }} - vcpkg install --triplet x64-windows - - # 将 vcpkg 与 Visual Studio 集成 - vcpkg integrate install + C:/Tools/vcpkg/vcpkg install --triplet x64-windows-static - name: 解析并构建配置 run: | $configurations = "Release,Debug".Split(',') foreach ($config in $configurations) { Write-Host "Building configuration: $config" - msbuild WeChatFerry/WeChatFerry.sln /p:Configuration=$config /p:Platform="x64" /verbosity:minimal + msbuild WeChatFerry/WeChatFerry.sln /p:Configuration=$config /p:Platform="x64" /p:VcpkgTriplet="x64-windows-static" /p:VcpkgEnableManifest=true /verbosity:minimal } shell: pwsh From b61a4b2d93cbe1bfe3abf6213bfdb66cb9749419 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 10:25:13 +0800 Subject: [PATCH 25/53] Ingore vcpkg_installed --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 15901be..b9a6849 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ Out/ build/ logs/ java/wcferry/bin/ +vcpkg_installed/ *_pb2_grpc.py __pycache__ From 75b14376276cae0357d119c928249328fbe37e05 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 10:26:24 +0800 Subject: [PATCH 26/53] Enable vcpkg manifests --- WeChatFerry/sdk/SDK.vcxproj | 3 +++ WeChatFerry/spy/Spy.vcxproj | 3 +++ vcpkg.json => WeChatFerry/vcpkg.json | 0 3 files changed, 6 insertions(+) rename vcpkg.json => WeChatFerry/vcpkg.json (100%) diff --git a/WeChatFerry/sdk/SDK.vcxproj b/WeChatFerry/sdk/SDK.vcxproj index 5c5c18a..f71d944 100644 --- a/WeChatFerry/sdk/SDK.vcxproj +++ b/WeChatFerry/sdk/SDK.vcxproj @@ -69,6 +69,9 @@ true x64-windows-static + + true + Level3 diff --git a/WeChatFerry/spy/Spy.vcxproj b/WeChatFerry/spy/Spy.vcxproj index 14d2b71..bf90736 100644 --- a/WeChatFerry/spy/Spy.vcxproj +++ b/WeChatFerry/spy/Spy.vcxproj @@ -79,6 +79,9 @@ true + + true + Level3 diff --git a/vcpkg.json b/WeChatFerry/vcpkg.json similarity index 100% rename from vcpkg.json rename to WeChatFerry/vcpkg.json From a15a42503ad2d66c443e0d55fc6684b9eba07e1c Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 10:27:39 +0800 Subject: [PATCH 27/53] Add RoomData --- WeChatFerry/rpc/proto/wcf.proto | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/WeChatFerry/rpc/proto/wcf.proto b/WeChatFerry/rpc/proto/wcf.proto index f859336..1660c2f 100644 --- a/WeChatFerry/rpc/proto/wcf.proto +++ b/WeChatFerry/rpc/proto/wcf.proto @@ -234,3 +234,21 @@ message ForwardMsg uint64 id = 1 [ jstype = JS_STRING ]; // 待转发消息 ID string receiver = 2; // 转发接收目标,群为 roomId,个人为 wxid } + +message RoomData +{ + message RoomMember + { + string wxid = 1; + string name = 2; + int32 state = 3; + } + + repeated RoomMember members = 1; + + int32 field_2 = 2; + int32 room_capacity = 3; + int32 field_4 = 4; + int32 field_5 = 5; + string wxid = 6; // 不知道什么含义 +} From f4b7ec9a8dafddff7db47cdeba1c20e5eea893c2 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 11:40:40 +0800 Subject: [PATCH 28/53] Update vcpkg instruction --- README.MD | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/README.MD b/README.MD index 001fbe3..ac0851e 100644 --- a/README.MD +++ b/README.MD @@ -120,20 +120,16 @@ git clone https://github.com/microsoft/vcpkg ``` * 添加全局配置: -环境变量增加 `vcpkg` 所在路径(本项目为:`C:\Tools\vcpkg`)。 +环境变量增加 `vcpkg` 所在路径(本文为:`C:\Tools\vcpkg`): +```sh +setx VCPKG_ROOT "C:/Tools/vcpkg" /M +``` #### 安装相关组件 -```sh -vcpkg install protobuf[zlib]:x64-windows-static -vcpkg install spdlog:x64-windows-static -vcpkg install nng:x64-windows-static -vcpkg install magic-enum:x64-windows-static -vcpkg install minhook:x64-windows-static -vcpkg integrate install -``` +编译时会自动安装。但如果需要使用 `protoc.exe`,则需要配置一下 `protoc.exe` 环境变量:`\x64-windows-static\x64-windows-static\tools\protobuf`。 -安装完毕后,需要配置 protoc 的环境变量,并确保在命令行下可用,protoc 的路径在 `\installed\x86-windows-static\tools\protobuf` +(本文为:`C:\Projs\WeChatFerry\WeChatFerry\vcpkg_installed\x64-windows-static\x64-windows-static\tools\protobuf`) #### 安装 VS2019 From 24703ccc9b89ed4e4714911cdf5b304cea896329 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 13:28:24 +0800 Subject: [PATCH 29/53] Fix #266 --- WeChatFerry/spy/receive_msg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeChatFerry/spy/receive_msg.cpp b/WeChatFerry/spy/receive_msg.cpp index 3ba59f1..997102a 100644 --- a/WeChatFerry/spy/receive_msg.cpp +++ b/WeChatFerry/spy/receive_msg.cpp @@ -31,7 +31,7 @@ extern QWORD g_WeChatWinDllAddr; #define OS_RECV_MSG_THUMB 0x280 #define OS_RECV_MSG_EXTRA 0x2A0 #define OS_RECV_MSG_XML 0x308 -#define OS_RECV_MSG_CALL 0x2147680 +#define OS_RECV_MSG_CALL 0x213ED90 #define OS_PYQ_MSG_START 0x30 #define OS_PYQ_MSG_END 0x38 #define OS_PYQ_MSG_TS 0x38 From 10f2fb741cb2918ee93649c7b30e9aa73f5f4541 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 13:49:32 +0800 Subject: [PATCH 30/53] Fix build options --- .github/workflows/Build-WeChatFerry.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index 146f695..9502122 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -45,7 +45,8 @@ jobs: with: path: | C:/Tools/vcpkg - key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json') }} + ${{ github.workspace }}/WeChatFerry/vcpkg_installed + key: ${{ runner.os }}-vcpkg-${{ hashFiles('WeChatFerry/vcpkg.json') }} restore-keys: | ${{ runner.os }}-vcpkg- @@ -71,7 +72,7 @@ jobs: C:/Tools/vcpkg/vcpkg integrate install # 返回到项目目录并安装依赖 - cd ${{ github.workspace }} + cd ${{ github.workspace }}/WeChatFerry C:/Tools/vcpkg/vcpkg install --triplet x64-windows-static - name: 解析并构建配置 From d9f282317a4fb366928f1686913e40047767b051 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 13:56:42 +0800 Subject: [PATCH 31/53] Bump to v39.3.2 --- README.MD | 8 ++++++-- WeChatFerry/spy/spy.rc | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.MD b/README.MD index ac0851e..9a62e80 100644 --- a/README.MD +++ b/README.MD @@ -204,9 +204,9 @@ WeChatFerry ## 版本更新 -### v39.3.0 +### v39.3.2 -* 适配 `3.9.11.25` +* 修复接收消息问题
点击查看更多 @@ -218,6 +218,10 @@ WeChatFerry * `y` 是 `WeChatFerry` 的版本,从 0 开始 * `z` 是各客户端的版本,从 0 开始 +### v39.3.0 + +* 适配 `3.9.11.25` + ### v39.2.4 * 修复 wxid 问题 diff --git a/WeChatFerry/spy/spy.rc b/WeChatFerry/spy/spy.rc index 502ddf3..c484fc2 100644 --- a/WeChatFerry/spy/spy.rc +++ b/WeChatFerry/spy/spy.rc @@ -51,7 +51,7 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 39,3,1,0 + FILEVERSION 39,3,2,0 PRODUCTVERSION 3,9,11,25 FILEFLAGSMASK 0x3fL #ifdef _DEBUG @@ -69,7 +69,7 @@ BEGIN BEGIN VALUE "CompanyName", "WeChatFerry" VALUE "FileDescription", "WeChatFerry" - VALUE "FileVersion", "39.3.1.0" + VALUE "FileVersion", "39.3.2.0" VALUE "InternalName", "spy.dll" VALUE "LegalCopyright", "Copyright (C) 2023" VALUE "OriginalFilename", "spy.dll" From 3aeae5338deea4229c54e0b9eac9368271c2bc78 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 16:07:53 +0800 Subject: [PATCH 32/53] Update RoomData --- WeChatFerry/rpc/proto/wcf.proto | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/WeChatFerry/rpc/proto/wcf.proto b/WeChatFerry/rpc/proto/wcf.proto index 1660c2f..296fcf6 100644 --- a/WeChatFerry/rpc/proto/wcf.proto +++ b/WeChatFerry/rpc/proto/wcf.proto @@ -239,16 +239,19 @@ message RoomData { message RoomMember { - string wxid = 1; - string name = 2; - int32 state = 3; + string wxid = 1; + optional string name = 2; // 群昵称 + int32 state = 3; } repeated RoomMember members = 1; - int32 field_2 = 2; - int32 room_capacity = 3; - int32 field_4 = 4; - int32 field_5 = 5; - string wxid = 6; // 不知道什么含义 + optional int32 field_2 = 2; + int32 field_3 = 3; + optional int32 field_4 = 4; + int32 capacity = 5; + optional string field_6 = 6; + int32 field_7 = 7; + int32 field_8 = 8; + repeated string admins = 9; // 管理员 } From 95fe5264a4273ee6d26193e6aa6ddef6e13e34fd Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 17:03:02 +0800 Subject: [PATCH 33/53] Bump to v39.3.2.0 --- clients/python/README.MD | 9 +- clients/python/wcferry/client.py | 4 +- clients/python/wcferry/wcf_pb2.py | 302 +++++++++++++++++++++++++++++- 3 files changed, 303 insertions(+), 12 deletions(-) diff --git a/clients/python/README.MD b/clients/python/README.MD index 06e92c0..3bcee61 100644 --- a/clients/python/README.MD +++ b/clients/python/README.MD @@ -44,8 +44,8 @@ python -m grpc_tools.protoc --python_out=. --proto_path=../../../WeChatFerry/rpc ## 版本更新 -### v39.2.4.0 (2024.07.08) -* 修复 wxid 问题 +### v39.3.2.0 +* 适配 `3.9.11.25`
点击查看更多 @@ -70,14 +70,15 @@ python -m grpc_tools.protoc --python_out=. --proto_path=../../../WeChatFerry/rpc * 发送图片消息 * 发送文件消息 * 发送卡片消息 -* 发送 GIF +* 发送 XML 消息 +* 发送 GIF 消息 * 拍一拍群友 * 转发消息 * 开启接收消息 * 关闭接收消息 * 查询数据库 * 获取朋友圈消息 -* 下载图片、视频、文件 +* 下载图片 * 解密图片 * 添加群成员 * 删除群成员 diff --git a/clients/python/wcferry/client.py b/clients/python/wcferry/client.py index 592b530..caaf7c9 100644 --- a/clients/python/wcferry/client.py +++ b/clients/python/wcferry/client.py @@ -1,7 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -__version__ = "39.2.4.0" +__version__ = "39.3.2.0" import atexit import base64 @@ -20,7 +20,7 @@ import pynng import requests from google.protobuf import json_format from wcferry import wcf_pb2 -from wcferry.roomdata_pb2 import RoomData +from wcferry.wcf_pb2 import RoomData from wcferry.wxmsg import WxMsg diff --git a/clients/python/wcferry/wcf_pb2.py b/clients/python/wcferry/wcf_pb2.py index e818cfe..da7267e 100644 --- a/clients/python/wcferry/wcf_pb2.py +++ b/clients/python/wcferry/wcf_pb2.py @@ -2,9 +2,11 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: wcf.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder +from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -13,10 +15,294 @@ _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\twcf.proto\x12\x03wcf\"\xff\x03\n\x07Request\x12\x1c\n\x04\x66unc\x18\x01 \x01(\x0e\x32\x0e.wcf.Functions\x12\x1b\n\x05\x65mpty\x18\x02 \x01(\x0b\x32\n.wcf.EmptyH\x00\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\x1b\n\x03txt\x18\x04 \x01(\x0b\x32\x0c.wcf.TextMsgH\x00\x12\x1c\n\x04\x66ile\x18\x05 \x01(\x0b\x32\x0c.wcf.PathMsgH\x00\x12\x1d\n\x05query\x18\x06 \x01(\x0b\x32\x0c.wcf.DbQueryH\x00\x12\x1e\n\x01v\x18\x07 \x01(\x0b\x32\x11.wcf.VerificationH\x00\x12\x1c\n\x01m\x18\x08 \x01(\x0b\x32\x0f.wcf.MemberMgmtH\x00\x12\x1a\n\x03xml\x18\t \x01(\x0b\x32\x0b.wcf.XmlMsgH\x00\x12\x1b\n\x03\x64\x65\x63\x18\n \x01(\x0b\x32\x0c.wcf.DecPathH\x00\x12\x1b\n\x02tf\x18\x0b \x01(\x0b\x32\r.wcf.TransferH\x00\x12\x12\n\x04ui64\x18\x0c \x01(\x04\x42\x02\x30\x01H\x00\x12\x0e\n\x04\x66lag\x18\r \x01(\x08H\x00\x12\x1d\n\x03\x61tt\x18\x0e \x01(\x0b\x32\x0e.wcf.AttachMsgH\x00\x12\x1b\n\x02\x61m\x18\x0f \x01(\x0b\x32\r.wcf.AudioMsgH\x00\x12\x1b\n\x02rt\x18\x10 \x01(\x0b\x32\r.wcf.RichTextH\x00\x12\x19\n\x02pm\x18\x11 \x01(\x0b\x32\x0b.wcf.PatMsgH\x00\x12\x1d\n\x02\x66m\x18\x12 \x01(\x0b\x32\x0f.wcf.ForwardMsgH\x00\x42\x05\n\x03msg\"\xc7\x02\n\x08Response\x12\x1c\n\x04\x66unc\x18\x01 \x01(\x0e\x32\x0e.wcf.Functions\x12\x10\n\x06status\x18\x02 \x01(\x05H\x00\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\x1b\n\x05wxmsg\x18\x04 \x01(\x0b\x32\n.wcf.WxMsgH\x00\x12\x1e\n\x05types\x18\x05 \x01(\x0b\x32\r.wcf.MsgTypesH\x00\x12$\n\x08\x63ontacts\x18\x06 \x01(\x0b\x32\x10.wcf.RpcContactsH\x00\x12\x1b\n\x03\x64\x62s\x18\x07 \x01(\x0b\x32\x0c.wcf.DbNamesH\x00\x12\x1f\n\x06tables\x18\x08 \x01(\x0b\x32\r.wcf.DbTablesH\x00\x12\x1b\n\x04rows\x18\t \x01(\x0b\x32\x0b.wcf.DbRowsH\x00\x12\x1b\n\x02ui\x18\n \x01(\x0b\x32\r.wcf.UserInfoH\x00\x12\x1a\n\x03ocr\x18\x0b \x01(\x0b\x32\x0b.wcf.OcrMsgH\x00\x42\x05\n\x03msg\"\x07\n\x05\x45mpty\"\xbe\x01\n\x05WxMsg\x12\x0f\n\x07is_self\x18\x01 \x01(\x08\x12\x10\n\x08is_group\x18\x02 \x01(\x08\x12\x0e\n\x02id\x18\x03 \x01(\x04\x42\x02\x30\x01\x12\x0c\n\x04type\x18\x04 \x01(\r\x12\n\n\x02ts\x18\x05 \x01(\r\x12\x0e\n\x06roomid\x18\x06 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x07 \x01(\t\x12\x0e\n\x06sender\x18\x08 \x01(\t\x12\x0c\n\x04sign\x18\t \x01(\t\x12\r\n\x05thumb\x18\n \x01(\t\x12\r\n\x05\x65xtra\x18\x0b \x01(\t\x12\x0b\n\x03xml\x18\x0c \x01(\t\"7\n\x07TextMsg\x12\x0b\n\x03msg\x18\x01 \x01(\t\x12\x10\n\x08receiver\x18\x02 \x01(\t\x12\r\n\x05\x61ters\x18\x03 \x01(\t\")\n\x07PathMsg\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x10\n\x08receiver\x18\x02 \x01(\t\"G\n\x06XmlMsg\x12\x10\n\x08receiver\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x0c\n\x04path\x18\x03 \x01(\t\x12\x0c\n\x04type\x18\x04 \x01(\x05\"a\n\x08MsgTypes\x12\'\n\x05types\x18\x01 \x03(\x0b\x32\x18.wcf.MsgTypes.TypesEntry\x1a,\n\nTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x87\x01\n\nRpcContact\x12\x0c\n\x04wxid\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x0e\n\x06remark\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x0f\n\x07\x63ountry\x18\x05 \x01(\t\x12\x10\n\x08province\x18\x06 \x01(\t\x12\x0c\n\x04\x63ity\x18\x07 \x01(\t\x12\x0e\n\x06gender\x18\x08 \x01(\x05\"0\n\x0bRpcContacts\x12!\n\x08\x63ontacts\x18\x01 \x03(\x0b\x32\x0f.wcf.RpcContact\"\x18\n\x07\x44\x62Names\x12\r\n\x05names\x18\x01 \x03(\t\"$\n\x07\x44\x62Table\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03sql\x18\x02 \x01(\t\"(\n\x08\x44\x62Tables\x12\x1c\n\x06tables\x18\x01 \x03(\x0b\x32\x0c.wcf.DbTable\"\"\n\x07\x44\x62Query\x12\n\n\x02\x64\x62\x18\x01 \x01(\t\x12\x0b\n\x03sql\x18\x02 \x01(\t\"8\n\x07\x44\x62\x46ield\x12\x0c\n\x04type\x18\x01 \x01(\x05\x12\x0e\n\x06\x63olumn\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\"%\n\x05\x44\x62Row\x12\x1c\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x0c.wcf.DbField\"\"\n\x06\x44\x62Rows\x12\x18\n\x04rows\x18\x01 \x03(\x0b\x32\n.wcf.DbRow\"5\n\x0cVerification\x12\n\n\x02v3\x18\x01 \x01(\t\x12\n\n\x02v4\x18\x02 \x01(\t\x12\r\n\x05scene\x18\x03 \x01(\x05\"+\n\nMemberMgmt\x12\x0e\n\x06roomid\x18\x01 \x01(\t\x12\r\n\x05wxids\x18\x02 \x01(\t\"D\n\x08UserInfo\x12\x0c\n\x04wxid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06mobile\x18\x03 \x01(\t\x12\x0c\n\x04home\x18\x04 \x01(\t\"#\n\x07\x44\x65\x63Path\x12\x0b\n\x03src\x18\x01 \x01(\t\x12\x0b\n\x03\x64st\x18\x02 \x01(\t\"4\n\x08Transfer\x12\x0c\n\x04wxid\x18\x01 \x01(\t\x12\x0c\n\x04tfid\x18\x02 \x01(\t\x12\x0c\n\x04taid\x18\x03 \x01(\t\"9\n\tAttachMsg\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05thumb\x18\x02 \x01(\t\x12\r\n\x05\x65xtra\x18\x03 \x01(\t\"\'\n\x08\x41udioMsg\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x0b\n\x03\x64ir\x18\x02 \x01(\t\"y\n\x08RichText\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x63\x63ount\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x0e\n\x06\x64igest\x18\x04 \x01(\t\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x10\n\x08thumburl\x18\x06 \x01(\t\x12\x10\n\x08receiver\x18\x07 \x01(\t\"&\n\x06PatMsg\x12\x0e\n\x06roomid\x18\x01 \x01(\t\x12\x0c\n\x04wxid\x18\x02 \x01(\t\"(\n\x06OcrMsg\x12\x0e\n\x06status\x18\x01 \x01(\x05\x12\x0e\n\x06result\x18\x02 \x01(\t\".\n\nForwardMsg\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x10\n\x08receiver\x18\x02 \x01(\t*\xf2\x05\n\tFunctions\x12\x11\n\rFUNC_RESERVED\x10\x00\x12\x11\n\rFUNC_IS_LOGIN\x10\x01\x12\x16\n\x12\x46UNC_GET_SELF_WXID\x10\x10\x12\x16\n\x12\x46UNC_GET_MSG_TYPES\x10\x11\x12\x15\n\x11\x46UNC_GET_CONTACTS\x10\x12\x12\x15\n\x11\x46UNC_GET_DB_NAMES\x10\x13\x12\x16\n\x12\x46UNC_GET_DB_TABLES\x10\x14\x12\x16\n\x12\x46UNC_GET_USER_INFO\x10\x15\x12\x16\n\x12\x46UNC_GET_AUDIO_MSG\x10\x16\x12\x11\n\rFUNC_SEND_TXT\x10 \x12\x11\n\rFUNC_SEND_IMG\x10!\x12\x12\n\x0e\x46UNC_SEND_FILE\x10\"\x12\x11\n\rFUNC_SEND_XML\x10#\x12\x15\n\x11\x46UNC_SEND_EMOTION\x10$\x12\x16\n\x12\x46UNC_SEND_RICH_TXT\x10%\x12\x15\n\x11\x46UNC_SEND_PAT_MSG\x10&\x12\x14\n\x10\x46UNC_FORWARD_MSG\x10\'\x12\x18\n\x14\x46UNC_ENABLE_RECV_TXT\x10\x30\x12\x19\n\x15\x46UNC_DISABLE_RECV_TXT\x10@\x12\x16\n\x12\x46UNC_EXEC_DB_QUERY\x10P\x12\x16\n\x12\x46UNC_ACCEPT_FRIEND\x10Q\x12\x16\n\x12\x46UNC_RECV_TRANSFER\x10R\x12\x14\n\x10\x46UNC_REFRESH_PYQ\x10S\x12\x18\n\x14\x46UNC_DOWNLOAD_ATTACH\x10T\x12\x19\n\x15\x46UNC_GET_CONTACT_INFO\x10U\x12\x13\n\x0f\x46UNC_REVOKE_MSG\x10V\x12\x17\n\x13\x46UNC_REFRESH_QRCODE\x10W\x12\x16\n\x12\x46UNC_DECRYPT_IMAGE\x10`\x12\x11\n\rFUNC_EXEC_OCR\x10\x61\x12\x19\n\x15\x46UNC_ADD_ROOM_MEMBERS\x10p\x12\x19\n\x15\x46UNC_DEL_ROOM_MEMBERS\x10q\x12\x19\n\x15\x46UNC_INV_ROOM_MEMBERS\x10rB\r\n\x0b\x63om.iamteerb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\twcf.proto\x12\x03wcf\"\xff\x03\n\x07Request\x12\x1c\n\x04\x66unc\x18\x01 \x01(\x0e\x32\x0e.wcf.Functions\x12\x1b\n\x05\x65mpty\x18\x02 \x01(\x0b\x32\n.wcf.EmptyH\x00\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\x1b\n\x03txt\x18\x04 \x01(\x0b\x32\x0c.wcf.TextMsgH\x00\x12\x1c\n\x04\x66ile\x18\x05 \x01(\x0b\x32\x0c.wcf.PathMsgH\x00\x12\x1d\n\x05query\x18\x06 \x01(\x0b\x32\x0c.wcf.DbQueryH\x00\x12\x1e\n\x01v\x18\x07 \x01(\x0b\x32\x11.wcf.VerificationH\x00\x12\x1c\n\x01m\x18\x08 \x01(\x0b\x32\x0f.wcf.MemberMgmtH\x00\x12\x1a\n\x03xml\x18\t \x01(\x0b\x32\x0b.wcf.XmlMsgH\x00\x12\x1b\n\x03\x64\x65\x63\x18\n \x01(\x0b\x32\x0c.wcf.DecPathH\x00\x12\x1b\n\x02tf\x18\x0b \x01(\x0b\x32\r.wcf.TransferH\x00\x12\x12\n\x04ui64\x18\x0c \x01(\x04\x42\x02\x30\x01H\x00\x12\x0e\n\x04\x66lag\x18\r \x01(\x08H\x00\x12\x1d\n\x03\x61tt\x18\x0e \x01(\x0b\x32\x0e.wcf.AttachMsgH\x00\x12\x1b\n\x02\x61m\x18\x0f \x01(\x0b\x32\r.wcf.AudioMsgH\x00\x12\x1b\n\x02rt\x18\x10 \x01(\x0b\x32\r.wcf.RichTextH\x00\x12\x19\n\x02pm\x18\x11 \x01(\x0b\x32\x0b.wcf.PatMsgH\x00\x12\x1d\n\x02\x66m\x18\x12 \x01(\x0b\x32\x0f.wcf.ForwardMsgH\x00\x42\x05\n\x03msg\"\xc7\x02\n\x08Response\x12\x1c\n\x04\x66unc\x18\x01 \x01(\x0e\x32\x0e.wcf.Functions\x12\x10\n\x06status\x18\x02 \x01(\x05H\x00\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\x1b\n\x05wxmsg\x18\x04 \x01(\x0b\x32\n.wcf.WxMsgH\x00\x12\x1e\n\x05types\x18\x05 \x01(\x0b\x32\r.wcf.MsgTypesH\x00\x12$\n\x08\x63ontacts\x18\x06 \x01(\x0b\x32\x10.wcf.RpcContactsH\x00\x12\x1b\n\x03\x64\x62s\x18\x07 \x01(\x0b\x32\x0c.wcf.DbNamesH\x00\x12\x1f\n\x06tables\x18\x08 \x01(\x0b\x32\r.wcf.DbTablesH\x00\x12\x1b\n\x04rows\x18\t \x01(\x0b\x32\x0b.wcf.DbRowsH\x00\x12\x1b\n\x02ui\x18\n \x01(\x0b\x32\r.wcf.UserInfoH\x00\x12\x1a\n\x03ocr\x18\x0b \x01(\x0b\x32\x0b.wcf.OcrMsgH\x00\x42\x05\n\x03msg\"\x07\n\x05\x45mpty\"\xbe\x01\n\x05WxMsg\x12\x0f\n\x07is_self\x18\x01 \x01(\x08\x12\x10\n\x08is_group\x18\x02 \x01(\x08\x12\x0e\n\x02id\x18\x03 \x01(\x04\x42\x02\x30\x01\x12\x0c\n\x04type\x18\x04 \x01(\r\x12\n\n\x02ts\x18\x05 \x01(\r\x12\x0e\n\x06roomid\x18\x06 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x07 \x01(\t\x12\x0e\n\x06sender\x18\x08 \x01(\t\x12\x0c\n\x04sign\x18\t \x01(\t\x12\r\n\x05thumb\x18\n \x01(\t\x12\r\n\x05\x65xtra\x18\x0b \x01(\t\x12\x0b\n\x03xml\x18\x0c \x01(\t\"7\n\x07TextMsg\x12\x0b\n\x03msg\x18\x01 \x01(\t\x12\x10\n\x08receiver\x18\x02 \x01(\t\x12\r\n\x05\x61ters\x18\x03 \x01(\t\")\n\x07PathMsg\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x10\n\x08receiver\x18\x02 \x01(\t\"G\n\x06XmlMsg\x12\x10\n\x08receiver\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x0c\n\x04path\x18\x03 \x01(\t\x12\x0c\n\x04type\x18\x04 \x01(\x04\"a\n\x08MsgTypes\x12\'\n\x05types\x18\x01 \x03(\x0b\x32\x18.wcf.MsgTypes.TypesEntry\x1a,\n\nTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x87\x01\n\nRpcContact\x12\x0c\n\x04wxid\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x0e\n\x06remark\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x0f\n\x07\x63ountry\x18\x05 \x01(\t\x12\x10\n\x08province\x18\x06 \x01(\t\x12\x0c\n\x04\x63ity\x18\x07 \x01(\t\x12\x0e\n\x06gender\x18\x08 \x01(\x05\"0\n\x0bRpcContacts\x12!\n\x08\x63ontacts\x18\x01 \x03(\x0b\x32\x0f.wcf.RpcContact\"\x18\n\x07\x44\x62Names\x12\r\n\x05names\x18\x01 \x03(\t\"$\n\x07\x44\x62Table\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03sql\x18\x02 \x01(\t\"(\n\x08\x44\x62Tables\x12\x1c\n\x06tables\x18\x01 \x03(\x0b\x32\x0c.wcf.DbTable\"\"\n\x07\x44\x62Query\x12\n\n\x02\x64\x62\x18\x01 \x01(\t\x12\x0b\n\x03sql\x18\x02 \x01(\t\"8\n\x07\x44\x62\x46ield\x12\x0c\n\x04type\x18\x01 \x01(\x05\x12\x0e\n\x06\x63olumn\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\"%\n\x05\x44\x62Row\x12\x1c\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x0c.wcf.DbField\"\"\n\x06\x44\x62Rows\x12\x18\n\x04rows\x18\x01 \x03(\x0b\x32\n.wcf.DbRow\"5\n\x0cVerification\x12\n\n\x02v3\x18\x01 \x01(\t\x12\n\n\x02v4\x18\x02 \x01(\t\x12\r\n\x05scene\x18\x03 \x01(\x05\"+\n\nMemberMgmt\x12\x0e\n\x06roomid\x18\x01 \x01(\t\x12\r\n\x05wxids\x18\x02 \x01(\t\"D\n\x08UserInfo\x12\x0c\n\x04wxid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06mobile\x18\x03 \x01(\t\x12\x0c\n\x04home\x18\x04 \x01(\t\"#\n\x07\x44\x65\x63Path\x12\x0b\n\x03src\x18\x01 \x01(\t\x12\x0b\n\x03\x64st\x18\x02 \x01(\t\"4\n\x08Transfer\x12\x0c\n\x04wxid\x18\x01 \x01(\t\x12\x0c\n\x04tfid\x18\x02 \x01(\t\x12\x0c\n\x04taid\x18\x03 \x01(\t\"9\n\tAttachMsg\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05thumb\x18\x02 \x01(\t\x12\r\n\x05\x65xtra\x18\x03 \x01(\t\"\'\n\x08\x41udioMsg\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x0b\n\x03\x64ir\x18\x02 \x01(\t\"y\n\x08RichText\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x63\x63ount\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x0e\n\x06\x64igest\x18\x04 \x01(\t\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x10\n\x08thumburl\x18\x06 \x01(\t\x12\x10\n\x08receiver\x18\x07 \x01(\t\"&\n\x06PatMsg\x12\x0e\n\x06roomid\x18\x01 \x01(\t\x12\x0c\n\x04wxid\x18\x02 \x01(\t\"(\n\x06OcrMsg\x12\x0e\n\x06status\x18\x01 \x01(\x05\x12\x0e\n\x06result\x18\x02 \x01(\t\".\n\nForwardMsg\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x10\n\x08receiver\x18\x02 \x01(\t\"\xb7\x02\n\x08RoomData\x12)\n\x07members\x18\x01 \x03(\x0b\x32\x18.wcf.RoomData.RoomMember\x12\x14\n\x07\x66ield_2\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x0f\n\x07\x66ield_3\x18\x03 \x01(\x05\x12\x14\n\x07\x66ield_4\x18\x04 \x01(\x05H\x01\x88\x01\x01\x12\x10\n\x08\x63\x61pacity\x18\x05 \x01(\x05\x12\x14\n\x07\x66ield_6\x18\x06 \x01(\tH\x02\x88\x01\x01\x12\x0f\n\x07\x66ield_7\x18\x07 \x01(\x05\x12\x0f\n\x07\x66ield_8\x18\x08 \x01(\x05\x12\x0e\n\x06\x61\x64mins\x18\t \x03(\t\x1a\x45\n\nRoomMember\x12\x0c\n\x04wxid\x18\x01 \x01(\t\x12\x11\n\x04name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\r\n\x05state\x18\x03 \x01(\x05\x42\x07\n\x05_nameB\n\n\x08_field_2B\n\n\x08_field_4B\n\n\x08_field_6*\xf2\x05\n\tFunctions\x12\x11\n\rFUNC_RESERVED\x10\x00\x12\x11\n\rFUNC_IS_LOGIN\x10\x01\x12\x16\n\x12\x46UNC_GET_SELF_WXID\x10\x10\x12\x16\n\x12\x46UNC_GET_MSG_TYPES\x10\x11\x12\x15\n\x11\x46UNC_GET_CONTACTS\x10\x12\x12\x15\n\x11\x46UNC_GET_DB_NAMES\x10\x13\x12\x16\n\x12\x46UNC_GET_DB_TABLES\x10\x14\x12\x16\n\x12\x46UNC_GET_USER_INFO\x10\x15\x12\x16\n\x12\x46UNC_GET_AUDIO_MSG\x10\x16\x12\x11\n\rFUNC_SEND_TXT\x10 \x12\x11\n\rFUNC_SEND_IMG\x10!\x12\x12\n\x0e\x46UNC_SEND_FILE\x10\"\x12\x11\n\rFUNC_SEND_XML\x10#\x12\x15\n\x11\x46UNC_SEND_EMOTION\x10$\x12\x16\n\x12\x46UNC_SEND_RICH_TXT\x10%\x12\x15\n\x11\x46UNC_SEND_PAT_MSG\x10&\x12\x14\n\x10\x46UNC_FORWARD_MSG\x10\'\x12\x18\n\x14\x46UNC_ENABLE_RECV_TXT\x10\x30\x12\x19\n\x15\x46UNC_DISABLE_RECV_TXT\x10@\x12\x16\n\x12\x46UNC_EXEC_DB_QUERY\x10P\x12\x16\n\x12\x46UNC_ACCEPT_FRIEND\x10Q\x12\x16\n\x12\x46UNC_RECV_TRANSFER\x10R\x12\x14\n\x10\x46UNC_REFRESH_PYQ\x10S\x12\x18\n\x14\x46UNC_DOWNLOAD_ATTACH\x10T\x12\x19\n\x15\x46UNC_GET_CONTACT_INFO\x10U\x12\x13\n\x0f\x46UNC_REVOKE_MSG\x10V\x12\x17\n\x13\x46UNC_REFRESH_QRCODE\x10W\x12\x16\n\x12\x46UNC_DECRYPT_IMAGE\x10`\x12\x11\n\rFUNC_EXEC_OCR\x10\x61\x12\x19\n\x15\x46UNC_ADD_ROOM_MEMBERS\x10p\x12\x19\n\x15\x46UNC_DEL_ROOM_MEMBERS\x10q\x12\x19\n\x15\x46UNC_INV_ROOM_MEMBERS\x10rB\r\n\x0b\x63om.iamteerb\x06proto3') + +_FUNCTIONS = DESCRIPTOR.enum_types_by_name['Functions'] +Functions = enum_type_wrapper.EnumTypeWrapper(_FUNCTIONS) +FUNC_RESERVED = 0 +FUNC_IS_LOGIN = 1 +FUNC_GET_SELF_WXID = 16 +FUNC_GET_MSG_TYPES = 17 +FUNC_GET_CONTACTS = 18 +FUNC_GET_DB_NAMES = 19 +FUNC_GET_DB_TABLES = 20 +FUNC_GET_USER_INFO = 21 +FUNC_GET_AUDIO_MSG = 22 +FUNC_SEND_TXT = 32 +FUNC_SEND_IMG = 33 +FUNC_SEND_FILE = 34 +FUNC_SEND_XML = 35 +FUNC_SEND_EMOTION = 36 +FUNC_SEND_RICH_TXT = 37 +FUNC_SEND_PAT_MSG = 38 +FUNC_FORWARD_MSG = 39 +FUNC_ENABLE_RECV_TXT = 48 +FUNC_DISABLE_RECV_TXT = 64 +FUNC_EXEC_DB_QUERY = 80 +FUNC_ACCEPT_FRIEND = 81 +FUNC_RECV_TRANSFER = 82 +FUNC_REFRESH_PYQ = 83 +FUNC_DOWNLOAD_ATTACH = 84 +FUNC_GET_CONTACT_INFO = 85 +FUNC_REVOKE_MSG = 86 +FUNC_REFRESH_QRCODE = 87 +FUNC_DECRYPT_IMAGE = 96 +FUNC_EXEC_OCR = 97 +FUNC_ADD_ROOM_MEMBERS = 112 +FUNC_DEL_ROOM_MEMBERS = 113 +FUNC_INV_ROOM_MEMBERS = 114 + + +_REQUEST = DESCRIPTOR.message_types_by_name['Request'] +_RESPONSE = DESCRIPTOR.message_types_by_name['Response'] +_EMPTY = DESCRIPTOR.message_types_by_name['Empty'] +_WXMSG = DESCRIPTOR.message_types_by_name['WxMsg'] +_TEXTMSG = DESCRIPTOR.message_types_by_name['TextMsg'] +_PATHMSG = DESCRIPTOR.message_types_by_name['PathMsg'] +_XMLMSG = DESCRIPTOR.message_types_by_name['XmlMsg'] +_MSGTYPES = DESCRIPTOR.message_types_by_name['MsgTypes'] +_MSGTYPES_TYPESENTRY = _MSGTYPES.nested_types_by_name['TypesEntry'] +_RPCCONTACT = DESCRIPTOR.message_types_by_name['RpcContact'] +_RPCCONTACTS = DESCRIPTOR.message_types_by_name['RpcContacts'] +_DBNAMES = DESCRIPTOR.message_types_by_name['DbNames'] +_DBTABLE = DESCRIPTOR.message_types_by_name['DbTable'] +_DBTABLES = DESCRIPTOR.message_types_by_name['DbTables'] +_DBQUERY = DESCRIPTOR.message_types_by_name['DbQuery'] +_DBFIELD = DESCRIPTOR.message_types_by_name['DbField'] +_DBROW = DESCRIPTOR.message_types_by_name['DbRow'] +_DBROWS = DESCRIPTOR.message_types_by_name['DbRows'] +_VERIFICATION = DESCRIPTOR.message_types_by_name['Verification'] +_MEMBERMGMT = DESCRIPTOR.message_types_by_name['MemberMgmt'] +_USERINFO = DESCRIPTOR.message_types_by_name['UserInfo'] +_DECPATH = DESCRIPTOR.message_types_by_name['DecPath'] +_TRANSFER = DESCRIPTOR.message_types_by_name['Transfer'] +_ATTACHMSG = DESCRIPTOR.message_types_by_name['AttachMsg'] +_AUDIOMSG = DESCRIPTOR.message_types_by_name['AudioMsg'] +_RICHTEXT = DESCRIPTOR.message_types_by_name['RichText'] +_PATMSG = DESCRIPTOR.message_types_by_name['PatMsg'] +_OCRMSG = DESCRIPTOR.message_types_by_name['OcrMsg'] +_FORWARDMSG = DESCRIPTOR.message_types_by_name['ForwardMsg'] +_ROOMDATA = DESCRIPTOR.message_types_by_name['RoomData'] +_ROOMDATA_ROOMMEMBER = _ROOMDATA.nested_types_by_name['RoomMember'] +Request = _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), { + 'DESCRIPTOR' : _REQUEST, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.Request) + }) +_sym_db.RegisterMessage(Request) + +Response = _reflection.GeneratedProtocolMessageType('Response', (_message.Message,), { + 'DESCRIPTOR' : _RESPONSE, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.Response) + }) +_sym_db.RegisterMessage(Response) + +Empty = _reflection.GeneratedProtocolMessageType('Empty', (_message.Message,), { + 'DESCRIPTOR' : _EMPTY, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.Empty) + }) +_sym_db.RegisterMessage(Empty) + +WxMsg = _reflection.GeneratedProtocolMessageType('WxMsg', (_message.Message,), { + 'DESCRIPTOR' : _WXMSG, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.WxMsg) + }) +_sym_db.RegisterMessage(WxMsg) + +TextMsg = _reflection.GeneratedProtocolMessageType('TextMsg', (_message.Message,), { + 'DESCRIPTOR' : _TEXTMSG, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.TextMsg) + }) +_sym_db.RegisterMessage(TextMsg) + +PathMsg = _reflection.GeneratedProtocolMessageType('PathMsg', (_message.Message,), { + 'DESCRIPTOR' : _PATHMSG, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.PathMsg) + }) +_sym_db.RegisterMessage(PathMsg) + +XmlMsg = _reflection.GeneratedProtocolMessageType('XmlMsg', (_message.Message,), { + 'DESCRIPTOR' : _XMLMSG, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.XmlMsg) + }) +_sym_db.RegisterMessage(XmlMsg) + +MsgTypes = _reflection.GeneratedProtocolMessageType('MsgTypes', (_message.Message,), { + + 'TypesEntry' : _reflection.GeneratedProtocolMessageType('TypesEntry', (_message.Message,), { + 'DESCRIPTOR' : _MSGTYPES_TYPESENTRY, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.MsgTypes.TypesEntry) + }) + , + 'DESCRIPTOR' : _MSGTYPES, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.MsgTypes) + }) +_sym_db.RegisterMessage(MsgTypes) +_sym_db.RegisterMessage(MsgTypes.TypesEntry) + +RpcContact = _reflection.GeneratedProtocolMessageType('RpcContact', (_message.Message,), { + 'DESCRIPTOR' : _RPCCONTACT, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.RpcContact) + }) +_sym_db.RegisterMessage(RpcContact) + +RpcContacts = _reflection.GeneratedProtocolMessageType('RpcContacts', (_message.Message,), { + 'DESCRIPTOR' : _RPCCONTACTS, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.RpcContacts) + }) +_sym_db.RegisterMessage(RpcContacts) + +DbNames = _reflection.GeneratedProtocolMessageType('DbNames', (_message.Message,), { + 'DESCRIPTOR' : _DBNAMES, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.DbNames) + }) +_sym_db.RegisterMessage(DbNames) + +DbTable = _reflection.GeneratedProtocolMessageType('DbTable', (_message.Message,), { + 'DESCRIPTOR' : _DBTABLE, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.DbTable) + }) +_sym_db.RegisterMessage(DbTable) + +DbTables = _reflection.GeneratedProtocolMessageType('DbTables', (_message.Message,), { + 'DESCRIPTOR' : _DBTABLES, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.DbTables) + }) +_sym_db.RegisterMessage(DbTables) + +DbQuery = _reflection.GeneratedProtocolMessageType('DbQuery', (_message.Message,), { + 'DESCRIPTOR' : _DBQUERY, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.DbQuery) + }) +_sym_db.RegisterMessage(DbQuery) + +DbField = _reflection.GeneratedProtocolMessageType('DbField', (_message.Message,), { + 'DESCRIPTOR' : _DBFIELD, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.DbField) + }) +_sym_db.RegisterMessage(DbField) + +DbRow = _reflection.GeneratedProtocolMessageType('DbRow', (_message.Message,), { + 'DESCRIPTOR' : _DBROW, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.DbRow) + }) +_sym_db.RegisterMessage(DbRow) + +DbRows = _reflection.GeneratedProtocolMessageType('DbRows', (_message.Message,), { + 'DESCRIPTOR' : _DBROWS, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.DbRows) + }) +_sym_db.RegisterMessage(DbRows) + +Verification = _reflection.GeneratedProtocolMessageType('Verification', (_message.Message,), { + 'DESCRIPTOR' : _VERIFICATION, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.Verification) + }) +_sym_db.RegisterMessage(Verification) + +MemberMgmt = _reflection.GeneratedProtocolMessageType('MemberMgmt', (_message.Message,), { + 'DESCRIPTOR' : _MEMBERMGMT, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.MemberMgmt) + }) +_sym_db.RegisterMessage(MemberMgmt) + +UserInfo = _reflection.GeneratedProtocolMessageType('UserInfo', (_message.Message,), { + 'DESCRIPTOR' : _USERINFO, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.UserInfo) + }) +_sym_db.RegisterMessage(UserInfo) + +DecPath = _reflection.GeneratedProtocolMessageType('DecPath', (_message.Message,), { + 'DESCRIPTOR' : _DECPATH, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.DecPath) + }) +_sym_db.RegisterMessage(DecPath) + +Transfer = _reflection.GeneratedProtocolMessageType('Transfer', (_message.Message,), { + 'DESCRIPTOR' : _TRANSFER, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.Transfer) + }) +_sym_db.RegisterMessage(Transfer) + +AttachMsg = _reflection.GeneratedProtocolMessageType('AttachMsg', (_message.Message,), { + 'DESCRIPTOR' : _ATTACHMSG, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.AttachMsg) + }) +_sym_db.RegisterMessage(AttachMsg) + +AudioMsg = _reflection.GeneratedProtocolMessageType('AudioMsg', (_message.Message,), { + 'DESCRIPTOR' : _AUDIOMSG, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.AudioMsg) + }) +_sym_db.RegisterMessage(AudioMsg) + +RichText = _reflection.GeneratedProtocolMessageType('RichText', (_message.Message,), { + 'DESCRIPTOR' : _RICHTEXT, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.RichText) + }) +_sym_db.RegisterMessage(RichText) + +PatMsg = _reflection.GeneratedProtocolMessageType('PatMsg', (_message.Message,), { + 'DESCRIPTOR' : _PATMSG, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.PatMsg) + }) +_sym_db.RegisterMessage(PatMsg) + +OcrMsg = _reflection.GeneratedProtocolMessageType('OcrMsg', (_message.Message,), { + 'DESCRIPTOR' : _OCRMSG, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.OcrMsg) + }) +_sym_db.RegisterMessage(OcrMsg) + +ForwardMsg = _reflection.GeneratedProtocolMessageType('ForwardMsg', (_message.Message,), { + 'DESCRIPTOR' : _FORWARDMSG, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.ForwardMsg) + }) +_sym_db.RegisterMessage(ForwardMsg) + +RoomData = _reflection.GeneratedProtocolMessageType('RoomData', (_message.Message,), { + + 'RoomMember' : _reflection.GeneratedProtocolMessageType('RoomMember', (_message.Message,), { + 'DESCRIPTOR' : _ROOMDATA_ROOMMEMBER, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.RoomData.RoomMember) + }) + , + 'DESCRIPTOR' : _ROOMDATA, + '__module__' : 'wcf_pb2' + # @@protoc_insertion_point(class_scope:wcf.RoomData) + }) +_sym_db.RegisterMessage(RoomData) +_sym_db.RegisterMessage(RoomData.RoomMember) -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'wcf_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None @@ -33,8 +319,8 @@ if _descriptor._USE_C_DESCRIPTORS == False: _AUDIOMSG.fields_by_name['id']._serialized_options = b'0\001' _FORWARDMSG.fields_by_name['id']._options = None _FORWARDMSG.fields_by_name['id']._serialized_options = b'0\001' - _FUNCTIONS._serialized_start=2414 - _FUNCTIONS._serialized_end=3168 + _FUNCTIONS._serialized_start=2728 + _FUNCTIONS._serialized_end=3482 _REQUEST._serialized_start=19 _REQUEST._serialized_end=530 _RESPONSE._serialized_start=533 @@ -93,4 +379,8 @@ if _descriptor._USE_C_DESCRIPTORS == False: _OCRMSG._serialized_end=2363 _FORWARDMSG._serialized_start=2365 _FORWARDMSG._serialized_end=2411 + _ROOMDATA._serialized_start=2414 + _ROOMDATA._serialized_end=2725 + _ROOMDATA_ROOMMEMBER._serialized_start=2620 + _ROOMDATA_ROOMMEMBER._serialized_end=2689 # @@protoc_insertion_point(module_scope) From e86b804d005f965d77d741441c69a7bbab0e1abf Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 17:03:16 +0800 Subject: [PATCH 34/53] Remove unused files --- clients/python/roomdata.proto | 21 -------------------- clients/python/wcferry/roomdata_pb2.py | 27 -------------------------- 2 files changed, 48 deletions(-) delete mode 100644 clients/python/roomdata.proto delete mode 100644 clients/python/wcferry/roomdata_pb2.py diff --git a/clients/python/roomdata.proto b/clients/python/roomdata.proto deleted file mode 100644 index 0d61b86..0000000 --- a/clients/python/roomdata.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; -package com.iamteer.wcf; - -message RoomData { - - message RoomMember { - string wxid = 1; - string name = 2; - int32 state = 3; - } - - repeated RoomMember members = 1; - - int32 field_2 = 2; - int32 field_3 = 3; - int32 field_4 = 4; - int32 room_capacity = 5; - int32 field_6 = 6; - int64 field_7 = 7 [jstype = JS_STRING]; - int64 field_8 = 8 [jstype = JS_STRING]; -} diff --git a/clients/python/wcferry/roomdata_pb2.py b/clients/python/wcferry/roomdata_pb2.py deleted file mode 100644 index 23ab48a..0000000 --- a/clients/python/wcferry/roomdata_pb2.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: roomdata.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eroomdata.proto\x12\x0f\x63om.iamteer.wcf\"\xf7\x01\n\x08RoomData\x12\x35\n\x07members\x18\x01 \x03(\x0b\x32$.com.iamteer.wcf.RoomData.RoomMember\x12\x0f\n\x07\x66ield_2\x18\x02 \x01(\x05\x12\x0f\n\x07\x66ield_3\x18\x03 \x01(\x05\x12\x0f\n\x07\x66ield_4\x18\x04 \x01(\x05\x12\x15\n\rroom_capacity\x18\x05 \x01(\x05\x12\x0f\n\x07\x66ield_6\x18\x06 \x01(\x05\x12\x0f\n\x07\x66ield_7\x18\x07 \x01(\x03\x12\x0f\n\x07\x66ield_8\x18\x08 \x01(\x03\x1a\x37\n\nRoomMember\x12\x0c\n\x04wxid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\r\n\x05state\x18\x03 \x01(\x05\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'roomdata_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _ROOMDATA._serialized_start=36 - _ROOMDATA._serialized_end=283 - _ROOMDATA_ROOMMEMBER._serialized_start=228 - _ROOMDATA_ROOMMEMBER._serialized_end=283 -# @@protoc_insertion_point(module_scope) From 5ca2eb65f3ce78dcb553e2147a02984f0382a599 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 18:39:15 +0800 Subject: [PATCH 35/53] Fix #140 #220 --- WeChatFerry/spy/rpc_server.cpp | 75 +++++----------------------------- 1 file changed, 11 insertions(+), 64 deletions(-) diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index 81e1d59..70e899b 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -33,10 +33,6 @@ #include "user_info.h" #include "util.h" -#ifdef _WIN32 -#include -#endif - #define URL_SIZE 20 #define BASE_URL "tcp://0.0.0.0" #define G_BUF_SIZE (16 * 1024 * 1024) @@ -256,35 +252,12 @@ bool func_send_img(char *path, char *receiver, uint8_t *out, size_t *len) if ((path == NULL) || (receiver == NULL)) { LOG_ERROR("Empty path or receiver."); rsp.msg.status = -1; + } else if (!fs::exists(String2Wstring(path))) { + LOG_ERROR("Path does not exists: {}", path); + rsp.msg.status = -2; } else { - bool fileExist = false; -#ifdef _WIN32 - // 将 char* 路径转换为 wide-char 格式 - std::wstring wpath = String2Wstring(path); - - // 使用 GetFileAttributesW() 检查文件是否存在 - DWORD attributes = GetFileAttributesW(wpath.c_str()); - if (attributes == INVALID_FILE_ATTRIBUTES) { - LOG_ERROR("Path does not exist: {}", path); - rsp.msg.status = -2; - } else { - fileExist = true; - } -#else - // On Linux and other systems - std::string spath(path); - if (!fs::exists(spath)) { - LOG_ERROR("Path does not exist: {}", path); - rsp.msg.status = -2; - return false; - } else { - fileExist = true; - } -#endif - if(fileExist) { - SendImageMessage(receiver, path); - rsp.msg.status = 0; - } + SendImageMessage(receiver, path); + rsp.msg.status = 0; } pb_ostream_t stream = pb_ostream_from_buffer(out, *len); @@ -306,38 +279,12 @@ bool func_send_file(char *path, char *receiver, uint8_t *out, size_t *len) if ((path == NULL) || (receiver == NULL)) { LOG_ERROR("Empty path or receiver."); rsp.msg.status = -1; - } - else { - bool fileExist = false; -#ifdef _WIN32 - // 将 char* 路径转换为 wide-char 格式 - std::wstring wpath = String2Wstring(path); - - // 使用 GetFileAttributesW() 检查文件是否存在 - DWORD attributes = GetFileAttributesW(wpath.c_str()); - if (attributes == INVALID_FILE_ATTRIBUTES) { - LOG_ERROR("Path does not exist: {}", path); - rsp.msg.status = -2; - } - else { - fileExist = true; - } -#else - // On Linux and other systems - std::string spath(path); - if (!fs::exists(spath)) { - LOG_ERROR("Path does not exist: {}", path); - rsp.msg.status = -2; - return false; - } - else { - fileExist = true; - } -#endif - if (fileExist) { - SendImageMessage(receiver, path); - rsp.msg.status = 0; - } + } else if (!fs::exists(String2Wstring(path))) { + LOG_ERROR("Path does not exists: {}", path); + rsp.msg.status = -2; + } else { + SendFileMessage(receiver, path); + rsp.msg.status = 0; } pb_ostream_t stream = pb_ostream_from_buffer(out, *len); From f41b248023fce21fe1c828b4f60e34d90b9e6531 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 18:41:44 +0800 Subject: [PATCH 36/53] Bump to v39.3.3 --- README.MD | 8 ++++++-- WeChatFerry/spy/spy.rc | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.MD b/README.MD index 9a62e80..c94713d 100644 --- a/README.MD +++ b/README.MD @@ -204,9 +204,9 @@ WeChatFerry ## 版本更新 -### v39.3.2 +### v39.3.3 -* 修复接收消息问题 +* 修复发送文件/图片中文路径问题
点击查看更多 @@ -218,6 +218,10 @@ WeChatFerry * `y` 是 `WeChatFerry` 的版本,从 0 开始 * `z` 是各客户端的版本,从 0 开始 +### v39.3.2 + +* 修复接收消息问题 + ### v39.3.0 * 适配 `3.9.11.25` diff --git a/WeChatFerry/spy/spy.rc b/WeChatFerry/spy/spy.rc index c484fc2..e65c53a 100644 --- a/WeChatFerry/spy/spy.rc +++ b/WeChatFerry/spy/spy.rc @@ -13,7 +13,7 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// (壬й) resources +// ����(���壬�й�) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED @@ -51,7 +51,7 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 39,3,2,0 + FILEVERSION 39,3,3,0 PRODUCTVERSION 3,9,11,25 FILEFLAGSMASK 0x3fL #ifdef _DEBUG @@ -69,7 +69,7 @@ BEGIN BEGIN VALUE "CompanyName", "WeChatFerry" VALUE "FileDescription", "WeChatFerry" - VALUE "FileVersion", "39.3.2.0" + VALUE "FileVersion", "39.3.3.0" VALUE "InternalName", "spy.dll" VALUE "LegalCopyright", "Copyright (C) 2023" VALUE "OriginalFilename", "spy.dll" @@ -83,7 +83,7 @@ BEGIN END END -#endif // (壬й) resources +#endif // ����(���壬�й�) resources ///////////////////////////////////////////////////////////////////////////// From 03a384fbe224171c3674581a4077c1a4941ea106 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 19:14:22 +0800 Subject: [PATCH 37/53] Update cache strategy --- .github/workflows/Build-WeChatFerry.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index 9502122..cc61410 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -39,16 +39,23 @@ jobs: python -m pip install --upgrade pip pip install grpcio-tools==1.48.2 - - name: 设置缓存 - id: cache-vcpkg + - name: 设置 vcpkg 缓存 + id: cache-vcpkg-tools uses: actions/cache@v4 with: - path: | - C:/Tools/vcpkg - ${{ github.workspace }}/WeChatFerry/vcpkg_installed - key: ${{ runner.os }}-vcpkg-${{ hashFiles('WeChatFerry/vcpkg.json') }} + path: C:/Tools/vcpkg + key: ${{ runner.os }}-vcpkg-tools-${{ hashFiles('WeChatFerry/vcpkg.json') }} restore-keys: | - ${{ runner.os }}-vcpkg- + ${{ runner.os }}-vcpkg-tools- + + - name: 设置 vcpkg_installed 缓存 + id: cache-vcpkg-installed + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/WeChatFerry/vcpkg_installed + key: ${{ runner.os }}-vcpkg-installed-${{ hashFiles('WeChatFerry/vcpkg.json') }} + restore-keys: | + ${{ runner.os }}-vcpkg-installed- - name: 安装 vcpkg 并初始化依赖项 run: | From b48d55ef1ec6101a4661782e2ed6232afee01f32 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 19:24:04 +0800 Subject: [PATCH 38/53] Bump to v39.3.3.0 --- clients/python/README.MD | 4 ++-- clients/python/wcferry/client.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clients/python/README.MD b/clients/python/README.MD index 3bcee61..ced1087 100644 --- a/clients/python/README.MD +++ b/clients/python/README.MD @@ -44,8 +44,8 @@ python -m grpc_tools.protoc --python_out=. --proto_path=../../../WeChatFerry/rpc ## 版本更新 -### v39.3.2.0 -* 适配 `3.9.11.25` +### v39.3.3.0 +* 修复发送图片/文件中文路径问题
点击查看更多 diff --git a/clients/python/wcferry/client.py b/clients/python/wcferry/client.py index caaf7c9..c0a8064 100644 --- a/clients/python/wcferry/client.py +++ b/clients/python/wcferry/client.py @@ -1,7 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -__version__ = "39.3.2.0" +__version__ = "39.3.3.0" import atexit import base64 From 0ba4dd461d05dc31f5e36549ebcfb9d8ccfc728f Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Nov 2024 19:38:50 +0800 Subject: [PATCH 39/53] Update contributors --- README.MD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.MD b/README.MD index c94713d..f3dc678 100644 --- a/README.MD +++ b/README.MD @@ -64,7 +64,7 @@ ## 感谢大佬们贡献代码 -![](https://contrib.rocks/image?repo=lich0821/WeChatFerry) +![](https://contrib.rocks/image?repo=lich0821/WeChatFerry&columns=8) ## 快速开始 ### Python @@ -206,7 +206,7 @@ WeChatFerry ### v39.3.3 -* 修复发送文件/图片中文路径问题 +* 修复发送文件 / 图片中文路径问题
点击查看更多 From f56c4e3ccb809dd512996a83becb9ed6ec94e7c9 Mon Sep 17 00:00:00 2001 From: yuzifu Date: Wed, 13 Nov 2024 08:44:42 +0800 Subject: [PATCH 40/53] Fix GetAppMsgMgr offset --- WeChatFerry/spy/send_msg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeChatFerry/spy/send_msg.cpp b/WeChatFerry/spy/send_msg.cpp index 8089516..2b9c6ba 100644 --- a/WeChatFerry/spy/send_msg.cpp +++ b/WeChatFerry/spy/send_msg.cpp @@ -20,7 +20,7 @@ extern string GetSelfWxid(); // Defined in spy.cpp #define OS_SEND_MSG_MGR 0x1B53FD0 #define OS_SEND_TEXT 0x22C6B60 #define OS_SEND_IMAGE 0x22BC2F0 -#define OS_GET_APP_MSG_MGR 0x1B557D0 +#define OS_GET_APP_MSG_MGR 0x1B58F70 #define OS_SEND_FILE 0x20D0230 #define OS_RTM_NEW 0x1B5D690 #define OS_RTM_FREE 0x1B5CA60 From fe9c8d36a71de7975cfef3b398830936a40130ce Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 17 Nov 2024 15:01:29 +0800 Subject: [PATCH 41/53] Update instructions --- README.MD | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.MD b/README.MD index f3dc678..8b44fef 100644 --- a/README.MD +++ b/README.MD @@ -125,6 +125,11 @@ git clone https://github.com/microsoft/vcpkg setx VCPKG_ROOT "C:/Tools/vcpkg" /M ``` +* 与 Visual Studio 集成 +```sh +vcpkg integrate install # 失败则说明未正确安装或者未正确配置环境变量 +``` + #### 安装相关组件 编译时会自动安装。但如果需要使用 `protoc.exe`,则需要配置一下 `protoc.exe` 环境变量:`\x64-windows-static\x64-windows-static\tools\protobuf`。 From 852b00c0cf80483efab1ff539dc9cad30a102826 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 17 Nov 2024 15:01:58 +0800 Subject: [PATCH 42/53] Update FAQ --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 8b44fef..d803448 100644 --- a/README.MD +++ b/README.MD @@ -16,7 +16,7 @@
-|[📖 Python 文档](https://wechatferry.readthedocs.io/)|[📺 Python 视频教程](https://mp.weixin.qq.com/s/APdjGyZ2hllXxyG_sNCfXQ)|[🙋 FAQ](https://mp.weixin.qq.com/s/Y2Q37VYV730Iu9TrgiCmCw)| +|[📖 Python 文档](https://wechatferry.readthedocs.io/)|[📺 Python 视频教程](https://mp.weixin.qq.com/s/APdjGyZ2hllXxyG_sNCfXQ)|[🙋 FAQ](https://mp.weixin.qq.com/s/YvgFFhF6D-79kXDzRqtg6w)| |:-:|:-:|:-:| 👉 [WeChatRobot🤖](https://github.com/lich0821/WeChatRobot),一个基于 WeChatFerry 的 Python 机器人框架。 From 1fa2aacba7dfc5b0a81befcc6676a6ee541e7423 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 17 Nov 2024 15:15:13 +0800 Subject: [PATCH 43/53] Fix send_xml --- clients/python/wcferry/client.py | 1 - 1 file changed, 1 deletion(-) diff --git a/clients/python/wcferry/client.py b/clients/python/wcferry/client.py index c0a8064..9c8d6ca 100644 --- a/clients/python/wcferry/client.py +++ b/clients/python/wcferry/client.py @@ -398,7 +398,6 @@ class Wcf(): Returns: int: 0 为成功,其他失败 """ - raise Exception("Not implemented, yet") req = wcf_pb2.Request() req.func = wcf_pb2.FUNC_SEND_XML # FUNC_SEND_XML req.xml.receiver = receiver From cd05c6c92567683f44a249076bcb7577fa3b3a02 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 17 Nov 2024 15:16:50 +0800 Subject: [PATCH 44/53] v39.3.3.1 --- clients/python/README.MD | 6 +++--- clients/python/wcferry/client.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clients/python/README.MD b/clients/python/README.MD index ced1087..1f4c4b6 100644 --- a/clients/python/README.MD +++ b/clients/python/README.MD @@ -1,7 +1,7 @@ # WeChatFerry Python 客户端 [![PyPi](https://img.shields.io/pypi/v/wcferry.svg)](https://pypi.python.org/pypi/wcferry) [![Downloads](https://static.pepy.tech/badge/wcferry)](https://pypi.python.org/pypi/wcferry) [![Documentation Status](https://readthedocs.org/projects/wechatferry/badge/?version=latest)](https://wechatferry.readthedocs.io/zh/latest/?badge=latest) -|[📖 Python 文档](https://wechatferry.readthedocs.io/)|[📺 Python 视频教程](https://mp.weixin.qq.com/s/APdjGyZ2hllXxyG_sNCfXQ)|[🙋 FAQ](https://mp.weixin.qq.com/s/I6n_6fuQa60CrROWSgq0TA)| +|[📖 Python 文档](https://wechatferry.readthedocs.io/)|[📺 Python 视频教程](https://mp.weixin.qq.com/s/APdjGyZ2hllXxyG_sNCfXQ)|[🙋 FAQ](https://mp.weixin.qq.com/s/YvgFFhF6D-79kXDzRqtg6w)| |:-:|:-:|:-:| 🤖示例机器人框架:[WeChatRobot](https://github.com/lich0821/WeChatRobot)。 @@ -44,8 +44,8 @@ python -m grpc_tools.protoc --python_out=. --proto_path=../../../WeChatFerry/rpc ## 版本更新 -### v39.3.3.0 -* 修复发送图片/文件中文路径问题 +### v39.3.3.1 +* 修复 `send_xml`
点击查看更多 diff --git a/clients/python/wcferry/client.py b/clients/python/wcferry/client.py index 9c8d6ca..65218bc 100644 --- a/clients/python/wcferry/client.py +++ b/clients/python/wcferry/client.py @@ -1,7 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -__version__ = "39.3.3.0" +__version__ = "39.3.3.1" import atexit import base64 From 50344ee8d9e37f205693864688a8ad32d0b40c8a Mon Sep 17 00:00:00 2001 From: Changhua Date: Tue, 19 Nov 2024 08:32:57 +0800 Subject: [PATCH 45/53] Add wcf-http --- README.MD | 1 + 1 file changed, 1 insertion(+) diff --git a/README.MD b/README.MD index d803448..8ce3319 100644 --- a/README.MD +++ b/README.MD @@ -80,6 +80,7 @@ pip install --upgrade wcferry ### HTTP * [wcfrust](https://github.com/lich0821/wcf-client-rust)(基于 Rust) * [go_wcf_http](clients/go_wcf_http/README.MD)(基于 Go) +* [wcf-http](https://github.com/yuxiaoli/wcf-http)(基于 Python) ### Java * [java](clients/java/wcferry/README.MD) From daaed3909c3104996c5851dc03e08e3d75393dc5 Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 21 Nov 2024 10:24:39 +0800 Subject: [PATCH 46/53] =?UTF-8?q?feat:=E6=94=AF=E6=8C=81=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E4=BA=8C=E7=BB=B4=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WeChatFerry/spy/funcs.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/WeChatFerry/spy/funcs.cpp b/WeChatFerry/spy/funcs.cpp index 0c3cb7e..60f206b 100644 --- a/WeChatFerry/spy/funcs.cpp +++ b/WeChatFerry/spy/funcs.cpp @@ -35,6 +35,7 @@ extern QWORD g_WeChatWinDllAddr; #define OS_GET_MGR_BY_PREFIX_LOCAL_ID 0x213FB00 #define OS_GET_PRE_DOWNLOAD_MGR 0x1C0EE70 #define OS_PUSH_ATTACH_TASK 0x1CDF4E0 +#define OS_LOGIN_QR_CODE 0x59620d8 typedef QWORD (*GetSNSDataMgr_t)(); typedef QWORD (*GetSnsTimeLineMgr_t)(); @@ -348,8 +349,17 @@ int RevokeMsg(QWORD id) string GetLoginUrl() { - char url[] = "方法还没实现"; - return "http://weixin.qq.com/x/" + string(url); + LPVOID targetAddress = reinterpret_cast(g_WeChatWinDllAddr) + OS_LOGIN_QR_CODE; + + char* dataPtr = *reinterpret_cast(targetAddress); // 读取指针内容 + if (!dataPtr) { + LOG_ERROR("Failed to get login url"); + return "error"; + } + + // 读取字符串内容 + std::string data(dataPtr, 22); + return "http://weixin.qq.com/x/" + data; } int ReceiveTransfer(string wxid, string transferid, string transactionid) From 9162ae7e05837191d4b7ae7c3c901655f5f449c7 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 21 Nov 2024 13:03:22 +0800 Subject: [PATCH 47/53] Bump to v39.3.4 --- README.MD | 9 +++++++-- WeChatFerry/spy/spy.rc | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.MD b/README.MD index 8ce3319..560993f 100644 --- a/README.MD +++ b/README.MD @@ -27,6 +27,7 @@
点击查看功能清单 +* 获取登录二维码 * 查询登录状态 * 获取登录账号信息 * 获取消息类型 @@ -210,9 +211,9 @@ WeChatFerry ## 版本更新 -### v39.3.3 +### v39.3.4 -* 修复发送文件 / 图片中文路径问题 +* 实现获取登录二维码
点击查看更多 @@ -224,6 +225,10 @@ WeChatFerry * `y` 是 `WeChatFerry` 的版本,从 0 开始 * `z` 是各客户端的版本,从 0 开始 +### v39.3.3 + +* 修复发送文件 / 图片中文路径问题 + ### v39.3.2 * 修复接收消息问题 diff --git a/WeChatFerry/spy/spy.rc b/WeChatFerry/spy/spy.rc index e65c53a..5f87428 100644 --- a/WeChatFerry/spy/spy.rc +++ b/WeChatFerry/spy/spy.rc @@ -51,7 +51,7 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 39,3,3,0 + FILEVERSION 39,3,4,0 PRODUCTVERSION 3,9,11,25 FILEFLAGSMASK 0x3fL #ifdef _DEBUG @@ -69,7 +69,7 @@ BEGIN BEGIN VALUE "CompanyName", "WeChatFerry" VALUE "FileDescription", "WeChatFerry" - VALUE "FileVersion", "39.3.3.0" + VALUE "FileVersion", "39.3.4.0" VALUE "InternalName", "spy.dll" VALUE "LegalCopyright", "Copyright (C) 2023" VALUE "OriginalFilename", "spy.dll" From 72741630534bdc301eab46659e3563ac048720c5 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 21 Nov 2024 13:10:07 +0800 Subject: [PATCH 48/53] Refactoring --- WeChatFerry/spy/funcs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WeChatFerry/spy/funcs.cpp b/WeChatFerry/spy/funcs.cpp index 60f206b..a705a68 100644 --- a/WeChatFerry/spy/funcs.cpp +++ b/WeChatFerry/spy/funcs.cpp @@ -35,7 +35,7 @@ extern QWORD g_WeChatWinDllAddr; #define OS_GET_MGR_BY_PREFIX_LOCAL_ID 0x213FB00 #define OS_GET_PRE_DOWNLOAD_MGR 0x1C0EE70 #define OS_PUSH_ATTACH_TASK 0x1CDF4E0 -#define OS_LOGIN_QR_CODE 0x59620d8 +#define OS_LOGIN_QR_CODE 0x59620D8 typedef QWORD (*GetSNSDataMgr_t)(); typedef QWORD (*GetSnsTimeLineMgr_t)(); @@ -351,7 +351,7 @@ string GetLoginUrl() { LPVOID targetAddress = reinterpret_cast(g_WeChatWinDllAddr) + OS_LOGIN_QR_CODE; - char* dataPtr = *reinterpret_cast(targetAddress); // 读取指针内容 + char *dataPtr = *reinterpret_cast(targetAddress); // 读取指针内容 if (!dataPtr) { LOG_ERROR("Failed to get login url"); return "error"; From 4cf74f28d9ed2375e165b373d3b47a00d8fa0f71 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 21 Nov 2024 13:26:31 +0800 Subject: [PATCH 49/53] Refactoring --- WeChatFerry/spy/funcs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeChatFerry/spy/funcs.cpp b/WeChatFerry/spy/funcs.cpp index a705a68..bdd1d56 100644 --- a/WeChatFerry/spy/funcs.cpp +++ b/WeChatFerry/spy/funcs.cpp @@ -26,7 +26,7 @@ extern QWORD g_WeChatWinDllAddr; #define OS_LOGIN_STATUS 0x595C9E8 #define OS_GET_SNS_DATA_MGR 0x21E2200 -#define OS_GET_SNS_FIRST_PAGE 0x2E212d0 +#define OS_GET_SNS_FIRST_PAGE 0x2E212D0 #define OS_GET_SNS_TIMELINE_MGR 0x2DB3390 #define OS_GET_SNS_NEXT_PAGE 0x2EC8970 #define OS_NEW_CHAT_MSG 0x1B5E140 From 9778b93a518394c75da8a37e61af7e7d6e8b8449 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 21 Nov 2024 13:46:08 +0800 Subject: [PATCH 50/53] v39.3.3.3 --- clients/python/wcferry/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/python/wcferry/client.py b/clients/python/wcferry/client.py index 65218bc..ea66036 100644 --- a/clients/python/wcferry/client.py +++ b/clients/python/wcferry/client.py @@ -1,7 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -__version__ = "39.3.3.1" +__version__ = "39.3.3.2" import atexit import base64 From ff070318bec8661094f3626e14d9fb0068bc69b6 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 21 Nov 2024 13:46:32 +0800 Subject: [PATCH 51/53] v39.3.3.3 --- clients/python/wcferry/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/python/wcferry/client.py b/clients/python/wcferry/client.py index ea66036..6583014 100644 --- a/clients/python/wcferry/client.py +++ b/clients/python/wcferry/client.py @@ -1,7 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -__version__ = "39.3.3.2" +__version__ = "39.3.3.3" import atexit import base64 From 1af39e4ec4381114923068dc7f521da677f57d7c Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 21 Nov 2024 14:00:03 +0800 Subject: [PATCH 52/53] Fix x-install-root --- .github/workflows/Build-WeChatFerry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index cc61410..2815a07 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -80,7 +80,7 @@ jobs: # 返回到项目目录并安装依赖 cd ${{ github.workspace }}/WeChatFerry - C:/Tools/vcpkg/vcpkg install --triplet x64-windows-static + C:/Tools/vcpkg/vcpkg install --triplet x64-windows-static --x-install-root="${{ github.workspace }}/WeChatFerry/vcpkg_installed/x64-windows-static" - name: 解析并构建配置 run: | From 9f51c38a5301044d34b133ce3824566762d8e726 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 21 Nov 2024 14:34:27 +0800 Subject: [PATCH 53/53] Revert --- .github/workflows/Build-WeChatFerry.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index 2815a07..9502122 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -39,23 +39,16 @@ jobs: python -m pip install --upgrade pip pip install grpcio-tools==1.48.2 - - name: 设置 vcpkg 缓存 - id: cache-vcpkg-tools + - name: 设置缓存 + id: cache-vcpkg uses: actions/cache@v4 with: - path: C:/Tools/vcpkg - key: ${{ runner.os }}-vcpkg-tools-${{ hashFiles('WeChatFerry/vcpkg.json') }} + path: | + C:/Tools/vcpkg + ${{ github.workspace }}/WeChatFerry/vcpkg_installed + key: ${{ runner.os }}-vcpkg-${{ hashFiles('WeChatFerry/vcpkg.json') }} restore-keys: | - ${{ runner.os }}-vcpkg-tools- - - - name: 设置 vcpkg_installed 缓存 - id: cache-vcpkg-installed - uses: actions/cache@v4 - with: - path: ${{ github.workspace }}/WeChatFerry/vcpkg_installed - key: ${{ runner.os }}-vcpkg-installed-${{ hashFiles('WeChatFerry/vcpkg.json') }} - restore-keys: | - ${{ runner.os }}-vcpkg-installed- + ${{ runner.os }}-vcpkg- - name: 安装 vcpkg 并初始化依赖项 run: | @@ -80,7 +73,7 @@ jobs: # 返回到项目目录并安装依赖 cd ${{ github.workspace }}/WeChatFerry - C:/Tools/vcpkg/vcpkg install --triplet x64-windows-static --x-install-root="${{ github.workspace }}/WeChatFerry/vcpkg_installed/x64-windows-static" + C:/Tools/vcpkg/vcpkg install --triplet x64-windows-static - name: 解析并构建配置 run: |