From 158da3fb64098348fcf57e587e70c2ad976f3789 Mon Sep 17 00:00:00 2001 From: rain <240918304@qq.com> Date: Fri, 15 Nov 2024 19:02:31 +0800 Subject: [PATCH] 11 --- src/account_mgr.cc | 17 +++++++++++++++++ src/account_mgr.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/src/account_mgr.cc b/src/account_mgr.cc index 5cd20e4..f4a890a 100644 --- a/src/account_mgr.cc +++ b/src/account_mgr.cc @@ -215,6 +215,23 @@ int AccountMgr::Logout() { return success; } +int AccountMgr::EnterWeChat() { + int success = -1; + //base::FunctionResolver resolver(base_addr_); + //auto cb = base::CastFunction<__OnLoginBtnClick>(resolver, kOnLoginBtnClick); + //auto vec = + // 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 + 0x4ecedf8) { + // int64_t login_wnd = ptr; + // success = cb(ptr); + // break; + // } + //} + return success; +} + /// @brief 根据 502647092 提供的偏移 获取二维码url /// @return std::string AccountMgr::GetQRCodeUrl() { diff --git a/src/account_mgr.h b/src/account_mgr.h index 8342c9c..2286a19 100644 --- a/src/account_mgr.h +++ b/src/account_mgr.h @@ -18,6 +18,8 @@ namespace wxhelper{ int Logout(); std::string GetQRCodeUrl(); + + int EnterWeChat(); }; }