From e52a9b87ed6c0d34dc47b896e36b49f5e9242e29 Mon Sep 17 00:00:00 2001 From: hugy <504650082@qq.com> Date: Wed, 22 Mar 2023 17:52:51 +0800 Subject: [PATCH] =?UTF-8?q?3.9.2.23=20=E6=B5=8B=E8=AF=95=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++---- src/send_file.cc | 10 +++++----- src/send_image.cc | 11 +++++------ src/send_text.cc | 10 +++++----- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 484e7c7..f1fdce6 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ #### 功能预览: -0.检查是否登录 -1.获取登录微信信息 + + 2.发送文本 5.发送图片 6.发送文件 -9.hook消息 + ### 接口文档: diff --git a/src/send_file.cc b/src/send_file.cc index 526210a..258a650 100644 --- a/src/send_file.cc +++ b/src/send_file.cc @@ -3,16 +3,16 @@ #include "common.h" #include "wechat_data.h" -#define WX_APP_MSG_MGR_OFFSET 0x709bb0 -#define WX_SEND_FILE_OFFSET 0xb06240 -#define WX_INIT_CHAT_MSG_OFFSET 0xed3be0 -#define WX_FREE_CHAT_MSG_OFFSET 0x6f4ea0 +#define WX_APP_MSG_MGR_OFFSET 0x76ae20 +#define WX_SEND_FILE_OFFSET 0xb6d1f0 +#define WX_INIT_CHAT_MSG_OFFSET 0xf59e40 +#define WX_FREE_CHAT_MSG_OFFSET 0x756960 int SendFile(wchar_t *wxid, wchar_t *file_path){ int success = 0; WeChatString to_user(wxid); WeChatString path(file_path); - char chat_msg[0x2C4] = {0}; + char chat_msg[0x2D8] = {0}; DWORD base = GetWeChatWinBase(); DWORD app_msg_mgr_addr = base + WX_APP_MSG_MGR_OFFSET; DWORD init_chat_msg_addr = base + WX_INIT_CHAT_MSG_OFFSET; diff --git a/src/send_image.cc b/src/send_image.cc index 00b6464..f30ef47 100644 --- a/src/send_image.cc +++ b/src/send_image.cc @@ -3,17 +3,16 @@ #include "common.h" #include "wechat_data.h" -#define WX_SEND_IMAGE_OFFSET 0xc71500 -#define WX_SEND_MESSAGE_MGR_OFFSET 0x706d30 -#define WX_INIT_CHAT_MSG_OFFSET 0xed3be0 -#define WX_FREE_CHAT_MSG_OFFSET 0x6f4ea0 - +#define WX_SEND_IMAGE_OFFSET 0xce6640 +#define WX_SEND_MESSAGE_MGR_OFFSET 0x768140 +#define WX_INIT_CHAT_MSG_OFFSET 0xf59e40 +#define WX_FREE_CHAT_MSG_OFFSET 0x756960 int SendImage(wchar_t *wxid, wchar_t *image_path){ int success = 0; WeChatString to_user(wxid); WeChatString path(image_path); - char chat_msg[0x2C4] ={0}; + char chat_msg[0x2D8] ={0}; DWORD base = GetWeChatWinBase(); DWORD send_message_mgr_addr = base + WX_SEND_MESSAGE_MGR_OFFSET; DWORD init_chat_msg_addr = base + WX_INIT_CHAT_MSG_OFFSET; diff --git a/src/send_text.cc b/src/send_text.cc index 265e8d4..96c349e 100644 --- a/src/send_text.cc +++ b/src/send_text.cc @@ -6,11 +6,11 @@ #include "wechat_data.h" #include "contact.h" -#define WX_SEND_TEXT_OFFSET 0xc71a60 +#define WX_SEND_TEXT_OFFSET 0xce6c80 -#define WX_SEND_MESSAGE_MGR_OFFSET 0x706d30 +#define WX_SEND_MESSAGE_MGR_OFFSET 0x768140 -#define WX_FREE_CHAT_MSG_OFFSET 0x6f4ea0 +#define WX_FREE_CHAT_MSG_OFFSET 0x756960 using namespace std; /// @brief 发生文本消息 /// @param wxid wxid @@ -26,7 +26,7 @@ int SendText(wchar_t* wxid, wchar_t* msg) { DWORD send_message_mgr_addr = base + WX_SEND_MESSAGE_MGR_OFFSET; DWORD send_text_msg_addr = base + WX_SEND_TEXT_OFFSET; DWORD free_chat_msg_addr = base + WX_FREE_CHAT_MSG_OFFSET; - char chat_msg[0x2C4] ={0}; + char chat_msg[0x2D8] ={0}; __asm{ PUSHAD CALL send_message_mgr_addr @@ -59,7 +59,7 @@ int SendAtText(wchar_t* chat_room_id,wchar_t** wxids,int len,wchar_t* msg){ for (int i = 0; i < len; i++) { wstring nickname; if (!lstrcmpiW((wchar_t *)wxids[i], (wchar_t *)L"notify@all")) { - nickname = L""; + nickname = L"������"; } else { nickname = GetContactOrChatRoomNickname(wxids[i]); }