feat: 3.9.11.19
This commit is contained in:
1 parent
c58293edc5
commit
1c0bdaf73d
16 files changed
+1536
-127
No files matched your search
Vendored
+1
-1
Submodule app/3rdparty/Detours updated: 4b8c659f54...f9204902c3.
@@ -7,6 +7,13 @@
|
||||
namespace base {
|
||||
|
||||
namespace utils {
|
||||
|
||||
#define STRINGIFY(S) #S
|
||||
#define DEFER_STRINGIFY(S) STRINGIFY(S)
|
||||
#define PRAGMA_MESSAGE(MSG) _Pragma(STRINGIFY(message(MSG)))
|
||||
#define FORMATTED_MESSAGE(MSG) "warning [TODO-" DEFER_STRINGIFY(__COUNTER__) "] " MSG " : " __FILE__ "(" DEFER_STRINGIFY(__LINE__) ")"
|
||||
#define TODO(MSG) PRAGMA_MESSAGE(FORMATTED_MESSAGE(MSG))
|
||||
|
||||
std::wstring Utf8ToWstring(const std::string &str);
|
||||
|
||||
std::string WstringToUtf8(const std::wstring &str);
|
||||
|
||||
@@ -30,7 +30,7 @@ add_subdirectory(../base base)
|
||||
|
||||
add_library(wxhelper SHARED ${CPP_FILES} ${ASM_FILES})
|
||||
|
||||
target_compile_definitions(wxhelper PRIVATE WECHAT_VERSION=391019)
|
||||
target_compile_definitions(wxhelper PRIVATE WECHAT_VERSION=391119)
|
||||
|
||||
# target_include_directories(wxhelper
|
||||
# PRIVATE ../base/src/include
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "wechat_interface.h"
|
||||
#include "wechat_service.h"
|
||||
#include "utils.h"
|
||||
namespace jsonutils = wxhelper::jsonutils;
|
||||
namespace wxhelper {
|
||||
|
||||
@@ -20,6 +21,7 @@ std::string ChatController::SendTextMsg(std::string params) {
|
||||
}
|
||||
|
||||
std::string ChatController::SendImageMsg(std::string params) {
|
||||
SPDLOG_INFO("SendImageMsg params={}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
std::wstring image_path = jsonutils::GetWStringParam(jp, "imagePath");
|
||||
@@ -30,6 +32,7 @@ std::string ChatController::SendImageMsg(std::string params) {
|
||||
}
|
||||
|
||||
std::string ChatController::SendFileMsg(std::string params) {
|
||||
SPDLOG_INFO("SendFileMsg params={}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
std::wstring file_path = jsonutils::GetWStringParam(jp, "filePath");
|
||||
@@ -40,6 +43,7 @@ std::string ChatController::SendFileMsg(std::string params) {
|
||||
}
|
||||
|
||||
std::string ChatController::SendAtText(std::string params) {
|
||||
SPDLOG_INFO("SendAtText params={}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring chat_room_id = jsonutils::GetWStringParam(jp, "chatRoomId");
|
||||
std::vector<std::wstring> wxids = jsonutils::GetArrayParam(jp, "wxids");
|
||||
@@ -51,6 +55,7 @@ std::string ChatController::SendAtText(std::string params) {
|
||||
}
|
||||
|
||||
std::string ChatController::SendMultiAtText(std::string params) {
|
||||
SPDLOG_INFO("SendMultiAtText params={}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
nlohmann::json array = jp["at"];
|
||||
std::vector<std::pair<std::wstring, std::wstring>> at;
|
||||
@@ -67,19 +72,39 @@ std::string ChatController::SendMultiAtText(std::string params) {
|
||||
return ret.dump();
|
||||
}
|
||||
|
||||
|
||||
std::string ChatController::SendCustomEmotion(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("SendCustomEmotion params={}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
std::wstring file_path = jsonutils::GetWStringParam(jp, "filePath");
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().SendCustomEmotion(file_path, wxid);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
|
||||
TODO("")
|
||||
std::string ChatController::SendApplet(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("SendApplet params={}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
std::wstring waid_concat = jsonutils::GetWStringParam(jp, "waidConcat");
|
||||
std::wstring waid = jsonutils::GetWStringParam(jp, "waid");
|
||||
std::wstring app_wxid = jsonutils::GetWStringParam(jp, "appletWxid");
|
||||
std::wstring json_param = jsonutils::GetWStringParam(jp, "jsonParam");
|
||||
std::wstring head_url = jsonutils::GetWStringParam(jp, "headImgUrl");
|
||||
std::wstring main_img = jsonutils::GetWStringParam(jp, "mainImg");
|
||||
std::wstring index_page = jsonutils::GetWStringParam(jp, "indexPage");
|
||||
int64_t success = wechat::WeChatService::GetInstance().SendApplet(
|
||||
wxid, waid_concat, waid, waid, app_wxid, json_param, head_url, main_img,
|
||||
index_page);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
|
||||
std::string ChatController::SendPatMsg(std::string params) {
|
||||
SPDLOG_INFO("SendPatMsg params={}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring room_id = jsonutils::GetWStringParam(jp, "receiver");
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
@@ -91,37 +116,55 @@ std::string ChatController::SendPatMsg(std::string params) {
|
||||
}
|
||||
|
||||
std::string ChatController::ForwardMsg(std::string params) {
|
||||
SPDLOG_INFO("ForwardMsg params={}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
int64_t msg_id = jsonutils::GetInt64Param(jp, "msgId");
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().ForwardMsg(msg_id, wxid);
|
||||
nlohmann::json ret = {
|
||||
{"code", success}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
|
||||
std::string ChatController::ForwardPublicMsgByMsgId(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("ForwardPublicMsgByMsgId params={}", params);
|
||||
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
int64_t msg_id = jsonutils::GetInt64Param(jp, "msgId");
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().ForwardPublicMsgByMsgId(wxid,
|
||||
msg_id);
|
||||
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
|
||||
std::string ChatController::ForwardPublicMsg(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("ForwardPublicMsg params={}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
std::wstring appname = jsonutils::GetWStringParam(jp, "appName");
|
||||
std::wstring username = jsonutils::GetWStringParam(jp, "userName");
|
||||
std::wstring title = jsonutils::GetWStringParam(jp, "title");
|
||||
std::wstring url = jsonutils::GetWStringParam(jp, "url");
|
||||
std::wstring thumburl = jsonutils::GetWStringParam(jp, "thumbUrl");
|
||||
std::wstring digest = jsonutils::GetWStringParam(jp, "digest");
|
||||
INT64 success = wechat::WeChatService::GetInstance().ForwardPublicMsg(
|
||||
wxid, title, url, thumburl, username, appname, digest);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
|
||||
std::string ChatController::GetContactOrChatRoomNickname(std::string params) {
|
||||
SPDLOG_INFO("GetContactOrChatRoomNickname params={}", params);
|
||||
int64_t success = -1;
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
std::wstring nickname =
|
||||
wechat::WeChatService::GetInstance().GetContactOrChatRoomNickname(wxid);
|
||||
nlohmann::json ret = {{"code", success},
|
||||
{"data", {"nickname", nickname}},
|
||||
{"msg", "Not Implemented"}};
|
||||
nlohmann::json ret = {
|
||||
{"code", success}, {"data", {"nickname", nickname}}, {"msg", "success"}};
|
||||
|
||||
return ret.dump();
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "wechat_interface.h"
|
||||
#include "wechat_service.h"
|
||||
#include "utils.h"
|
||||
namespace wxhelper {
|
||||
std::string ChatRoomController::GetChatRoomDetailInfo(std::string params) {
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
@@ -31,7 +32,8 @@ std::string ChatRoomController::GetMemberFromChatRoom(std::string params) {
|
||||
wechat::ChatRoomMemberInner member;
|
||||
int64_t success = wechat::WeChatService::GetInstance().GetMemberFromChatRoom(
|
||||
room_id, member);
|
||||
nlohmann::json ret_data = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
nlohmann::json ret_data = {
|
||||
{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
if (success > 0) {
|
||||
nlohmann::json member_info = {
|
||||
{"admin", member.admin},
|
||||
@@ -56,8 +58,7 @@ std::string ChatRoomController::AddMemberToChatRoom(std::string params) {
|
||||
}
|
||||
int64_t success = wechat::WeChatService::GetInstance().AddMemberToChatRoom(
|
||||
room_id, wxid_list);
|
||||
nlohmann::json ret = {
|
||||
{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string ChatRoomController::DelMemberFromChatRoom(std::string params) {
|
||||
@@ -70,44 +71,80 @@ std::string ChatRoomController::DelMemberFromChatRoom(std::string params) {
|
||||
for (unsigned int i = 0; i < wxids.size(); i++) {
|
||||
wxid_list.push_back(wxids[i]);
|
||||
}
|
||||
INT64 success = wechat::WeChatService::GetInstance().DelMemberFromChatRoom(
|
||||
int64_t success = wechat::WeChatService::GetInstance().DelMemberFromChatRoom(
|
||||
room_id, wxid_list);
|
||||
nlohmann::json ret_data = {
|
||||
{"code", success}, {"msg", "success"}, {"data", {}}};
|
||||
return ret_data.dump();
|
||||
}
|
||||
std::string ChatRoomController::CreateChatRoom(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("CreateChatRoom params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::vector<std::wstring> wxids = jsonutils::GetArrayParam(jp, "memberIds");
|
||||
int64_t success = wechat::WeChatService::GetInstance().CreateChatRoom(wxids);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string ChatRoomController::QuitChatRoom(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("QuitChatRoom params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring room_id = jsonutils::GetWStringParam(jp, "chatRoomId");
|
||||
int64_t success = wechat::WeChatService::GetInstance().QuitChatRoom(room_id);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string ChatRoomController::InviteMemberToChatRoom(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("InviteMemberToChatRoom params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring room_id = jsonutils::GetWStringParam(jp, "chatRoomId");
|
||||
std::vector<std::wstring> wxids = jsonutils::GetArrayParam(jp, "memberIds");
|
||||
int64_t success = wechat::WeChatService::GetInstance().InviteMemberToChatRoom(
|
||||
room_id, wxids);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string ChatRoomController::TopMsg(std::string params) {
|
||||
return std::string();
|
||||
SPDLOG_INFO("TopMsg params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
int64_t msg_id = jsonutils::GetInt64Param(jp, "msgId");
|
||||
int64_t success = wechat::WeChatService::GetInstance().SetTopMsg(msg_id);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string ChatRoomController::RemoveTopMsg(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("RemoveTopMsg params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring room_id = jsonutils::GetWStringParam(jp, "chatRoomId");
|
||||
int64_t msg_id = jsonutils::GetInt64Param(jp, "msgId");
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().RemoveTopMsg(room_id, msg_id);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string ChatRoomController::GetChatRoomMemberNickname(std::string params) {
|
||||
SPDLOG_INFO("GetChatRoomMemberNickname params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring room_id = jsonutils::GetWStringParam(jp, "chatRoomId");
|
||||
std::wstring member_id = jsonutils::GetWStringParam(jp, "memberId");
|
||||
std::wstring name = wechat::WeChatService::GetInstance().GetChatRoomMemberNickname(room_id,
|
||||
member_id);
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
{"code", 1},
|
||||
{"data", {{"nickname", base::utils::WstringToUtf8(name)}}},
|
||||
{"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string ChatRoomController::ModifyChatRoomMemberNickName(
|
||||
std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("ModifyChatRoomMemberNickName params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring room_id = jsonutils::GetWStringParam(jp, "chatRoomId");
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
std::wstring nickName = jsonutils::GetWStringParam(jp, "nickName");
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().ModChatRoomMemberNickName(
|
||||
room_id, wxid, nickName);
|
||||
nlohmann::json ret = {{"code", success}, {"msg", "success"}, {"data", {}}};
|
||||
return ret.dump();
|
||||
}
|
||||
} // namespace wxhelper
|
||||
@@ -1,13 +1,14 @@
|
||||
#include "contacts_controller.h"
|
||||
|
||||
#include "json_utils.h"
|
||||
#include "nlohmann/json.hpp"
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "wechat_interface.h"
|
||||
#include "json_utils.h"
|
||||
#include "wechat_service.h"
|
||||
namespace jsonutils = wxhelper::jsonutils;
|
||||
|
||||
std::string wxhelper::ContactsController::GetContactList(std::string params) {
|
||||
namespace wxhelper {
|
||||
std::string ContactsController::GetContactList(std::string params) {
|
||||
SPDLOG_INFO("GetContactList params:{}", params);
|
||||
std::vector<wechat::ContactInner> vec;
|
||||
int64_t success = wechat::WeChatService::GetInstance().GetContacts(vec);
|
||||
nlohmann::json ret_data = {
|
||||
@@ -34,33 +35,83 @@ std::string wxhelper::ContactsController::GetContactList(std::string params) {
|
||||
return ret_data.dump();
|
||||
}
|
||||
|
||||
std::string wxhelper::ContactsController::GetContactProfile(
|
||||
std::string ContactsController::GetContactProfile(
|
||||
std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("GetContactProfile params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
wechat::ContactProfileInner profile;
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().GetContactByWxid(wxid, profile);
|
||||
nlohmann::json ret = {{"code", success}, {"msg", "success"}, {"data", {}}};
|
||||
if (success == 1) {
|
||||
nlohmann::json contact_profile = {
|
||||
{"account", profile.account}, {"headImage", profile.head_image},
|
||||
{"nickname", profile.nickname}, {"v3", profile.v3},
|
||||
{"wxid", profile.wxid},
|
||||
};
|
||||
ret["data"] = contact_profile;
|
||||
}
|
||||
|
||||
return ret.dump();
|
||||
}
|
||||
|
||||
std::string wxhelper::ContactsController::DelContact(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
std::string ContactsController::DelContact(std::string params) {
|
||||
SPDLOG_INFO("DelContact params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
int64_t success = wechat::WeChatService::GetInstance().DelContact(wxid);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
|
||||
std::string wxhelper::ContactsController::SearchContact(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
std::string ContactsController::SearchContact(std::string params) {
|
||||
SPDLOG_INFO("SearchContact params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring keyword = jsonutils::GetWStringParam(jp, "keyword");
|
||||
wechat::SearchContactInner contact;
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().SearchContact(keyword, contact);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
if (success == 1) {
|
||||
nlohmann::json info = {
|
||||
{"bigImage", contact.big_image},
|
||||
{"smallImage", contact.small_image},
|
||||
{"city", contact.city},
|
||||
{"nation", contact.nation},
|
||||
{"nickname", contact.nickname},
|
||||
{"province", contact.province},
|
||||
{"sex", contact.sex},
|
||||
{"signature", contact.signature},
|
||||
{"v2", contact.v2},
|
||||
{"v3", contact.v3},
|
||||
};
|
||||
ret["data"] = info;
|
||||
}
|
||||
|
||||
return ret.dump();
|
||||
}
|
||||
|
||||
std::string wxhelper::ContactsController::AddContact(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
std::string ContactsController::AddContact(std::string params) {
|
||||
SPDLOG_INFO("AddContact params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
std::wstring msg = jsonutils::GetWStringParam(jp, "msg");
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().AddFriendByWxid(wxid, msg);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
|
||||
std::string wxhelper::ContactsController::VerifyApply(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
std::string ContactsController::VerifyApply(std::string params) {
|
||||
SPDLOG_INFO("VerifyApply params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring v3 = jsonutils::GetWStringParam(jp, "v3");
|
||||
std::wstring v4 = jsonutils::GetWStringParam(jp, "v4");
|
||||
int32_t permission = jsonutils::GetIntParam(jp, "permission");
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().VerifyApply(v3, v4, permission);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef WXHELPER_HTTP_ROUTER_H_
|
||||
#define WXHELPER_HTTP_ROUTER_H_
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
|
||||
#include "singleton.h"
|
||||
|
||||
@@ -38,38 +38,65 @@ std::string MiscController::GetUserInfo(std::string params) {
|
||||
return ret.dump();
|
||||
}
|
||||
std::string MiscController::GetSNSFirstPage(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
int64_t success = wechat::WeChatService::GetInstance().GetSNSFirstPage();
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string MiscController::GetSNSNextPage(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("GetSNSNextPage params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
int64_t sns_id = jsonutils::GetInt64Param(jp, "snsId");
|
||||
int64_t success = wechat::WeChatService::GetInstance().GetSNSNextPage(sns_id);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string MiscController::AddFavFromMsg(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("AddFavFromMsg params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
int64_t sns_id = jsonutils::GetInt64Param(jp, "msgId");
|
||||
int64_t success = wechat::WeChatService::GetInstance().AddFavFromMsg(sns_id);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string MiscController::AddFavFromImage(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("AddFavFromImage params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring wxid = jsonutils::GetWStringParam(jp, "wxid");
|
||||
std::wstring image_path = jsonutils::GetWStringParam(jp, "imagePath");
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().AddFavFromImage(wxid, image_path);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string MiscController::DecodeImage(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("DecodeImage params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring file_path = jsonutils::GetWStringParam(jp, "filePath");
|
||||
std::wstring store_dir = jsonutils::GetWStringParam(jp, "storeDir");
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().DecodeImage(file_path, store_dir);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string MiscController::GetVoiceByMsgId(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("GetVoiceByMsgId params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
int64_t msg_id = jsonutils::GetInt64Param(jp, "msgId");
|
||||
std::wstring store_dir = jsonutils::GetWStringParam(jp, "storeDir");
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().GetVoiceByDB(msg_id, store_dir);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string MiscController::DoOcrTask(std::string params) {
|
||||
SPDLOG_INFO("DoOcrTask params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring image_path = jsonutils::GetWStringParam(jp, "imagePath");
|
||||
std::string text("");
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().DoOCRTask(image_path, text);
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
{"code", success}, {"data", {{"content", text}}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string MiscController::LockWeChat(std::string params) {
|
||||
@@ -94,6 +121,7 @@ std::string MiscController::GetLoginUrl(std::string params) {
|
||||
return ret.dump();
|
||||
}
|
||||
std::string MiscController::TranslateVoice(std::string params) {
|
||||
SPDLOG_INFO("TranslateVoice params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
int64_t msg_id = jsonutils::GetInt64Param(jp, "msgId");
|
||||
int64_t success = wechat::WeChatService::GetInstance().TranslateVoice(msg_id);
|
||||
@@ -110,23 +138,32 @@ std::string MiscController::GetTranslateVoiceText(std::string params) {
|
||||
return ret_data.dump();
|
||||
}
|
||||
std::string MiscController::OpenUrlByWeChat(std::string params) {
|
||||
SPDLOG_INFO("OpenUrlByWeChat params:{}", params);
|
||||
nlohmann::json jp = nlohmann::json::parse(params);
|
||||
std::wstring url = jsonutils::GetWStringParam(jp, "url");
|
||||
int flag = jsonutils::GetIntParam(jp, "flag");
|
||||
int64_t success =
|
||||
wechat::WeChatService::GetInstance().OpenUrlByWeChatBrowser(url, flag);
|
||||
nlohmann::json ret = {
|
||||
{"code", success}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string MiscController::ConfirmReceipt(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
SPDLOG_INFO("ConfirmReceipt 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().DoConfirmReceipt(
|
||||
wxid, transcationid, transferid);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
std::string MiscController::DownloadAttach(std::string params) {
|
||||
nlohmann::json ret = {
|
||||
{"code", 200}, {"data", {}}, {"msg", "Not Implemented"}};
|
||||
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);
|
||||
nlohmann::json ret = {{"code", success}, {"data", {}}, {"msg", "success"}};
|
||||
return ret.dump();
|
||||
}
|
||||
} // namespace wxhelper
|
||||
@@ -5,6 +5,7 @@ namespace wechat {
|
||||
#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
|
||||
#ifndef WECHAT_VERSION
|
||||
#error " WECHAT_VERSION not defined ."
|
||||
#endif
|
||||
@@ -349,6 +350,113 @@ const uint64_t kFreeWebViewPageConfig = 0x951520;
|
||||
const uint64_t kGetWebViewMgr = 0x9412d0;
|
||||
const uint64_t kShowWebView = 0x1d236b0;
|
||||
const uint64_t kSetUrl = 0x13dd410;
|
||||
#elif WECHAT_VERSION == V_3_9_11_19
|
||||
const uint64_t kGetAccountServiceMgr = 0x1b50d00;
|
||||
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 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 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 kGPInstance = 0x58dd300;
|
||||
const uint64_t kMultiDBMgr = 0x593abf8;
|
||||
const uint64_t kPublicMsgMgr = 0x5938198;
|
||||
const uint64_t kFavoriteStorageMgr = 0x593b790;
|
||||
const uint64_t kHardLinkMgr = 0x593ab28;
|
||||
|
||||
const uint64_t kChatRoomMgr = 0x1b7f100;
|
||||
const uint64_t kGetChatRoomDetailInfo = 0x2160bb0;
|
||||
const uint64_t kNewChatRoomInfo = 0x2505120;
|
||||
const uint64_t kFreeChatRoomInfo = 0x2505300;
|
||||
const uint64_t kDoAddMemberToChatRoom = 0x21505b0;
|
||||
const uint64_t kDoModChatRoomMemberNickName = 0x215a360;
|
||||
const uint64_t kDelMemberFromChatRoom = 0x2150bf0;
|
||||
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 = 0x214ff90;
|
||||
const uint64_t kHookLog = 0x1304e60;
|
||||
|
||||
const uint64_t kCreateChatRoom = 0x214fc60;
|
||||
const uint64_t kQuitChatRoom = 0x215ac00;
|
||||
const uint64_t kForwardMsg = 0x22c1590;
|
||||
|
||||
const uint64_t kOnSnsTimeLineSceneFinish = 0x1a73150;
|
||||
const uint64_t kSNSGetFirstPage = 0x2e1bec0;
|
||||
const uint64_t kSNSGetNextPageScene = 0x2e41a70;
|
||||
const uint64_t kSNSDataMgr = 0x21dd6b0;
|
||||
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 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 = 0x9996f0;
|
||||
const uint64_t kPushAttachTask = 0x9c0080;
|
||||
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 = 0x919ca0;
|
||||
const uint64_t kFreeWAUpdatableMsgInfo = 0x8fc230;
|
||||
const uint64_t kSendPatMsg = 0x2ca9790;
|
||||
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 = 0x11217e0;
|
||||
const uint64_t kNewWebViewPageConfig = 0x9512f0;
|
||||
const uint64_t kFreeWebViewPageConfig = 0x951520;
|
||||
const uint64_t kGetWebViewMgr = 0x1b43950;
|
||||
const uint64_t kShowWebView = 0x302ed30;
|
||||
const uint64_t kSetUrl = 0x13dd410;
|
||||
#else
|
||||
#ifdef WECHAT_VERSION
|
||||
#error "Unsupported WeChat version."
|
||||
|
||||
@@ -128,6 +128,31 @@ struct ContactProfileInner {
|
||||
: wxid(""), account(""), v3(""), nickname(""), head_image("") {}
|
||||
};
|
||||
|
||||
struct SearchContactInner {
|
||||
std::string big_image;
|
||||
std::string small_image;
|
||||
std::string city;
|
||||
std::string nation;
|
||||
std::string province;
|
||||
std::string signature;
|
||||
std::string v2;
|
||||
std::string v3;
|
||||
std::string nickname;
|
||||
int32_t sex;
|
||||
SearchContactInner()
|
||||
: big_image(""),
|
||||
small_image(""),
|
||||
city(""),
|
||||
nation(""),
|
||||
province(""),
|
||||
signature(""),
|
||||
sex(-1),
|
||||
v2(""),
|
||||
v3(""),
|
||||
nickname("") {}
|
||||
};
|
||||
|
||||
|
||||
namespace function {
|
||||
//hook
|
||||
typedef uint64_t(*__DoAddMsg)(uint64_t, uint64_t, uint64_t);
|
||||
|
||||
@@ -7,6 +7,20 @@
|
||||
#include "utils.h"
|
||||
#include "wechat_db.h"
|
||||
#include "wxutils.h"
|
||||
|
||||
#define BUFSIZE 1024
|
||||
#define JPEG0 0xFF
|
||||
#define JPEG1 0xD8
|
||||
#define JPEG2 0xFF
|
||||
#define PNG0 0x89
|
||||
#define PNG1 0x50
|
||||
#define PNG2 0x4E
|
||||
#define BMP0 0x42
|
||||
#define BMP1 0x4D
|
||||
#define GIF0 0x47
|
||||
#define GIF1 0x49
|
||||
#define GIF2 0x46
|
||||
|
||||
namespace offset = wechat::offset;
|
||||
namespace prototype = wechat::prototype;
|
||||
namespace func = wechat::function;
|
||||
@@ -269,7 +283,7 @@ int64_t wechat::WeChatService::SendImageMsg(const std::wstring& wxid,
|
||||
uint64_t temp2 = 0;
|
||||
uint64_t temp3 = 1;
|
||||
uint64_t* flag[10] = {};
|
||||
flag[0] = reinterpret_cast<uint64_t*>(temp3);
|
||||
flag[0] = reinterpret_cast<uint64_t*>(temp3);
|
||||
flag[8] = &temp1;
|
||||
flag[9] = &temp2;
|
||||
flag[1] = reinterpret_cast<uint64_t*>(p_chat_msg_temp);
|
||||
@@ -385,27 +399,33 @@ int64_t wechat::WeChatService::GetContacts(std::vector<ContactInner>& vec) {
|
||||
|
||||
int64_t wechat::WeChatService::GetChatRoomDetailInfo(
|
||||
const std::wstring& room_id, ChatRoomInfoInner& room_info) {
|
||||
int64_t success = -1;
|
||||
int64_t success = -1;
|
||||
prototype::WeChatString chat_room_id(room_id);
|
||||
int64_t base_addr = wxutils::GetWeChatWinBase();
|
||||
uint64_t get_chat_room_mgr_addr = base_addr + offset::kChatRoomMgr;
|
||||
uint64_t get_chat_room_detail_addr = base_addr + offset::kGetChatRoomDetailInfo;
|
||||
uint64_t get_chat_room_detail_addr =
|
||||
base_addr + offset::kGetChatRoomDetailInfo;
|
||||
uint64_t create_chat_room_info_addr = base_addr + offset::kNewChatRoomInfo;
|
||||
uint64_t free_chat_room_info_addr = base_addr + offset::kFreeChatRoomInfo;
|
||||
|
||||
|
||||
func::__GetChatRoomMgr get_chat_room_mgr = (func::__GetChatRoomMgr)get_chat_room_mgr_addr;
|
||||
func::__NewChatRoomInfo new_chat_room_info = (func::__NewChatRoomInfo)create_chat_room_info_addr;
|
||||
func::__FreeChatRoomInfo free_chat_room_info = (func::__FreeChatRoomInfo)free_chat_room_info_addr;
|
||||
func::__GetChatRoomDetailInfo get_chat_room_detail = (func::__GetChatRoomDetailInfo)get_chat_room_detail_addr;
|
||||
func::__GetChatRoomMgr get_chat_room_mgr =
|
||||
(func::__GetChatRoomMgr)get_chat_room_mgr_addr;
|
||||
func::__NewChatRoomInfo new_chat_room_info =
|
||||
(func::__NewChatRoomInfo)create_chat_room_info_addr;
|
||||
func::__FreeChatRoomInfo free_chat_room_info =
|
||||
(func::__FreeChatRoomInfo)free_chat_room_info_addr;
|
||||
func::__GetChatRoomDetailInfo get_chat_room_detail =
|
||||
(func::__GetChatRoomDetailInfo)get_chat_room_detail_addr;
|
||||
|
||||
char chat_room_info[0x144] = {0};
|
||||
|
||||
uint64_t new_room_info = new_chat_room_info(reinterpret_cast<uint64_t>(&chat_room_info));
|
||||
|
||||
uint64_t new_room_info =
|
||||
new_chat_room_info(reinterpret_cast<uint64_t>(&chat_room_info));
|
||||
|
||||
uint64_t mgr = get_chat_room_mgr();
|
||||
success = get_chat_room_detail(mgr,reinterpret_cast<uint64_t>(&chat_room_id),new_room_info,1);
|
||||
|
||||
success = get_chat_room_detail(mgr, reinterpret_cast<uint64_t>(&chat_room_id),
|
||||
new_room_info, 1);
|
||||
|
||||
room_info.chat_room_id = wxutils::ReadWstringThenConvert(new_room_info + 0x8);
|
||||
room_info.notice = wxutils::ReadWstringThenConvert(new_room_info + 0x28);
|
||||
room_info.admin = wxutils::ReadWstringThenConvert(new_room_info + 0x48);
|
||||
@@ -425,10 +445,10 @@ int64_t wechat::WeChatService::AddMemberToChatRoom(
|
||||
func::__DoAddMemberToChatRoom add_members =
|
||||
(func::__DoAddMemberToChatRoom)add_members_addr;
|
||||
|
||||
prototype::WeChatString *chat_room_id = (prototype::WeChatString *)HeapAlloc(
|
||||
prototype::WeChatString* chat_room_id = (prototype::WeChatString*)HeapAlloc(
|
||||
GetProcessHeap(), 0, sizeof(prototype::WeChatString));
|
||||
wchar_t *p_chat_room_id =
|
||||
(wchar_t *)HeapAlloc(GetProcessHeap(), 0, (room_id.size() + 1) * 2);
|
||||
wchar_t* p_chat_room_id =
|
||||
(wchar_t*)HeapAlloc(GetProcessHeap(), 0, (room_id.size() + 1) * 2);
|
||||
wmemcpy(p_chat_room_id, room_id.c_str(), room_id.size() + 1);
|
||||
chat_room_id->ptr = p_chat_room_id;
|
||||
chat_room_id->length = static_cast<int32_t>(room_id.size());
|
||||
@@ -438,7 +458,7 @@ int64_t wechat::WeChatService::AddMemberToChatRoom(
|
||||
|
||||
std::vector<prototype::WeChatString> member_list;
|
||||
uint64_t temp[2] = {0};
|
||||
wechat::VectorInner *list = (wechat::VectorInner *)&member_list;
|
||||
wechat::VectorInner* list = (wechat::VectorInner*)&member_list;
|
||||
int64_t members_ptr = (int64_t)&list->start;
|
||||
for (int i = 0; i < members.size(); i++) {
|
||||
prototype::WeChatString member(members[i]);
|
||||
@@ -454,7 +474,18 @@ int64_t wechat::WeChatService::AddMemberToChatRoom(
|
||||
int64_t wechat::WeChatService::ModChatRoomMemberNickName(
|
||||
const std::wstring& room_id, const std::wstring& wxid,
|
||||
const std::wstring& nickname) {
|
||||
return 0;
|
||||
int64_t success = -1;
|
||||
uint64_t mod_addr = base_addr_ + offset::kDoModChatRoomMemberNickName;
|
||||
func::__DoModChatRoomMemberNickName modify =
|
||||
(func::__DoModChatRoomMemberNickName)mod_addr;
|
||||
const wchar_t* p = room_id.c_str();
|
||||
prototype::WeChatString* chat_room_id = BuildWechatString(room_id);
|
||||
prototype::WeChatString* self_id = BuildWechatString(wxid);
|
||||
prototype::WeChatString* name = BuildWechatString(nickname);
|
||||
success = modify(
|
||||
reinterpret_cast<UINT64>(p), reinterpret_cast<UINT64>(chat_room_id),
|
||||
reinterpret_cast<UINT64>(self_id), reinterpret_cast<UINT64>(name));
|
||||
return success;
|
||||
}
|
||||
|
||||
int64_t wechat::WeChatService::DelMemberFromChatRoom(
|
||||
@@ -499,7 +530,7 @@ int64_t wechat::WeChatService::GetMemberFromChatRoom(
|
||||
|
||||
prototype::WeChatString chat_room_id(room_id);
|
||||
char chat_room_info[0x308] = {0};
|
||||
uint64_t addr = new_chat_room(reinterpret_cast<uint64_t>(&chat_room_info));
|
||||
uint64_t addr = new_chat_room(reinterpret_cast<uint64_t>(&chat_room_info));
|
||||
uint64_t mgr = get_chat_room_mgr();
|
||||
success = get_members(mgr, reinterpret_cast<uint64_t>(&chat_room_id), addr);
|
||||
member.chat_room_id = wxutils::ReadWstringThenConvert(addr + 0x10);
|
||||
@@ -511,25 +542,96 @@ int64_t wechat::WeChatService::GetMemberFromChatRoom(
|
||||
return success;
|
||||
}
|
||||
|
||||
int64_t wechat::WeChatService::SetTopMsg(uint64_t msg_id) { return 0; }
|
||||
int64_t wechat::WeChatService::SetTopMsg(uint64_t msg_id) {
|
||||
int64_t success = -1;
|
||||
uint64_t top_addr = base_addr_ + offset::kTopMsg;
|
||||
func::__DoTopMsg top_msg = (func::__DoTopMsg)top_addr;
|
||||
int64_t index = 0;
|
||||
int64_t local_id =
|
||||
wechat::WeChatDb::GetInstance().GetLocalIdByMsgId(msg_id, index);
|
||||
if (local_id <= 0 || index >> 32 == 0) {
|
||||
success = -2;
|
||||
return success;
|
||||
}
|
||||
LARGE_INTEGER l;
|
||||
l.HighPart = index >> 32;
|
||||
l.LowPart = (DWORD)local_id;
|
||||
uint64_t ptr = reinterpret_cast<uint64_t>(&l);
|
||||
success = top_msg(ptr, 1);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
int64_t wechat::WeChatService::RemoveTopMsg(const std::wstring& room_id,
|
||||
ULONG64 msg_id) {
|
||||
return 0;
|
||||
uint64_t msg_id) {
|
||||
int64_t success = -1;
|
||||
uint64_t remove_addr = base_addr_ + offset::kRemoveTopMsg;
|
||||
func::__RemoveTopMsg remove_top_msg = (func::__RemoveTopMsg)remove_addr;
|
||||
prototype::WeChatString* chat_room_id = BuildWechatString(room_id);
|
||||
const wchar_t* w_room = room_id.c_str();
|
||||
success = remove_top_msg(reinterpret_cast<UINT64>(w_room), msg_id,
|
||||
reinterpret_cast<UINT64>(chat_room_id));
|
||||
return success;
|
||||
}
|
||||
|
||||
TODO("InviteMemberToChatRoom")
|
||||
int64_t wechat::WeChatService::InviteMemberToChatRoom(
|
||||
const std::wstring& room_id, const std::vector<std::wstring>& wxids) {
|
||||
return 0;
|
||||
int64_t success = -1;
|
||||
uint64_t invite_addr = base_addr_ + offset::kInviteMember;
|
||||
func::__InviteMemberToChatRoom invite =
|
||||
(func::__InviteMemberToChatRoom)invite_addr;
|
||||
const wchar_t* w_room = room_id.c_str();
|
||||
prototype::WeChatString* chat_room_id = BuildWechatString(room_id);
|
||||
std::vector<prototype::WeChatString> wxid_list;
|
||||
wechat::VectorInner* list = (wechat::VectorInner*)&wxid_list;
|
||||
int64_t head = (int64_t)&list->start;
|
||||
for (int i = 0; i < wxids.size(); i++) {
|
||||
prototype::WeChatString id(wxids[i]);
|
||||
wxid_list.push_back(id);
|
||||
}
|
||||
uint64_t temp[2] = {0};
|
||||
success = invite(reinterpret_cast<uint64_t>(w_room), head,
|
||||
reinterpret_cast<uint64_t>(chat_room_id),
|
||||
reinterpret_cast<uint64_t>(&temp));
|
||||
return success;
|
||||
}
|
||||
|
||||
TODO("CreateChatRoom")
|
||||
int64_t wechat::WeChatService::CreateChatRoom(
|
||||
const std::vector<std::wstring>& wxids) {
|
||||
return 0;
|
||||
int64_t success = -1;
|
||||
uint64_t get_chat_room_mgr_addr = base_addr_ + offset::kChatRoomMgr;
|
||||
uint64_t create_chat_room_addr = base_addr_ + offset::kCreateChatRoom;
|
||||
func::__GetChatRoomMgr get_chat_room_mgr =
|
||||
(func::__GetChatRoomMgr)get_chat_room_mgr_addr;
|
||||
func::__CreateChatRoom create_chat_room =
|
||||
(func::__CreateChatRoom)create_chat_room_addr;
|
||||
std::vector<prototype::WeChatString> wxid_list;
|
||||
wechat::VectorInner* list = (wechat::VectorInner*)&wxid_list;
|
||||
int64_t head = (int64_t)&list->start;
|
||||
for (int i = 0; i < wxids.size(); i++) {
|
||||
prototype::WeChatString id(wxids[i]);
|
||||
wxid_list.push_back(id);
|
||||
}
|
||||
int64_t end = list->end;
|
||||
uint64_t mgr = get_chat_room_mgr();
|
||||
success = create_chat_room(mgr, head, end);
|
||||
return success;
|
||||
}
|
||||
|
||||
TODO("QuitChatRoom")
|
||||
int64_t wechat::WeChatService::QuitChatRoom(const std::wstring& room_id) {
|
||||
return 0;
|
||||
int64_t success = -1;
|
||||
uint64_t get_chat_room_mgr_addr = base_addr_ + offset::kChatRoomMgr;
|
||||
uint64_t quit_chat_room_addr = base_addr_ + offset::kQuitChatRoom;
|
||||
func::__GetChatRoomMgr get_chat_room_mgr =
|
||||
(func::__GetChatRoomMgr)get_chat_room_mgr_addr;
|
||||
func::__QuitChatRoom quit_chat_room =
|
||||
(func::__QuitChatRoom)quit_chat_room_addr;
|
||||
uint64_t mgr = get_chat_room_mgr();
|
||||
prototype::WeChatString chat_room_id(room_id);
|
||||
success = quit_chat_room(mgr, reinterpret_cast<uint64_t>(&chat_room_id), 0);
|
||||
return success;
|
||||
}
|
||||
|
||||
int64_t wechat::WeChatService::ForwardMsg(uint64_t msg_id,
|
||||
@@ -553,17 +655,92 @@ int64_t wechat::WeChatService::ForwardMsg(uint64_t msg_id,
|
||||
return success;
|
||||
}
|
||||
|
||||
int64_t wechat::WeChatService::GetSNSFirstPage() { return 0; }
|
||||
|
||||
int64_t wechat::WeChatService::GetSNSNextPage(uint64_t sns_id) { return 0; }
|
||||
|
||||
int64_t wechat::WeChatService::AddFavFromMsg(uint64_t msg_id) { return 0; }
|
||||
|
||||
int64_t wechat::WeChatService::AddFavFromImage(const std::wstring& wxid,
|
||||
const std::wstring& image_path) {
|
||||
return 0;
|
||||
TODO("GetSNSFirstPage")
|
||||
int64_t wechat::WeChatService::GetSNSFirstPage() {
|
||||
int64_t success = -1;
|
||||
uint64_t sns_data_mgr_addr = base_addr_ + offset::kSNSDataMgr;
|
||||
uint64_t sns_first_page_addr = base_addr_ + offset::kSNSGetFirstPage;
|
||||
func::__GetSNSDataMgr sns_data_mgr = (func::__GetSNSDataMgr)sns_data_mgr_addr;
|
||||
func::__GetSNSFirstPage sns_first_page =
|
||||
(func::__GetSNSFirstPage)sns_first_page_addr;
|
||||
uint64_t mgr = sns_data_mgr();
|
||||
int64_t buff[16] = {0};
|
||||
success = sns_first_page(mgr, reinterpret_cast<uint64_t>(&buff), 1);
|
||||
return success;
|
||||
}
|
||||
|
||||
TODO("GetSNSNextPage")
|
||||
int64_t wechat::WeChatService::GetSNSNextPage(uint64_t sns_id) {
|
||||
int64_t success = -1;
|
||||
uint64_t time_line_mgr_addr = base_addr_ + offset::kSNSTimeLineMgr;
|
||||
uint64_t sns_next_page_addr = base_addr_ + offset::kSNSGetNextPageScene;
|
||||
func::__GetSnsTimeLineMgr time_line_mgr =
|
||||
(func::__GetSnsTimeLineMgr)time_line_mgr_addr;
|
||||
func::__GetSNSNextPageScene sns_next_page =
|
||||
(func::__GetSNSNextPageScene)sns_next_page_addr;
|
||||
uint64_t mgr = time_line_mgr();
|
||||
success = sns_next_page(mgr, sns_id);
|
||||
return success;
|
||||
}
|
||||
|
||||
TODO("AddFavFromMsg")
|
||||
int64_t wechat::WeChatService::AddFavFromMsg(uint64_t msg_id) {
|
||||
int64_t success = -1;
|
||||
uint64_t get_chat_mgr_addr = base_addr_ + offset::kGetChatMgr;
|
||||
uint64_t get_by_local_id_addr = base_addr_ + offset::kGetMgrByPrefixLocalId;
|
||||
uint64_t add_fav_addr = base_addr_ + offset::kAddFavFromMsg;
|
||||
uint64_t get_favorite_mgr_addr = base_addr_ + offset::kGetFavoriteMgr;
|
||||
uint64_t free_chat_msg_addr = base_addr_ + offset::kFreeChatMsg;
|
||||
func::__GetMgrByPrefixLocalId get_by_local_id =
|
||||
(func::__GetMgrByPrefixLocalId)get_by_local_id_addr;
|
||||
uint64_t new_chat_msg_addr = base_addr_ + offset::kChatMsgInstanceCounter;
|
||||
|
||||
func::__AddFavFromMsg add_fav = (func::__AddFavFromMsg)add_fav_addr;
|
||||
func::__GetChatMgr get_chat_mgr = (func::__GetChatMgr)get_chat_mgr_addr;
|
||||
func::__GetFavoriteMgr get_favorite_mgr =
|
||||
(func::__GetFavoriteMgr)get_favorite_mgr_addr;
|
||||
func::__FreeChatMsg free_chat_msg = (func::__FreeChatMsg)free_chat_msg_addr;
|
||||
func::__NewChatMsg new_chat_msg = (func::__NewChatMsg)new_chat_msg_addr;
|
||||
|
||||
int64_t index = 0;
|
||||
int64_t local_id =
|
||||
wechat::WeChatDb::GetInstance().GetLocalIdByMsgId(msg_id, index);
|
||||
if (local_id <= 0 || index >> 32 == 0) {
|
||||
success = -2;
|
||||
return success;
|
||||
}
|
||||
char chat_msg[0x460] = {0};
|
||||
LARGE_INTEGER l;
|
||||
l.HighPart = index >> 32;
|
||||
l.LowPart = (DWORD)local_id;
|
||||
uint64_t p_chat_msg = new_chat_msg(reinterpret_cast<uint64_t>(&chat_msg));
|
||||
|
||||
get_chat_mgr();
|
||||
get_by_local_id(l.QuadPart, p_chat_msg);
|
||||
uint64_t mgr = get_favorite_mgr();
|
||||
success = add_fav(mgr, p_chat_msg);
|
||||
free_chat_msg(p_chat_msg);
|
||||
return success;
|
||||
}
|
||||
|
||||
TODO("AddFavFromImage")
|
||||
int64_t wechat::WeChatService::AddFavFromImage(const std::wstring& wxid,
|
||||
const std::wstring& image_path) {
|
||||
int64_t success = -1;
|
||||
uint64_t get_favorite_mgr_addr = base_addr_ + offset::kGetFavoriteMgr;
|
||||
uint64_t add_fav_from_image_addr = base_addr_ + offset::kAddFavFromImage;
|
||||
prototype::WeChatString* send_id = BuildWechatString(wxid);
|
||||
prototype::WeChatString* path = BuildWechatString(image_path);
|
||||
func::__GetFavoriteMgr get_favorite_mgr =
|
||||
(func::__GetFavoriteMgr)get_favorite_mgr_addr;
|
||||
func::__AddFavFromImage add_fav_from_image =
|
||||
(func::__AddFavFromImage)add_fav_from_image_addr;
|
||||
uint64_t mgr = get_favorite_mgr();
|
||||
success = add_fav_from_image(mgr, reinterpret_cast<uint64_t>(path),
|
||||
reinterpret_cast<uint64_t>(send_id));
|
||||
return success;
|
||||
}
|
||||
TODO("SendAtText")
|
||||
int64_t wechat::WeChatService::SendAtText(
|
||||
const std::wstring& room_id, const std::vector<std::wstring>& wxids,
|
||||
const std::wstring& msg) {
|
||||
@@ -612,7 +789,7 @@ int64_t wechat::WeChatService::SendAtText(
|
||||
free(reinterpret_cast<uint64_t>(&chat_msg));
|
||||
return 0;
|
||||
}
|
||||
|
||||
TODO("GetContactOrChatRoomNickname")
|
||||
std::wstring wechat::WeChatService::GetContactOrChatRoomNickname(
|
||||
const std::wstring& wxid) {
|
||||
int64_t success = -1;
|
||||
@@ -641,13 +818,169 @@ std::wstring wechat::WeChatService::GetContactOrChatRoomNickname(
|
||||
}
|
||||
}
|
||||
|
||||
TODO("GetContactByWxid")
|
||||
int64_t wechat::WeChatService::GetContactByWxid(const std::wstring& wxid,
|
||||
ContactProfileInner& profile) {
|
||||
return 0;
|
||||
int64_t success = -1;
|
||||
prototype::WeChatString to_user(wxid);
|
||||
uint64_t get_contact_mgr_addr = base_addr_ + offset::kGetContactMgr;
|
||||
uint64_t new_contact_addr = base_addr_ + offset::kNewContact;
|
||||
uint64_t get_contact_addr = base_addr_ + offset::kGetContact;
|
||||
uint64_t free_contact_addr = base_addr_ + offset::kFreeContact;
|
||||
func::__GetContactMgr get_contact_mgr =
|
||||
(func::__GetContactMgr)get_contact_mgr_addr;
|
||||
func::__GetContact get_contact = (func::__GetContact)get_contact_addr;
|
||||
func::__NewContact new_contact = (func::__NewContact)new_contact_addr;
|
||||
func::__FreeContact free_contact = (func::__FreeContact)free_contact_addr;
|
||||
char buff[0x6A9] = {0};
|
||||
uint64_t contact = new_contact(reinterpret_cast<uint64_t>(&buff));
|
||||
uint64_t mgr = get_contact_mgr();
|
||||
success = get_contact(mgr, reinterpret_cast<uint64_t>(&to_user), contact);
|
||||
profile.wxid = wxutils::ReadWstringThenConvert(contact + 0x10);
|
||||
profile.account = wxutils::ReadWstringThenConvert(contact + 0x30);
|
||||
profile.v3 = wxutils::ReadWstringThenConvert(contact + 0x50);
|
||||
profile.nickname = wxutils::ReadWstringThenConvert(contact + 0xA0);
|
||||
profile.head_image = wxutils::ReadWstringThenConvert(contact + 0x188);
|
||||
free_contact(contact);
|
||||
return success;
|
||||
}
|
||||
|
||||
int64_t wechat::WeChatService::DoDownloadTask(uint64_t msg_id) { return 0; }
|
||||
TODO("DoDownloadTask")
|
||||
int64_t wechat::WeChatService::DoDownloadTask(uint64_t msg_id) {
|
||||
int64_t success = -1;
|
||||
uint64_t get_by_local_id_addr = base_addr_ + offset::kGetMgrByPrefixLocalId;
|
||||
func::__GetMgrByPrefixLocalId get_by_local_id =
|
||||
(func::__GetMgrByPrefixLocalId)get_by_local_id_addr;
|
||||
|
||||
uint64_t get_chat_mgr_addr = base_addr_ + offset::kGetChatMgr;
|
||||
func::__GetChatMgr get_chat_mgr = (func::__GetChatMgr)get_chat_mgr_addr;
|
||||
|
||||
uint64_t free_chat_msg_addr = base_addr_ + offset::kFreeChatMsg;
|
||||
func::__FreeChatMsg free_chat_msg = (func::__FreeChatMsg)free_chat_msg_addr;
|
||||
|
||||
uint64_t new_chat_msg_addr = base_addr_ + offset::kChatMsgInstanceCounter;
|
||||
func::__NewChatMsg new_chat_msg = (func::__NewChatMsg)new_chat_msg_addr;
|
||||
|
||||
uint64_t get_current_data_path_addr =
|
||||
base_addr_ + offset::kGetCurrentDataPath;
|
||||
func::__GetCurrentDataPath GetCurrentDataPath =
|
||||
(func::__GetCurrentDataPath)get_current_data_path_addr;
|
||||
|
||||
uint64_t new_app_msg_info_addr = base_addr_ + offset::kNewAppMsgInfo;
|
||||
func::__NewAppMsgInfo new_app_msg_info =
|
||||
(func::__NewAppMsgInfo)new_app_msg_info_addr;
|
||||
|
||||
uint64_t free_app_msg_info_addr = base_addr_ + offset::kFreeAppMsgInfo;
|
||||
func::__FreeAppMsgInfo free_app_msg_info =
|
||||
(func::__NewAppMsgInfo)free_app_msg_info_addr;
|
||||
|
||||
uint64_t xml_to_app_info_addr = base_addr_ + offset::kParseAppMsgXml;
|
||||
func::__ParseAppMsgXml xml_to_app_info =
|
||||
(func::__ParseAppMsgXml)xml_to_app_info_addr;
|
||||
|
||||
uint64_t get_pre_download_mgr_addr = base_addr_ + offset::kGetPreDownLoadMgr;
|
||||
func::__GetPreDownLoadMgr get_pre_download_mgr =
|
||||
(func::__GetPreDownLoadMgr)get_pre_download_mgr_addr;
|
||||
|
||||
uint64_t push_attach_task_addr = base_addr_ + offset::kPushAttachTask;
|
||||
func::__PushAttachTask push_attach_task =
|
||||
(func::__PushAttachTask)push_attach_task_addr;
|
||||
|
||||
int64_t index = 0;
|
||||
int64_t local_id =
|
||||
wechat::WeChatDb::GetInstance().GetLocalIdByMsgId(msg_id, index);
|
||||
if (local_id <= 0 || index >> 32 == 0) {
|
||||
success = -2;
|
||||
return success;
|
||||
}
|
||||
char* chat_msg = base::utils::WxHeapAlloc<char>(0x460);
|
||||
LARGE_INTEGER l;
|
||||
l.HighPart = index >> 32;
|
||||
l.LowPart = (DWORD)local_id;
|
||||
uint64_t p_chat_msg = new_chat_msg(reinterpret_cast<uint64_t>(chat_msg));
|
||||
|
||||
get_chat_mgr();
|
||||
get_by_local_id(l.QuadPart, p_chat_msg);
|
||||
|
||||
std::wstring save_path = L"";
|
||||
std::wstring thumb_path = L"";
|
||||
|
||||
prototype::WeChatString current_data_path;
|
||||
GetCurrentDataPath(reinterpret_cast<ULONG_PTR>(¤t_data_path));
|
||||
|
||||
if (current_data_path.length > 0) {
|
||||
save_path += current_data_path.ptr;
|
||||
save_path += L"wxhelper";
|
||||
} else {
|
||||
return -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);
|
||||
std::wstring tmp_content(content, len);
|
||||
prototype::WeChatString* we_content = BuildWechatString(tmp_content);
|
||||
|
||||
switch (type) {
|
||||
case 0x3: {
|
||||
save_path += L"\\image";
|
||||
if (!wxutils::FindOrCreateDirectory(save_path)) {
|
||||
return -3;
|
||||
}
|
||||
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;
|
||||
}
|
||||
thumb_path = save_path + L"\\" + std::to_wstring(msg_id) + L".jpg";
|
||||
save_path = save_path + L"\\" + std::to_wstring(msg_id) + L".mp4";
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x31: {
|
||||
save_path += L"\\file";
|
||||
if (!wxutils::FindOrCreateDirectory(save_path)) {
|
||||
return -3;
|
||||
}
|
||||
char* p_xml_app_msg = base::utils::WxHeapAlloc<char>(0x3000);
|
||||
uint64_t xml_msg =
|
||||
new_app_msg_info(reinterpret_cast<uint64_t>(p_xml_app_msg));
|
||||
uint64_t result =
|
||||
xml_to_app_info(xml_msg, reinterpret_cast<uint64_t>(we_content), 1);
|
||||
if (result != 1) {
|
||||
return -4;
|
||||
}
|
||||
std::wstring file_name = wxutils::ReadWstring(xml_msg + 0x70);
|
||||
save_path =
|
||||
save_path + L"\\" + std::to_wstring(msg_id) + L"_" + file_name;
|
||||
free_app_msg_info(xml_msg);
|
||||
break;
|
||||
}
|
||||
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);
|
||||
free_chat_msg(p_chat_msg);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
TODO("ForwardPublicMsg")
|
||||
int64_t wechat::WeChatService::ForwardPublicMsg(const std::wstring& wxid,
|
||||
const std::wstring& title,
|
||||
const std::wstring& url,
|
||||
@@ -658,33 +991,218 @@ int64_t wechat::WeChatService::ForwardPublicMsg(const std::wstring& wxid,
|
||||
return 0;
|
||||
}
|
||||
|
||||
TODO("ForwardPublicMsgByMsgId")
|
||||
int64_t wechat::WeChatService::ForwardPublicMsgByMsgId(const std::wstring& wxid,
|
||||
uint64_t msg_id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
TODO("DecodeImage")
|
||||
int64_t wechat::WeChatService::DecodeImage(const std::wstring& file_path,
|
||||
const std::wstring& save_dir) {
|
||||
return 0;
|
||||
}
|
||||
if (!wxutils::FindOrCreateDirectory(save_dir)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int64_t pos_begin = file_path.find_last_of(L"\\") + 1;
|
||||
int64_t pos_end = file_path.find_last_of(L".");
|
||||
std::wstring file_name = file_path.substr(pos_begin, pos_end - pos_begin);
|
||||
HANDLE h_origin_file =
|
||||
CreateFileW(file_path.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
char buffer[BUFSIZE] = {0};
|
||||
DWORD bytes_read = 0;
|
||||
DWORD bytes_write = 0;
|
||||
unsigned char magic_head[4] = {0};
|
||||
std::wstring suffix;
|
||||
short key = 0;
|
||||
if (ReadFile(h_origin_file, buffer, BUFSIZE, &bytes_read, NULL)) {
|
||||
memcpy(magic_head, buffer, 3);
|
||||
} else {
|
||||
CloseHandle(h_origin_file);
|
||||
return 0;
|
||||
}
|
||||
if ((magic_head[0] ^ JPEG0) == (magic_head[1] ^ JPEG1)) {
|
||||
key = magic_head[0] ^ JPEG0;
|
||||
suffix = L".jpg";
|
||||
} else if ((magic_head[0] ^ PNG1) == (magic_head[1] ^ PNG2)) {
|
||||
key = magic_head[0] ^ PNG1;
|
||||
suffix = L".png";
|
||||
} else if ((magic_head[0] ^ GIF0) == (magic_head[1] ^ GIF1)) {
|
||||
key = magic_head[0] ^ GIF0;
|
||||
suffix = L".gif";
|
||||
} else if ((magic_head[0] ^ BMP0) == (magic_head[1] ^ BMP1)) {
|
||||
key = magic_head[0] ^ BMP0;
|
||||
suffix = L".bmp";
|
||||
} else {
|
||||
key = -1;
|
||||
suffix = L".dat";
|
||||
}
|
||||
std::wstring save_img_path = save_dir + L"\\" + file_name + suffix;
|
||||
HANDLE save_img = CreateFileW(save_img_path.c_str(), GENERIC_ALL, 0, NULL,
|
||||
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (save_img == INVALID_HANDLE_VALUE) {
|
||||
return 0;
|
||||
}
|
||||
if (key > 0) {
|
||||
for (unsigned int i = 0; i < bytes_read; i++) {
|
||||
buffer[i] ^= key;
|
||||
}
|
||||
}
|
||||
if (!WriteFile(save_img, (LPCVOID)buffer, bytes_read, &bytes_write, 0)) {
|
||||
CloseHandle(h_origin_file);
|
||||
CloseHandle(save_img);
|
||||
return 0;
|
||||
}
|
||||
|
||||
do {
|
||||
if (ReadFile(h_origin_file, buffer, BUFSIZE, &bytes_read, NULL)) {
|
||||
if (key > 0) {
|
||||
for (unsigned int i = 0; i < bytes_read; i++) {
|
||||
buffer[i] ^= key;
|
||||
}
|
||||
}
|
||||
if (!WriteFile(save_img, (LPCVOID)buffer, bytes_read, &bytes_write, 0)) {
|
||||
CloseHandle(h_origin_file);
|
||||
CloseHandle(save_img);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} while (bytes_read == BUFSIZE);
|
||||
CloseHandle(h_origin_file);
|
||||
CloseHandle(save_img);
|
||||
return 1;
|
||||
}
|
||||
TODO("GetVoiceByDB")
|
||||
int64_t wechat::WeChatService::GetVoiceByDB(ULONG64 msg_id,
|
||||
const std::wstring& dir) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
TODO("SendCustomEmotion")
|
||||
int64_t wechat::WeChatService::SendCustomEmotion(const std::wstring& file_path,
|
||||
const std::wstring& wxid) {
|
||||
return 0;
|
||||
int64_t success = -1;
|
||||
uint64_t get_custom_smiley_mgr_addr =
|
||||
base_addr_ + offset::kGetCustomSmileyMgr;
|
||||
func::__GetCustomSmileyMgr get_custom_smiley_mgr =
|
||||
(func::__GetCustomSmileyMgr)get_custom_smiley_mgr_addr;
|
||||
uint64_t send_custom_emotion_addr = base_addr_ + offset::kSendCustomEmotion;
|
||||
func::__SendCustomEmotion send_custom_emotion =
|
||||
(func::__SendCustomEmotion)send_custom_emotion_addr;
|
||||
prototype::WeChatString* path = BuildWechatString(file_path);
|
||||
prototype::WeChatString* recv = BuildWechatString(wxid);
|
||||
int64_t* temp = base::utils::WxHeapAlloc<int64_t>(0x20);
|
||||
memset(temp, 0, 0x20);
|
||||
uint64_t mgr = get_custom_smiley_mgr();
|
||||
success = send_custom_emotion(
|
||||
mgr, reinterpret_cast<uint64_t>(path), reinterpret_cast<uint64_t>(temp),
|
||||
reinterpret_cast<uint64_t>(recv), 2, reinterpret_cast<uint64_t>(temp), 0,
|
||||
reinterpret_cast<uint64_t>(temp));
|
||||
return success;
|
||||
}
|
||||
|
||||
TODO("SendApplet")
|
||||
int64_t wechat::WeChatService::SendApplet(
|
||||
const std::wstring& recv_wxid, const std::wstring& waid_suff,
|
||||
const std::wstring& waid_w, const std::string& waid_s,
|
||||
const std::string& wa_wxid, const std::string& json_param,
|
||||
const std::string& head_image, const std::string& big_image,
|
||||
const std::string& index_page) {
|
||||
return 0;
|
||||
const std::wstring& waid_w, const std::wstring& waid_s,
|
||||
const std::wstring& wa_wxid, const std::wstring& json_param,
|
||||
const std::wstring& head_image, const std::wstring& big_image,
|
||||
const std::wstring& index_page) {
|
||||
int64_t success = -1;
|
||||
if (js_api_addr_ == 0) {
|
||||
auto vec2 =
|
||||
base::memory::ScanAndMatchValue(base_addr_ + 0x32D1318, 0x1000, 0x8);
|
||||
for (int i = 0; i < vec2.size(); i++) {
|
||||
int64_t ptr = vec2.at(i);
|
||||
if (*(int64_t*)ptr == base_addr_ + 0x32D1318) {
|
||||
js_api_addr_ = ptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (js_api_addr_ == 0) {
|
||||
success = -2;
|
||||
return success;
|
||||
}
|
||||
|
||||
uint64_t share_app_msg_addr = base_addr_ + offset::kNewJsApiShareAppMessage;
|
||||
func::__JsApiShareAppMessage share_app_msg =
|
||||
(func::__JsApiShareAppMessage)share_app_msg_addr;
|
||||
|
||||
uint64_t init_addr = base_addr_ + offset::kInitJsConfig;
|
||||
func::__InitJsConfig init = (func::__InitJsConfig)init_addr;
|
||||
|
||||
uint64_t send_applet_addr = base_addr_ + offset::kSendApplet;
|
||||
func::__SendApplet send_applet = (func::__SendApplet)send_applet_addr;
|
||||
|
||||
uint64_t get_by_waid_addr = base_addr_ + offset::kGetAppInfoByWaid;
|
||||
func::__GetAppInfoByWaid get_app_info =
|
||||
(func::__GetAppInfoByWaid)get_by_waid_addr;
|
||||
|
||||
uint64_t copy_app_req_addr = base_addr_ + offset::kCopyShareAppMessageRequest;
|
||||
func::__CopyShareAppMessageRequest copy_app_req =
|
||||
(func::__CopyShareAppMessageRequest)copy_app_req_addr;
|
||||
|
||||
uint64_t new_wa_msg_addr = base_addr_ + offset::kNewWAUpdatableMsgInfo;
|
||||
func::__NewWAUpdatableMsgInfo new_wa_msg =
|
||||
(func::__NewWAUpdatableMsgInfo)new_wa_msg_addr;
|
||||
|
||||
uint64_t free_wa_msg_addr = base_addr_ + offset::kFreeWAUpdatableMsgInfo;
|
||||
func::__FreeWAUpdatableMsgInfo free_wa_msg =
|
||||
(func::__FreeWAUpdatableMsgInfo)free_wa_msg_addr;
|
||||
|
||||
std::vector<prototype::WeChatString>* temp =
|
||||
base::utils::WxHeapAlloc<std::vector<prototype::WeChatString>>(0x20);
|
||||
// std::vector<prototype::WeChatString>* temp = new
|
||||
// std::vector<prototype::WeChatString>();
|
||||
wechat::VectorInner* list = (wechat::VectorInner*)temp;
|
||||
|
||||
prototype::WeChatString* member = BuildWechatString(recv_wxid);
|
||||
#ifdef _DEBUG
|
||||
list->head = reinterpret_cast<uint64_t>(member);
|
||||
#endif
|
||||
list->start = reinterpret_cast<uint64_t>(member);
|
||||
list->finsh = reinterpret_cast<uint64_t>(member) + 0x20;
|
||||
list->end = reinterpret_cast<uint64_t>(member) + 0x20;
|
||||
|
||||
uint64_t head = reinterpret_cast<uint64_t>(&(list->start));
|
||||
|
||||
prototype::WeChatString* waid_cat = BuildWechatString(waid_suff);
|
||||
prototype::WeChatString* waid = BuildWechatString(waid_w);
|
||||
|
||||
prototype::WeChatString* waid_2 = BuildWechatString(waid_suff);
|
||||
|
||||
prototype::WeChatString* waid_str = BuildWechatString(waid_s);
|
||||
prototype::WeChatString* app_wxid = BuildWechatString(wa_wxid);
|
||||
prototype::WeChatString* json_str = BuildWechatString(json_param);
|
||||
prototype::WeChatString* head_image_url = BuildWechatString(head_image);
|
||||
prototype::WeChatString* image = BuildWechatString(big_image);
|
||||
prototype::WeChatString* index = BuildWechatString(index_page);
|
||||
|
||||
uint64_t app_msg = js_api_addr_;
|
||||
|
||||
uint64_t data = *(uint64_t*)(app_msg + 0x8);
|
||||
char* share_req = base::utils::WxHeapAlloc<char>(0x2000);
|
||||
|
||||
char* mid_ptr = base::utils::WxHeapAlloc<char>(0x18);
|
||||
memcpy(mid_ptr, &share_req, sizeof(INT64));
|
||||
memcpy(mid_ptr + 0x8, &share_req, sizeof(INT64));
|
||||
memcpy(mid_ptr + 0x10, &share_req, sizeof(INT64));
|
||||
|
||||
memcpy((void*)data, mid_ptr, 0x18);
|
||||
|
||||
memcpy(share_req, (void*)(app_msg + 0x8), sizeof(uint64_t));
|
||||
memcpy(share_req + 0x8, (void*)(app_msg + 0x8), sizeof(uint64_t));
|
||||
memcpy(share_req + 0x10, (void*)(app_msg + 0x8), sizeof(uint64_t));
|
||||
memcpy(share_req + 0x20, waid_2, sizeof(prototype::WeChatString));
|
||||
memcpy(share_req + 0x48, waid_str, sizeof(prototype::WeChatStr));
|
||||
memcpy(share_req + 0x98, app_wxid, sizeof(prototype::WeChatStr));
|
||||
memcpy(share_req + 0xF8, json_str, sizeof(prototype::WeChatStr));
|
||||
memcpy(share_req + 0x178, head_image_url, sizeof(prototype::WeChatStr));
|
||||
memcpy(share_req + 0x198, image, sizeof(prototype::WeChatStr));
|
||||
memcpy(share_req + 0x1c0, index, sizeof(prototype::WeChatStr));
|
||||
|
||||
success = send_applet(app_msg, reinterpret_cast<uint64_t>(waid_cat), head, 0);
|
||||
return success;
|
||||
}
|
||||
|
||||
int64_t wechat::WeChatService::SendPatMsg(const std::wstring& room_id,
|
||||
@@ -699,9 +1217,40 @@ int64_t wechat::WeChatService::SendPatMsg(const std::wstring& room_id,
|
||||
return success;
|
||||
}
|
||||
|
||||
TODO("DoOCRTask")
|
||||
int64_t wechat::WeChatService::DoOCRTask(const std::wstring& img_path,
|
||||
std::string& result) {
|
||||
return 0;
|
||||
int64_t success = -1;
|
||||
uint64_t ocr_manager_addr = base_addr_ + offset::kGetOCRManager;
|
||||
func::__GetOCRManager ocr_manager = (func::__GetOCRManager)ocr_manager_addr;
|
||||
|
||||
uint64_t do_ocr_task_addr = base_addr_ + offset::kDoOCRTask;
|
||||
func::__DoOCRTask do_ocr_task = (func::__DoOCRTask)do_ocr_task_addr;
|
||||
|
||||
prototype::WeChatString img(img_path);
|
||||
std::vector<INT64>* temp =
|
||||
base::utils::WxHeapAlloc<std::vector<int64_t>>(0x20);
|
||||
int64_t unkonwn = 0;
|
||||
wechat::VectorInner* list = (wechat::VectorInner*)temp;
|
||||
list->start = reinterpret_cast<INT64>(&list->start);
|
||||
list->finsh = list->start;
|
||||
char buff[0x28] = {0};
|
||||
memcpy(buff, &list->start, sizeof(INT64));
|
||||
uint64_t mgr = ocr_manager();
|
||||
success = do_ocr_task(mgr, reinterpret_cast<uint64_t>(&img), 1,
|
||||
reinterpret_cast<uint64_t>(buff),
|
||||
reinterpret_cast<uint64_t>(&unkonwn));
|
||||
int64_t number = *(int64_t*)(buff + 0x8);
|
||||
if (number > 0) {
|
||||
int64_t header = *(int64_t*)(buff);
|
||||
for (unsigned int i = 0; i < number; i++) {
|
||||
int64_t content = *(int64_t*)header;
|
||||
result += wxutils::ReadWstringThenConvert(content + 0x28);
|
||||
result += "\r\n";
|
||||
header = content;
|
||||
}
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
int64_t wechat::WeChatService::LockWeChat() {
|
||||
@@ -737,10 +1286,10 @@ int64_t wechat::WeChatService::EnterWeChat() {
|
||||
uint64_t click_cb_addr = base_addr + offset::kOnLoginBtnClick;
|
||||
func::__OnLoginBtnClick cb = (func::__OnLoginBtnClick)click_cb_addr;
|
||||
auto vec =
|
||||
base::memory::ScanAndMatchValue(base_addr + 0x34e0c18, 0x1000, 0x8);
|
||||
base::memory::ScanAndMatchValue(base_addr + 0x4ecedf8, 0x1000, 0x8);
|
||||
for (int i = 0; i < vec.size(); i++) {
|
||||
int64_t ptr = vec.at(i);
|
||||
if (*(int64_t*)ptr == base_addr + 0x34e0c18) {
|
||||
if (*(int64_t*)ptr == base_addr + 0x4ecedf8) {
|
||||
int64_t login_wnd = ptr;
|
||||
success = cb(ptr);
|
||||
break;
|
||||
@@ -749,6 +1298,7 @@ int64_t wechat::WeChatService::EnterWeChat() {
|
||||
return success;
|
||||
}
|
||||
|
||||
TODO("SendMultiAtText")
|
||||
int64_t wechat::WeChatService::SendMultiAtText(
|
||||
const std::wstring& room_id,
|
||||
const std::vector<std::pair<std::wstring, std::wstring>>& at) {
|
||||
@@ -805,10 +1355,15 @@ std::string wechat::WeChatService::GetLoginUrl() {
|
||||
return "http://weixin.qq.com/x/" + login_url;
|
||||
}
|
||||
|
||||
void wechat::WeChatService::SetBaseAddr(uint64_t addr) {}
|
||||
void wechat::WeChatService::SetBaseAddr(uint64_t addr) {
|
||||
this->base_addr_ = addr;
|
||||
}
|
||||
|
||||
void wechat::WeChatService::SetJsApiAddr(uint64_t addr) {}
|
||||
void wechat::WeChatService::SetJsApiAddr(uint64_t addr) {
|
||||
this->js_api_addr_ = addr;
|
||||
}
|
||||
|
||||
TODO("TranslateVoice")
|
||||
int64_t wechat::WeChatService::TranslateVoice(uint64_t msg_id) {
|
||||
int64_t success = -1;
|
||||
uint64_t get_by_local_id_addr = base_addr_ + offset::kGetMgrByPrefixLocalId;
|
||||
@@ -865,6 +1420,7 @@ int64_t wechat::WeChatService::TranslateVoice(uint64_t msg_id) {
|
||||
return success;
|
||||
}
|
||||
|
||||
TODO("GetTranslateVoiceText")
|
||||
std::string wechat::WeChatService::GetTranslateVoiceText(uint64_t msg_id) {
|
||||
std::string content =
|
||||
wechat::WeChatDb::GetInstance().GetChatMsgStrContentByMsgId(msg_id);
|
||||
@@ -888,6 +1444,7 @@ std::string wechat::WeChatService::GetTranslateVoiceText(uint64_t msg_id) {
|
||||
return "";
|
||||
}
|
||||
|
||||
TODO("OpenUrlByWeChatBrowser")
|
||||
int64_t wechat::WeChatService::OpenUrlByWeChatBrowser(const std::wstring& url,
|
||||
int flag) {
|
||||
int64_t success = -1;
|
||||
@@ -922,3 +1479,52 @@ int64_t wechat::WeChatService::OpenUrlByWeChatBrowser(const std::wstring& url,
|
||||
free_config(ptr);
|
||||
return success;
|
||||
}
|
||||
|
||||
TODO("GetChatRoomMemberNickname")
|
||||
std::wstring wechat::WeChatService::GetChatRoomMemberNickname(
|
||||
const std::wstring& room_id, const std::wstring& member_id) {
|
||||
return std::wstring();
|
||||
}
|
||||
|
||||
TODO("DelContact")
|
||||
int64_t wechat::WeChatService::DelContact(const std::wstring& wxid) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
TODO("SearchContact")
|
||||
int64_t wechat::WeChatService::SearchContact(
|
||||
const std::wstring& keyword, wechat::SearchContactInner& contact) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
TODO("AddFriendByWxid")
|
||||
int64_t wechat::WeChatService::AddFriendByWxid(const std::wstring& wxid,
|
||||
const std::wstring& msg) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
TODO("VerifyApply")
|
||||
int64_t wechat::WeChatService::VerifyApply(const std::wstring& v3,
|
||||
const std::wstring& v4,
|
||||
int32_t permission) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
TODO("DoConfirmReceipt")
|
||||
int64_t wechat::WeChatService::DoConfirmReceipt(
|
||||
const std::wstring& wxid, const std::wstring& transcationid,
|
||||
const std::wstring& transferid) {
|
||||
int success = -1;
|
||||
prototype::WeChatString recv_id(wxid);
|
||||
prototype::WeChatString transcation_id(transcationid);
|
||||
prototype::WeChatString transfer_id(transferid);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
TODO("DoRefuseReceipt")
|
||||
int64_t wechat::WeChatService::DoRefuseReceipt(
|
||||
const std::wstring& wxid, const std::wstring& transcationid,
|
||||
const std::wstring& transferid) {
|
||||
return 0;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ class WeChatService : public base::Singleton<WeChatService> {
|
||||
int64_t GetMemberFromChatRoom(const std::wstring& room_id,
|
||||
ChatRoomMemberInner& member);
|
||||
int64_t SetTopMsg(uint64_t msg_id);
|
||||
int64_t RemoveTopMsg(const std::wstring& room_id, ULONG64 msg_id);
|
||||
int64_t RemoveTopMsg(const std::wstring& room_id, uint64_t msg_id);
|
||||
int64_t InviteMemberToChatRoom(const std::wstring& room_id,
|
||||
const std::vector<std::wstring>& wxids);
|
||||
int64_t CreateChatRoom(const std::vector<std::wstring>& wxids);
|
||||
@@ -70,11 +70,11 @@ class WeChatService : public base::Singleton<WeChatService> {
|
||||
const std::wstring& wxid);
|
||||
int64_t SendApplet(const std::wstring& recv_wxid,
|
||||
const std::wstring& waid_suff, const std::wstring& waid_w,
|
||||
const std::string& waid_s, const std::string& wa_wxid,
|
||||
const std::string& json_param,
|
||||
const std::string& head_image,
|
||||
const std::string& big_image,
|
||||
const std::string& index_page);
|
||||
const std::wstring& waid_s, const std::wstring& wa_wxid,
|
||||
const std::wstring& json_param,
|
||||
const std::wstring& head_image,
|
||||
const std::wstring& big_image,
|
||||
const std::wstring& index_page);
|
||||
int64_t SendPatMsg(const std::wstring& room_id, const std::wstring& wxid);
|
||||
int64_t DoOCRTask(const std::wstring& img_path, std::string& result);
|
||||
int64_t LockWeChat();
|
||||
@@ -88,6 +88,24 @@ class WeChatService : public base::Singleton<WeChatService> {
|
||||
int64_t TranslateVoice(uint64_t msg_id);
|
||||
std::string GetTranslateVoiceText(uint64_t msg_id);
|
||||
int64_t OpenUrlByWeChatBrowser(const std::wstring& url, int flag);
|
||||
std::wstring GetChatRoomMemberNickname(const std::wstring& room_id,
|
||||
const std::wstring& member_id);
|
||||
int64_t DelContact(const std::wstring& wxid);
|
||||
|
||||
int64_t SearchContact(const std::wstring& keyword,
|
||||
wechat::SearchContactInner& contact);
|
||||
|
||||
int64_t AddFriendByWxid(const std::wstring& wxid, const std::wstring& msg);
|
||||
|
||||
int64_t VerifyApply(const std::wstring& v3, const std::wstring& v4,
|
||||
int32_t permission);
|
||||
int64_t DoConfirmReceipt(const std::wstring& wxid,
|
||||
const std::wstring& transcationid,
|
||||
const std::wstring& transferid);
|
||||
|
||||
int64_t DoRefuseReceipt(const std::wstring& wxid,
|
||||
const std::wstring& transcationid,
|
||||
const std::wstring& transferid);
|
||||
|
||||
private:
|
||||
uint64_t base_addr_;
|
||||
|
||||
@@ -105,6 +105,20 @@ int DecodeImage(const wchar_t *file_path, const wchar_t *save_dir) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool FindOrCreateDirectory(const std::wstring &path) {
|
||||
WIN32_FIND_DATAW fd;
|
||||
HANDLE found = ::FindFirstFileW(path.c_str(), &fd);
|
||||
if (found != INVALID_HANDLE_VALUE &&
|
||||
(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
|
||||
FindClose(found);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!::CreateDirectoryW(path.c_str(), NULL)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace wxutils
|
||||
} // namespace wxhelper
|
||||
@@ -5,6 +5,11 @@
|
||||
#include <string>
|
||||
namespace wxhelper {
|
||||
namespace wxutils {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef _WIN64
|
||||
int64_t GetWeChatWinBase();
|
||||
#else
|
||||
@@ -18,6 +23,7 @@ std::string ImageXor(std::string buf);
|
||||
std::wstring ReadWstring(INT64 addr);
|
||||
std::string ReadWstringThenConvert(INT64 addr);
|
||||
int DecodeImage(const wchar_t* file_path, const wchar_t* save_dir);
|
||||
bool FindOrCreateDirectory(const std::wstring &path);
|
||||
} // namespace wxutils
|
||||
|
||||
} // namespace wxhelper
|
||||
|
||||
Reference in new issue
Block a user