From b6a550a165c559a69266774fc72bbfd23ab18f0d Mon Sep 17 00:00:00 2001 From: Changhua Date: Mon, 17 Feb 2025 19:09:18 +0800 Subject: [PATCH] refactor(message_handler): rename log call offset --- WeChatFerry/spy/message_handler.cpp | 2 +- WeChatFerry/spy/offsets.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WeChatFerry/spy/message_handler.cpp b/WeChatFerry/spy/message_handler.cpp index 92adf64..34b8adf 100644 --- a/WeChatFerry/spy/message_handler.cpp +++ b/WeChatFerry/spy/message_handler.cpp @@ -194,7 +194,7 @@ int Handler::EnableLog() if (isLogging) return 1; pLogLevel = reinterpret_cast(g_WeChatWinDllAddr + OsLog::LEVEL); - funcWxLog = reinterpret_cast(g_WeChatWinDllAddr + OsLog::FUNCTION); + funcWxLog = reinterpret_cast(g_WeChatWinDllAddr + OsLog::CALL); if (InitializeHook() != MH_OK) return -1; if (MH_CreateHook(funcWxLog, &PrintWxLog, reinterpret_cast(&realWxLog)) != MH_OK) return -2; diff --git a/WeChatFerry/spy/offsets.h b/WeChatFerry/spy/offsets.h index 447c077..a394d0c 100644 --- a/WeChatFerry/spy/offsets.h +++ b/WeChatFerry/spy/offsets.h @@ -20,8 +20,8 @@ namespace Message { namespace Log { - constexpr uint64_t FUNCTION = 0x261B890; // 日志函数 - constexpr uint64_t LEVEL = 0x56E4244; // 日志级别 + constexpr uint64_t LEVEL = 0x56E4244; // 日志级别 + constexpr uint64_t CALL = 0x261B890; // 日志函数 } } }