mirror of
https://github.com/laomms/wxhelper.git
synced 2025-04-20 02:19:14 +08:00
Compare commits
31 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a8bd504a98 | ||
|
81790037d5 | ||
|
bae09b79e7 | ||
|
83171c1fba | ||
|
7798a476aa | ||
|
92ae819d0c | ||
|
efbfd138cd | ||
|
de90eec711 | ||
|
6c275e62cf | ||
|
70678b4f41 | ||
|
7422474719 | ||
|
5344d95076 | ||
|
a22c7e3ac6 | ||
|
b2a6fc2e06 | ||
|
587df95965 | ||
|
b29ff1963e | ||
|
b0f75b6131 | ||
|
9e72884ed6 | ||
|
ced376bff6 | ||
|
0f5b54c5c7 | ||
|
9ffafd1229 | ||
|
97d5aa46b0 | ||
|
53ec50c3cc | ||
|
04a3de10f9 | ||
|
39ecf26d4d | ||
|
378b4c94ed | ||
|
3f8e10aa89 | ||
|
b9c1370bfe | ||
|
fa450a6887 | ||
|
befbc0f70e | ||
|
0215a6daa1 |
85
README.md
85
README.md
@ -1,4 +1,4 @@
|
||||
https://github.com/ttttupup/wxhelper 重编译版
|
||||
https://github.com/ttttupup/wxhelper VS2022重编译版
|
||||
|
||||
|
||||
```c++
|
||||
@ -10,38 +10,45 @@ injector.exe -n wechat.exe -i wxhelper.dll
|
||||
验证端口:
|
||||
netstat -ano | findstr 19088
|
||||
```
|
||||
WECHAT_VERSION=391119
|
||||
|
||||
[download](https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.11.19/WeChatSetup-3.9.11.19.exe)
|
||||
```c++
|
||||
#define V_3_9_8_25 39825
|
||||
#define V_3_9_9_43 39943
|
||||
#define V_3_9_10_19 391019
|
||||
#define V_3_9_11_19 391119
|
||||
#define V_3_9_11_25 391125
|
||||
```
|
||||
WECHAT_VERSION=391125
|
||||

|
||||
偏移自己查找修改
|
||||
|
||||
```c++
|
||||
const uint64_t kGetAccountServiceMgr = 0x1b50d00;
|
||||
const uint64_t kGetAccountServiceMgr = 0x1B557D0;
|
||||
const uint64_t kSyncMsg = 0xc39680;
|
||||
const uint64_t kSyncMsgNext = 0xc39680;
|
||||
const uint64_t kGetCurrentDataPath = 0x2248ce0;
|
||||
const uint64_t kGetAppDataSavePath = 0x25dc0e0;
|
||||
const uint64_t kGetSendMessageMgr = 0x1b4f500;
|
||||
const uint64_t kSendTextMsg = 0x22c2010;
|
||||
const uint64_t kFreeChatMsg = 0x1b50d80;
|
||||
const uint64_t kGetCurrentDataPath = 0x224D830;
|
||||
const uint64_t kGetAppDataSavePath = 0x25E1040;
|
||||
const uint64_t kGetSendMessageMgr = 0x1B53FD0;
|
||||
const uint64_t kSendTextMsg = 0x22C6B60;
|
||||
const uint64_t kFreeChatMsg = 0x1B55850;
|
||||
|
||||
const uint64_t kDoAddMsg = 0x230a3e0;
|
||||
const uint64_t kSendImageMsg = 0x22b77a0;
|
||||
const uint64_t kChatMsgInstanceCounter = 0x1b59670;
|
||||
const uint64_t kSendFileMsg = 0x20cb6f0;
|
||||
const uint64_t kGetAppMsgMgr = 0x1b544a0;
|
||||
const uint64_t kGetContactMgr = 0x1b3ccd0;
|
||||
const uint64_t kGetContactList = 0x219a1c0;
|
||||
const uint64_t kDoAddMsg = 0x230EF30;
|
||||
const uint64_t kSendImageMsg = 0x22BC2F0;
|
||||
const uint64_t kChatMsgInstanceCounter = 0x1B5E140;
|
||||
const uint64_t kSendFileMsg = 0x20D0230;
|
||||
const uint64_t kGetAppMsgMgr = 0x1B58F70;
|
||||
const uint64_t kGetContactMgr = 0x1B417A0;
|
||||
const uint64_t kGetContactList = 0x219ED10;
|
||||
|
||||
const uint64_t k_sqlite3_exec = 0x3a59b30;
|
||||
const uint64_t k_sqlite3_prepare = 0x3a617b0;
|
||||
const uint64_t k_sqlite3_open = 0x3a98fa0;
|
||||
const uint64_t k_sqlite3_step = 0x3a1db30;
|
||||
const uint64_t k_sqlite3_column_count = 0x3a1e350;
|
||||
const uint64_t k_sqlite3_column_name = 0x3a1ed50;
|
||||
const uint64_t k_sqlite3_column_type = 0x3a1eba0;
|
||||
const uint64_t k_sqlite3_column_blob = 0x3a1e380;
|
||||
const uint64_t k_sqlite3_column_bytes = 0x3a1e470;
|
||||
const uint64_t k_sqlite3_finalize = 0x3a1cbe0;
|
||||
const uint64_t k_sqlite3_exec = 0x3a5eda0;
|
||||
const uint64_t k_sqlite3_prepare = 0x3a66a80;
|
||||
const uint64_t k_sqlite3_open = 0x3a235c0;
|
||||
const uint64_t k_sqlite3_step = 0x3a22da0;
|
||||
const uint64_t k_sqlite3_column_count = 0x3a235c0;
|
||||
const uint64_t k_sqlite3_column_name = 0x3a23fc0;
|
||||
const uint64_t k_sqlite3_column_type = 0x3a23e10;
|
||||
const uint64_t k_sqlite3_column_blob = 0x3a235f0;
|
||||
const uint64_t k_sqlite3_column_bytes = 0x3a236e0;
|
||||
const uint64_t k_sqlite3_finalize = 0x3a21e50;
|
||||
|
||||
const uint64_t kGPInstance = 0x58dd300;
|
||||
const uint64_t kMultiDBMgr = 0x593abf8;
|
||||
@ -49,12 +56,12 @@ const uint64_t kPublicMsgMgr = 0x5938198;
|
||||
const uint64_t kFavoriteStorageMgr = 0x593b790;
|
||||
const uint64_t kHardLinkMgr = 0x593ab28;
|
||||
|
||||
const uint64_t kChatRoomMgr = 0x1b7f100;
|
||||
const uint64_t kChatRoomMgr = 0x1B876C0;
|
||||
const uint64_t kGetChatRoomDetailInfo = 0x2160bb0;
|
||||
const uint64_t kNewChatRoomInfo = 0x2505120;
|
||||
const uint64_t kFreeChatRoomInfo = 0x2505300;
|
||||
const uint64_t kNewChatRoomInfo = 0x2509CD0;
|
||||
const uint64_t kFreeChatRoomInfo = 0x2509EB0;
|
||||
const uint64_t kDoAddMemberToChatRoom = 0x21505b0;
|
||||
const uint64_t kDoModChatRoomMemberNickName = 0x215a360;
|
||||
const uint64_t kDoModChatRoomMemberNickName = 0x215EEB0;
|
||||
const uint64_t kDelMemberFromChatRoom = 0x2150bf0;
|
||||
const uint64_t kGetMemberFromChatRoom = 0x2162400;
|
||||
const uint64_t kNewChatRoom = 0x2502540;
|
||||
@ -77,11 +84,11 @@ const uint64_t kSNSTimeLineMgr = 0x2dadf20;
|
||||
const uint64_t kGetMgrByPrefixLocalId = 0x213afb0;
|
||||
const uint64_t kAddFavFromMsg = 0x2930e40;
|
||||
const uint64_t kGetChatMgr = 0x1b82bf0;
|
||||
const uint64_t kGetFavoriteMgr = 0x1b57ba0;
|
||||
const uint64_t kGetFavoriteMgr = 0x1B5C670;
|
||||
const uint64_t kAddFavFromImage = 0x293d0f0;
|
||||
const uint64_t kGetContact = 0x22609B0;
|
||||
const uint64_t kNewContact = 0x25E4430;
|
||||
const uint64_t kFreeContact = 0x25E4AE0;
|
||||
const uint64_t kGetContact = 0x21945d0;
|
||||
const uint64_t kNewContact = 0x2519300;
|
||||
const uint64_t kFreeContact = 0x25199b0;
|
||||
const uint64_t kNewMMReaderItem = 0x8c79a0;
|
||||
const uint64_t kFreeMMReaderItem = 0x8c6da0;
|
||||
const uint64_t kForwordPublicMsg = 0xddc6c0;
|
||||
@ -98,9 +105,9 @@ const uint64_t kSendApplet = 0x13c0920;
|
||||
const uint64_t kSendAppletSecond = 0x13c1150;
|
||||
const uint64_t kGetAppInfoByWaid = 0x13c5790;
|
||||
const uint64_t kCopyShareAppMessageRequest = 0x13c0670;
|
||||
const uint64_t kNewWAUpdatableMsgInfo = 0x919ca0;
|
||||
const uint64_t kFreeWAUpdatableMsgInfo = 0x8fc230;
|
||||
const uint64_t kSendPatMsg = 0x2ca9790;
|
||||
const uint64_t kNewWAUpdatableMsgInfo = 0x1BD27E0;
|
||||
const uint64_t kFreeWAUpdatableMsgInfo = 0x1B97590;
|
||||
const uint64_t kSendPatMsg = 0xB2BB00;
|
||||
const uint64_t kGetOCRManager = 0x999780;
|
||||
const uint64_t kDoOCRTask = 0x2c53910;
|
||||
|
||||
@ -128,7 +135,7 @@ const uint64_t kTransferConfirm = 0x2f8c750;
|
||||
const uint64_t kTransferRefuse = 0x2f8d340;
|
||||
|
||||
const uint64_t kAddFriend = 0x1f3a350;
|
||||
const uint64_t kVerifyApply = 0x1f3a940;
|
||||
const uint64_t kVerifyApply = 0x1B3BBE0;
|
||||
const uint64_t kDoDelContact = 0x2310120;
|
||||
|
||||
const uint64_t kGetSearchContactMgr = 0x1f9a730;
|
||||
|
1035
Wechat Hook 391119.json
Normal file
1035
Wechat Hook 391119.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -27,8 +27,9 @@ class MiscController : public http::HttpController<MiscController> {
|
||||
ADD_PATH("/api/getTranslateVoiceText", GetTranslateVoiceText);
|
||||
ADD_PATH("/api/openUrlByWeChat", OpenUrlByWeChat);
|
||||
ADD_PATH("/api/confirmReceipt", ConfirmReceipt);
|
||||
ADD_PATH("/api/refuseReceipt",RefundReceipt);
|
||||
ADD_PATH("/api/downloadAttach", DownloadAttach);
|
||||
|
||||
ADD_PATH("/api/verifyApply", VerifyApply);
|
||||
PATHS_END
|
||||
|
||||
public:
|
||||
@ -100,10 +101,18 @@ class MiscController : public http::HttpController<MiscController> {
|
||||
/// @param params json
|
||||
/// @return json
|
||||
static std::string ConfirmReceipt(std::string params);
|
||||
/// @brief 拒绝收款
|
||||
/// @param params json
|
||||
/// @return json
|
||||
static std::string RefundReceipt(std::string params);
|
||||
/// @brief 下载附件
|
||||
/// @param params json
|
||||
/// @return json
|
||||
static std::string DownloadAttach(std::string params);
|
||||
/// @brief 通过好友
|
||||
/// @param params json
|
||||
/// @return json
|
||||
static std::string VerifyApply(std::string params);
|
||||
};
|
||||
} // namespace wxhelper
|
||||
|
||||
|
124
inc/offset.h
124
inc/offset.h
@ -6,6 +6,7 @@ namespace wechat {
|
||||
#define V_3_9_9_43 39943
|
||||
#define V_3_9_10_19 391019
|
||||
#define V_3_9_11_19 391119
|
||||
#define V_3_9_11_25 391125
|
||||
#ifndef WECHAT_VERSION
|
||||
#error " WECHAT_VERSION not defined ."
|
||||
#endif
|
||||
@ -54,11 +55,11 @@ const uint64_t kMultiDBMgr = 0x3e00910;
|
||||
const uint64_t kPublicMsgMgr = 0x3dfe098;
|
||||
const uint64_t kFavoriteStorageMgr = 0x3e01478;
|
||||
|
||||
const uint64_t kChatRoomMgr = 0x8e9d30;
|
||||
const uint64_t kChatRoomMgr = 0x1b83bd0;
|
||||
const uint64_t kGetChatRoomDetailInfo = 0xe73590;
|
||||
const uint64_t kNewChatRoomInfo = 0x12006b0;
|
||||
const uint64_t kFreeChatRoomInfo = 0x1200890;
|
||||
const uint64_t kDoAddMemberToChatRoom = 0xe63c70;
|
||||
const uint64_t kDoAddMemberToChatRoom = 0x2155100;
|
||||
const uint64_t kDoModChatRoomMemberNickName = 0xe6db00;
|
||||
const uint64_t kDelMemberFromChatRoom = 0xe64290;
|
||||
const uint64_t kGetMemberFromChatRoom = 0xe74de0;
|
||||
@ -467,6 +468,125 @@ const uint64_t kAddFriend = 0x1f3a350;
|
||||
const uint64_t kVerifyApply = 0x1f3a940;
|
||||
const uint64_t kDoDelContact = 0x2310120;
|
||||
|
||||
const uint64_t kGetSearchContactMgr = 0x1f9a730;
|
||||
const uint64_t kStartSearch = 0x22a4200;
|
||||
#elif WECHAT_VERSION == V_3_9_11_25
|
||||
const uint64_t kGetAccountServiceMgr = 0x1B557D0;
|
||||
const uint64_t kSyncMsg = 0xc39680;
|
||||
const uint64_t kSyncMsgNext = 0xc39680;
|
||||
const uint64_t kGetCurrentDataPath = 0x224D830;
|
||||
const uint64_t kGetAppDataSavePath = 0x25E1040;
|
||||
const uint64_t kGetSendMessageMgr = 0x1B53FD0;
|
||||
const uint64_t kSendTextMsg = 0x22C6B60;
|
||||
const uint64_t kFreeChatMsg = 0x1B55850;
|
||||
|
||||
const uint64_t kDoAddMsg = 0x230EF30;
|
||||
const uint64_t kSendImageMsg = 0x22BC2F0;
|
||||
const uint64_t kChatMsgInstanceCounter = 0x1B5E140;
|
||||
const uint64_t kSendFileMsg = 0x20D0230;
|
||||
const uint64_t kGetAppMsgMgr = 0x1B58F70;
|
||||
const uint64_t kGetContactMgr = 0x1B417A0;
|
||||
const uint64_t kGetContactList = 0x219ed10;
|
||||
|
||||
const uint64_t k_sqlite3_exec = 0x3a5eda0;
|
||||
const uint64_t k_sqlite3_prepare = 0x3a66a20;
|
||||
const uint64_t k_sqlite3_open = 0x3a9e210;
|
||||
const uint64_t k_sqlite3_step = 0x3a22da0;
|
||||
const uint64_t k_sqlite3_column_count = 0x3a235c0;
|
||||
const uint64_t k_sqlite3_column_name = 0x3a23fc0;
|
||||
const uint64_t k_sqlite3_column_type = 0x3a23e10;
|
||||
const uint64_t k_sqlite3_column_blob = 0x3a235f0;
|
||||
const uint64_t k_sqlite3_column_bytes = 0x3a236e0;
|
||||
const uint64_t k_sqlite3_finalize = 0x3a21e50;
|
||||
|
||||
const uint64_t kGPInstance = 0x5902000;
|
||||
const uint64_t kMultiDBMgr = 0x595f900;
|
||||
const uint64_t kPublicMsgMgr = 0x595ce98;
|
||||
const uint64_t kFavoriteStorageMgr = 0x5960498;
|
||||
const uint64_t kHardLinkMgr = 0x593ab28;
|
||||
|
||||
const uint64_t kChatRoomMgr = 0x1b83bd0;
|
||||
const uint64_t kGetChatRoomDetailInfo = 0x2165700;
|
||||
const uint64_t kNewChatRoomInfo = 0x2509CD0;
|
||||
const uint64_t kFreeChatRoomInfo = 0x2509EB0;
|
||||
const uint64_t kDoAddMemberToChatRoom = 0x2155100;
|
||||
const uint64_t kDoModChatRoomMemberNickName = 0x215eeb0;
|
||||
const uint64_t kDelMemberFromChatRoom = 0x2155740;
|
||||
const uint64_t kGetMemberFromChatRoom = 0x2162400;
|
||||
const uint64_t kNewChatRoom = 0x2502540;
|
||||
const uint64_t kFreeChatRoom = 0x2502740;
|
||||
|
||||
const uint64_t kTopMsg = 0x1d7d160;
|
||||
const uint64_t kRemoveTopMsg = 0x2166090;
|
||||
const uint64_t kInviteMember = 0x2154ae0;
|
||||
const uint64_t kHookLog = 0x1304e60;
|
||||
|
||||
const uint64_t kCreateChatRoom = 0x214fc60;
|
||||
const uint64_t kQuitChatRoom = 0x215ac00;
|
||||
const uint64_t kForwardMsg = 0x22C60E0;
|
||||
|
||||
const uint64_t kOnSnsTimeLineSceneFinish = 0x1a73150;
|
||||
const uint64_t kSNSGetFirstPage = 0x2e212d0;
|
||||
const uint64_t kSNSGetNextPageScene = 0x2ec8970;
|
||||
const uint64_t kSNSDataMgr = 0x21e2200;
|
||||
const uint64_t kSNSTimeLineMgr = 0x2db3390;
|
||||
const uint64_t kGetMgrByPrefixLocalId = 0x213afb0;
|
||||
const uint64_t kAddFavFromMsg = 0x2930e40;
|
||||
const uint64_t kGetChatMgr = 0x1b876c0;
|
||||
const uint64_t kGetFavoriteMgr = 0x1B5C670;
|
||||
const uint64_t kAddFavFromImage = 0x293d0f0;
|
||||
const uint64_t kGetContact = 0x21945d0;
|
||||
const uint64_t kNewContact = 0x2519300;
|
||||
const uint64_t kFreeContact = 0x25199b0;
|
||||
const uint64_t kNewMMReaderItem = 0x8c79a0;
|
||||
const uint64_t kFreeMMReaderItem = 0x8c6da0;
|
||||
const uint64_t kForwordPublicMsg = 0xddc6c0;
|
||||
const uint64_t kParseAppMsgXml = 0x11b0a70;
|
||||
const uint64_t kNewAppMsgInfo = 0x91a550;
|
||||
const uint64_t kFreeAppMsgInfo = 0x8fd1a0;
|
||||
const uint64_t kGetPreDownLoadMgr = 0x1c0a3a0;
|
||||
const uint64_t kPushAttachTask = 0x1cda920;
|
||||
const uint64_t kGetCustomSmileyMgr = 0x1ca0320;
|
||||
const uint64_t kSendCustomEmotion = 0x21b04c0;
|
||||
const uint64_t kNewJsApiShareAppMessage = 0x26cda20;
|
||||
const uint64_t kInitJsConfig = 0x137bc00;
|
||||
const uint64_t kSendApplet = 0x13c0920;
|
||||
const uint64_t kSendAppletSecond = 0x13c1150;
|
||||
const uint64_t kGetAppInfoByWaid = 0x13c5790;
|
||||
const uint64_t kCopyShareAppMessageRequest = 0x13c0670;
|
||||
const uint64_t kNewWAUpdatableMsgInfo = 0x1BD27E0;
|
||||
const uint64_t kFreeWAUpdatableMsgInfo = 0x1B97590;
|
||||
const uint64_t kSendPatMsg = 0xB2BB00;
|
||||
const uint64_t kGetOCRManager = 0x999780;
|
||||
const uint64_t kDoOCRTask = 0x2c53910;
|
||||
|
||||
const uint64_t kGetLockWechatMgr = 0x1c85010;
|
||||
const uint64_t kRequestLockWechat = 0x1c397d0;
|
||||
const uint64_t kRequestUnLockWechat = 0x1c39a70;
|
||||
|
||||
const uint64_t kOnLoginBtnClick = 0x202bc30;
|
||||
|
||||
const uint64_t kGetQRCodeLoginMgr = 0x201e350;
|
||||
|
||||
const uint64_t kUpdateMsg = 0x21421a0;
|
||||
const uint64_t kGetVoiceMgr = 0x1e13320;
|
||||
const uint64_t kChatMsg2NetSceneSendMsg = 0x1b70fd0;
|
||||
const uint64_t kTranslateVoice = 0x2353d50;
|
||||
const uint64_t kNewWebViewPageConfig = 0x1b53ae0;
|
||||
const uint64_t kFreeWebViewPageConfig = 0x1b53d10;
|
||||
const uint64_t kGetWebViewMgr = 0x1b43950;
|
||||
const uint64_t kShowWebView = 0x302ed30;
|
||||
const uint64_t kSetUrl = 0x13dd410;
|
||||
|
||||
const uint64_t kNewPayInfo = 0x1bcd930;
|
||||
const uint64_t kFreePayInfo = 0x1b92450;
|
||||
const uint64_t kTransferConfirm = 0x2f8c750;
|
||||
const uint64_t kTransferRefuse = 0x2f8d340;
|
||||
|
||||
const uint64_t kAddFriend = 0x1f3a350;
|
||||
const uint64_t kVerifyApply = 0x1B3BBE0;
|
||||
const uint64_t kDoDelContact = 0x2310120;
|
||||
|
||||
const uint64_t kGetSearchContactMgr = 0x1f9a730;
|
||||
const uint64_t kStartSearch = 0x22a4200;
|
||||
#else
|
||||
|
@ -54,7 +54,7 @@ class WeChatService : public base::Singleton<WeChatService> {
|
||||
std::wstring GetContactOrChatRoomNickname(const std::wstring& wxid);
|
||||
int64_t GetContactByWxid(const std::wstring& wxid,
|
||||
ContactProfileInner& profile);
|
||||
int64_t DoDownloadTask(uint64_t msg_id);
|
||||
std::wstring DoDownloadTask(uint64_t msg_id);
|
||||
int64_t ForwardPublicMsg(const std::wstring& wxid, const std::wstring& title,
|
||||
const std::wstring& url,
|
||||
const std::wstring& thumb_url,
|
||||
|
BIN
lib/debug/spdlogd.lib
Normal file
BIN
lib/debug/spdlogd.lib
Normal file
Binary file not shown.
@ -1,5 +1,6 @@
|
||||
#include "misc_controller.h"
|
||||
|
||||
#include <locale>
|
||||
#include <codecvt>
|
||||
#include "json_utils.h"
|
||||
#include "nlohmann/json.hpp"
|
||||
#include "spdlog/spdlog.h"
|
||||
@ -158,12 +159,39 @@ std::string MiscController::ConfirmReceipt(std::string params) {
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string MiscController::RefundReceipt(std::string params)
|
||||
{
|
||||
SPDLOG_INFO("RefuseReceipt params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
std::wstring transcationid = jsonutils::GetWStringParam(jp, "transcationId");
|
||||
std::wstring transferid = jsonutils::GetWStringParam(jp, "transferId");
|
||||
int64_t success = wechat::WeChatService::GetInstance().DoRefuseReceipt(
|
||||
wxid, transcationid, transferid);
|
||||
nlohmann::json ret = { {"code", success}, {"data", {}}, {"msg", "success"} };
|
||||
return ret.dump();
|
||||
}
|
||||
|
||||
std::string MiscController::DownloadAttach(std::string params) {
|
||||
SPDLOG_INFO("DownloadAttach params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
int64_t msg_id = jsonutils::GetInt64Param(jp, "msgId");
|
||||
int64_t success = wechat::WeChatService::GetInstance().DoDownloadTask(msg_id);
|
||||
std::wstring result = wechat::WeChatService::GetInstance().DoDownloadTask(msg_id);
|
||||
std::string result_str = std::wstring_convert<std::codecvt_utf8<wchar_t>>().to_bytes(result);
|
||||
nlohmann::json ret = {
|
||||
{"code", 1}, {"data", {"result", result_str}}, {"msg", "success"} };
|
||||
return ret.dump();
|
||||
}
|
||||
std::string MiscController::VerifyApply(std::string params)
|
||||
{
|
||||
SPDLOG_INFO("verifyApply params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
int32_t permission = jsonutils::GetIntParam(jp, "permission");
|
||||
std::wstring v3 = jsonutils::GetWStringParam(jp, "v3");
|
||||
std::wstring v4 = jsonutils::GetWStringParam(jp, "v4");
|
||||
int64_t success = wechat::WeChatService::GetInstance().VerifyApply(v3, v4, permission);
|
||||
nlohmann::json ret = { {"code", success}, {"data", {}}, {"msg", "success"} };
|
||||
return ret.dump();
|
||||
}
|
||||
|
||||
} // namespace wxhelper
|
||||
|
@ -844,9 +844,23 @@ int64_t wechat::WeChatService::GetContactByWxid(const std::wstring& wxid,
|
||||
return success;
|
||||
}
|
||||
|
||||
std::wstring combineAndRemoveDuplicate(const std::wstring& basePath, const std::wstring& resultPath) {
|
||||
std::wstring cleanedBasePath = basePath;
|
||||
if (cleanedBasePath.back() == L'\\') {
|
||||
cleanedBasePath.pop_back();
|
||||
}
|
||||
size_t pos = resultPath.find(cleanedBasePath);
|
||||
if (pos != std::wstring::npos) {
|
||||
std::wstring adjustedResultPath = resultPath.substr(pos + cleanedBasePath.length());
|
||||
return cleanedBasePath + L'\\' + adjustedResultPath;
|
||||
}
|
||||
|
||||
return basePath + L'\\' + resultPath;
|
||||
}
|
||||
TODO("DoDownloadTask")
|
||||
int64_t wechat::WeChatService::DoDownloadTask(uint64_t msg_id) {
|
||||
int64_t success = -1;
|
||||
|
||||
std::wstring wechat::WeChatService::DoDownloadTask(uint64_t msg_id) {
|
||||
|
||||
uint64_t get_by_local_id_addr = base_addr_ + offset::kGetMgrByPrefixLocalId;
|
||||
func::__GetMgrByPrefixLocalId get_by_local_id =
|
||||
(func::__GetMgrByPrefixLocalId)get_by_local_id_addr;
|
||||
@ -889,8 +903,7 @@ int64_t wechat::WeChatService::DoDownloadTask(uint64_t msg_id) {
|
||||
int64_t local_id =
|
||||
wechat::WeChatDb::GetInstance().GetLocalIdByMsgId(msg_id, index);
|
||||
if (local_id <= 0 || index >> 32 == 0) {
|
||||
success = -2;
|
||||
return success;
|
||||
return L"-2";
|
||||
}
|
||||
char* chat_msg = base::utils::WxHeapAlloc<char>(0x460);
|
||||
LARGE_INTEGER l;
|
||||
@ -909,14 +922,10 @@ int64_t wechat::WeChatService::DoDownloadTask(uint64_t msg_id) {
|
||||
|
||||
if (current_data_path.length > 0) {
|
||||
save_path += current_data_path.ptr;
|
||||
save_path += L"wxhelper";
|
||||
} else {
|
||||
return -1;
|
||||
return L"-1";
|
||||
}
|
||||
|
||||
if (!wxutils::FindOrCreateDirectory(save_path)) {
|
||||
return -3;
|
||||
}
|
||||
int64_t type = *(int64_t*)(chat_msg + 0x38);
|
||||
wchar_t* content = *(wchar_t**)(chat_msg + 0x88);
|
||||
DWORD len = *(DWORD*)(chat_msg + 0x94);
|
||||
@ -925,19 +934,20 @@ int64_t wechat::WeChatService::DoDownloadTask(uint64_t msg_id) {
|
||||
|
||||
switch (type) {
|
||||
case 0x3: {
|
||||
save_path += L"\\image";
|
||||
if (!wxutils::FindOrCreateDirectory(save_path)) {
|
||||
return -3;
|
||||
if (!save_path.empty() && save_path.back() == L'\\') {
|
||||
save_path.pop_back();
|
||||
}
|
||||
size_t pos = save_path.find_last_of(L'\\');
|
||||
if (pos != std::wstring::npos) {
|
||||
save_path = save_path.substr(0, pos + 1);
|
||||
}
|
||||
thumb_path = save_path + L"\\" + std::to_wstring(msg_id) + L"_t.dat";
|
||||
save_path = save_path + L"\\" + std::to_wstring(msg_id) + L".dat";
|
||||
break;
|
||||
}
|
||||
case 0x3E:
|
||||
case 0x2B: {
|
||||
save_path += L"\\video";
|
||||
if (!wxutils::FindOrCreateDirectory(save_path)) {
|
||||
return -3;
|
||||
return L"-3" ;
|
||||
}
|
||||
thumb_path = save_path + L"\\" + std::to_wstring(msg_id) + L".jpg";
|
||||
save_path = save_path + L"\\" + std::to_wstring(msg_id) + L".mp4";
|
||||
@ -947,7 +957,7 @@ int64_t wechat::WeChatService::DoDownloadTask(uint64_t msg_id) {
|
||||
case 0x31: {
|
||||
save_path += L"\\file";
|
||||
if (!wxutils::FindOrCreateDirectory(save_path)) {
|
||||
return -3;
|
||||
return L"-3";
|
||||
}
|
||||
char* p_xml_app_msg = base::utils::WxHeapAlloc<char>(0x3000);
|
||||
uint64_t xml_msg =
|
||||
@ -955,7 +965,7 @@ int64_t wechat::WeChatService::DoDownloadTask(uint64_t msg_id) {
|
||||
uint64_t result =
|
||||
xml_to_app_info(xml_msg, reinterpret_cast<uint64_t>(we_content), 1);
|
||||
if (result != 1) {
|
||||
return -4;
|
||||
return L"-4";
|
||||
}
|
||||
std::wstring file_name = wxutils::ReadWstring(xml_msg + 0x70);
|
||||
save_path =
|
||||
@ -966,17 +976,14 @@ int64_t wechat::WeChatService::DoDownloadTask(uint64_t msg_id) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
prototype::WeChatString* we_save_path = BuildWechatString(save_path);
|
||||
prototype::WeChatString* we_thumb_path = BuildWechatString(thumb_path);
|
||||
|
||||
int temp = 1;
|
||||
memcpy(chat_msg + 0x280, we_thumb_path, sizeof(prototype::WeChatString));
|
||||
memcpy(chat_msg + 0x2A0, we_save_path, sizeof(prototype::WeChatString));
|
||||
memcpy(chat_msg + 0x40C, &temp, sizeof(temp));
|
||||
UINT64 mgr = get_pre_download_mgr();
|
||||
success = push_attach_task(mgr, p_chat_msg, 0, 1);
|
||||
INT64 success = push_attach_task(mgr, p_chat_msg, 0, 1);
|
||||
std::wstring result = *(wchar_t**)(chat_msg + 0x2A0);
|
||||
free_chat_msg(p_chat_msg);
|
||||
|
||||
return success;
|
||||
return save_path + result;
|
||||
}
|
||||
|
||||
TODO("ForwardPublicMsg")
|
||||
@ -1551,7 +1558,7 @@ int64_t wechat::WeChatService::DoConfirmReceipt(
|
||||
new_pay_info(reinterpret_cast<uint64_t>(&pay_info));
|
||||
memcpy(&pay_info[0x30], &transcation_id, sizeof(transcation_id));
|
||||
memcpy(&pay_info[0x58], &transfer_id, sizeof(transfer_id));
|
||||
// memcpy(&pay_info[0xA0], &recv_id, sizeof(recv_id));
|
||||
memcpy(&pay_info[0xA0], &recv_id, sizeof(recv_id));
|
||||
success = do_confirm(reinterpret_cast<uint64_t>(&pay_info), reinterpret_cast<uint64_t>(&recv_id));
|
||||
|
||||
free_pay_info(reinterpret_cast<uint64_t>(&pay_info));
|
||||
@ -1582,8 +1589,9 @@ int64_t wechat::WeChatService::DoRefuseReceipt(
|
||||
new_pay_info(reinterpret_cast<uint64_t>(&pay_info));
|
||||
memcpy(&pay_info[0x30], &transcation_id, sizeof(transcation_id));
|
||||
memcpy(&pay_info[0x58], &transfer_id, sizeof(transfer_id));
|
||||
// memcpy(&pay_info[0xA0], &recv_id, sizeof(recv_id));
|
||||
memcpy(&pay_info[0xA0], &recv_id, sizeof(recv_id));
|
||||
success = do_refuse(reinterpret_cast<uint64_t>(&pay_info), reinterpret_cast<uint64_t>(&recv_id));
|
||||
|
||||
free_pay_info(reinterpret_cast<uint64_t>(&pay_info));
|
||||
return success;
|
||||
}
|
||||
|
BIN
version.png
Normal file
BIN
version.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
@ -111,16 +111,16 @@
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WECHAT_VERSION=391119;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WECHAT_VERSION=391125;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
|
||||
<LanguageStandard>stdcpp14</LanguageStandard>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>inc\nlohmann;inc\tinyxml2;inc\mongoose;inc\lz4;inc\Detours;inc\include;inc\base64;inc;inc\spdlog;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -139,7 +139,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WECHAT_VERSION=391119;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WECHAT_VERSION=391125;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
|
@ -72,6 +72,15 @@
|
||||
<ClCompile Include="src\hook.cc">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\memory.cc">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\thread_pool.cc">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\utils.cc">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource.h">
|
||||
|
Loading…
x
Reference in New Issue
Block a user