diff --git a/WeChatFerry/rpc/pb_types.h b/WeChatFerry/rpc/pb_types.h index 897b8af..82f5459 100644 --- a/WeChatFerry/rpc/pb_types.h +++ b/WeChatFerry/rpc/pb_types.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include #include @@ -55,6 +55,7 @@ typedef struct { string name; string mobile; string home; + string alias; } UserInfo_t; typedef struct { diff --git a/WeChatFerry/rpc/proto/wcf.proto b/WeChatFerry/rpc/proto/wcf.proto index 296fcf6..e965576 100644 --- a/WeChatFerry/rpc/proto/wcf.proto +++ b/WeChatFerry/rpc/proto/wcf.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +syntax = "proto3"; package wcf; option java_package = "com.iamteer"; @@ -178,6 +178,7 @@ message UserInfo string name = 2; // 昵称 string mobile = 3; // 手机号 string home = 4; // 文件/图片等父路径 + string alias = 5; // 修改后的wxid } message DecPath diff --git a/WeChatFerry/spy/account_manager.cpp b/WeChatFerry/spy/account_manager.cpp index b7c0306..d0353af 100644 --- a/WeChatFerry/spy/account_manager.cpp +++ b/WeChatFerry/spy/account_manager.cpp @@ -82,6 +82,7 @@ UserInfo_t get_user_info() ui.home = get_home_path().generic_string(); ui.name = get_string_value(service_addr, OsAcc::NAME); ui.mobile = get_string_value(service_addr, OsAcc::MOBILE); + ui.alias = get_string_value(service_addr, OsAcc::ALIAS); return ui; } @@ -104,6 +105,7 @@ bool rpc_get_user_info(uint8_t *out, size_t *len) rsp.msg.ui.name = (char *)ui.name.c_str(); rsp.msg.ui.mobile = (char *)ui.mobile.c_str(); rsp.msg.ui.home = (char *)ui.home.c_str(); + rsp.msg.ui.alias = (char *)ui.alias.c_str(); }); } diff --git a/WeChatFerry/spy/offsets.h b/WeChatFerry/spy/offsets.h index 32ac72f..5066766 100644 --- a/WeChatFerry/spy/offsets.h +++ b/WeChatFerry/spy/offsets.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include @@ -13,6 +13,7 @@ namespace Account constexpr uint64_t NAME = 0x1E8; // 昵称 constexpr uint64_t MOBILE = 0x128; // 手机号 constexpr uint64_t LOGIN = 0x7F8; // 登录状态 + constexpr uint64_t ALIAS = 0x108; // 修改后的WXID } namespace Chatroom