3.9.2.23部分更新

This commit is contained in:
hugy 2023-03-27 17:52:30 +08:00
parent 1a1a1fe964
commit 789b4b6e75
11 changed files with 89 additions and 24 deletions

View File

@ -10,13 +10,13 @@
10.取消hook消息
11.hook图片
12.取消hook图片
<!-- 13.hook语音
13.hook语音
14.取消hook语音
17.删除好友
19.通过手机或qq查找微信
20.通过wxid添加好友
<!-- 17.删除好友 -->
<!-- 19.通过手机或qq查找微信 -->
<!-- 20.通过wxid添加好友 -->
25.获取群成员
26.获取群成员昵称
<!-- 26.获取群成员昵称
27.删除群成员
28.增加群成员
31.修改群昵称 -->
@ -28,15 +28,15 @@
44.退出登录
<!-- 45.确认收款 -->
46.联系人列表
<!-- 47.获取群详情
<!-- 47.获取群详情 -->
48.获取解密图片
49.图片提取文字ocr
<!-- 49.图片提取文字ocr -->
50.拍一拍
51.群消息置顶消息
52.群消息取消置顶
<!-- 51.群消息置顶消息
52.群消息取消置顶 -->
53.朋友圈首页
54.朋友圈下一页
55.获取联系人或者群名称
<!-- 55.获取联系人或者群名称
56.获取消息附件(图片,视频,文件) -->
### 接口文档:

View File

@ -228,6 +228,7 @@ void api_handle(mg_http_message *hm, struct mg_connection *c, string &ret) {
{"signature",self_info.signature},
{"dataSavePath",self_info.data_save_path},
{"currentDataPath",self_info.current_data_path},
{"dbKey",self_info.db_key},
};
ret_data["data"] = j_info;
}

View File

@ -7,16 +7,16 @@
#include "base64.h"
using namespace std;
#define WX_CHAT_ROOM_MGR_OFFSET 0x72cf60
#define WX_CHAT_ROOM_MGR_OFFSET 0x78cf20
#define WX_GET_CHAT_ROOM_DETAIL_INFO_OFFSET 0xb6f260
#define WX_NEW_CHAT_ROOM_INFO_OFFSET 0xe15de0
#define WX_FREE_CHAT_ROOM_INFO_OFFSET 0xe160b0
#define WX_DEL_CHAT_ROOM_MEMBER_OFFSET 0xb64180
#define WX_INIT_CHAT_MSG_OFFSET 0xed3be0
#define WX_ADD_MEMBER_TO_CHAT_ROOM_OFFSET 0xb63c50
#define WX_GET_MEMBER_FROM_CHAT_ROOM_OFFSET 0xB70260
#define WX_INIT_CHAT_ROOM_OFFSET 0xe13b30
#define WX_FREE_CHAT_ROOM_OFFSET 0xe13d50
#define WX_GET_MEMBER_FROM_CHAT_ROOM_OFFSET 0xbdf260
#define WX_INIT_CHAT_ROOM_OFFSET 0xe97890
#define WX_FREE_CHAT_ROOM_OFFSET 0xe97ab0
#define WX_MOD_CHAT_ROOM_MEMBER_NICK_NAME_OFFSET 0xb6adf0
#define WX_NEW_CHAT_MSG_OFFSET 0x70e2a0
#define WX_FREE_CHAT_MSG_OFFSET 0x6f4ea0

View File

@ -142,4 +142,49 @@ void CloseConsole(){
fclose(stdout);
fclose(stderr);
FreeConsole();
}
}
std::string EncodeHexString(const std::string &str) {
const std::string hex_table = "0123456789abcdef";
string sb;
for (int i = 0; i < str.length(); i++) {
sb += hex_table.at((str[i] & 0xf0) >> 4);
sb += hex_table.at((str[i] & 0x0f) >> 0);
}
return sb;
}
std::string Hex2String(const std::string &hex_str) {
std::string ret;
const std::string hex_table = "0123456789abcdef";
for (int i = 0; i < hex_str.length(); i += 2) {
ret += BYTE(hex_table.find(hex_str.at(i)) << 4 |
hex_table.find(hex_str.at(i + 1)));
}
return ret;
}
std::string Bytes2Hex(const BYTE *bytes, const int length) {
if (bytes == NULL) {
return "";
}
std::string buff;
const int len = length;
for (int j = 0; j < len; j++) {
int high = bytes[j] / 16, low = bytes[j] % 16;
buff += (high < 10) ? ('0' + high) : ('a' + high - 10);
buff += (low < 10) ? ('0' + low) : ('a' + low - 10);
}
return buff;
}
void Hex2Bytes(const std::string &hex, BYTE *bytes) {
int byte_len = hex.length() / 2;
std::string str;
unsigned int n;
for (int i = 0; i < byte_len; i++) {
str = hex.substr(i * 2, 2);
sscanf_s(str.c_str(), "%x", &n);
bytes[i] = n;
}
}

View File

@ -55,6 +55,14 @@ BOOL FindOrCreateDirectoryW(const wchar_t *path);
void CloseConsole();
std::string EncodeHexString(const std::string &str);
std::string Hex2String(const std::string &hex_str);
std::string Bytes2Hex(const BYTE *bytes, const int length);
void Hex2Bytes(const std::string &hex, BYTE *bytes);
template <typename T1, typename T2>
std::vector<T1> split(T1 str, T2 letter) {
vector<T1> arr;

View File

@ -29,7 +29,8 @@ int ForwardMsg(wchar_t *wxid, unsigned long long msgid) {
MOV ECX,ESP
LEA ESI,to_user
PUSH ESI
CALL init_chat_msg_addr
CALL init_chat_msg_addr
XOR ECX,ECX
CALL forward_msg_addr
MOVZX EAX,AL
MOV success,EAX

View File

@ -12,8 +12,8 @@ using namespace nlohmann;
using namespace std;
#define WX_RECV_MSG_HOOK_OFFSET 0xd19a0b
#define WX_RECV_MSG_HOOK_NEXT_OFFSET 0x756960
#define WX_SNS_HOOK_OFFSET 0x143ef09
#define WX_SNS_HOOK_NEXT_OFFSET 0x143f1b0
#define WX_SNS_HOOK_OFFSET 0x14f9e15
#define WX_SNS_HOOK_NEXT_OFFSET 0x14fa0a0
// SyncMgr::addMsgListToDB
// #define WX_RECV_MSG_HOOK_OFFSET 0xB9C919

View File

@ -4,9 +4,9 @@
#include "common.h"
#include "wechat_data.h"
#define WX_PAT_MGR_OFFSET 0x8d0c00
#define WX_SEND_PAT_MSG_OFFSET 0x1369850
#define WX_RET_OFFSET 0x1C94D34
#define WX_PAT_MGR_OFFSET 0x931730
#define WX_SEND_PAT_MSG_OFFSET 0x1421940
#define WX_RET_OFFSET 0x1D58751
int SendPatMsg(wchar_t* chat_room_id, wchar_t* wxid) {
int success = -1;

View File

@ -141,6 +141,15 @@ int GetSelfInfo(SelfInfoInner &out) {
*(DWORD *)(service_addr + 0x304 + 0x10));
}
}
if (*(DWORD *)(service_addr + 0x4CC) == 0 ||
*(DWORD *)(service_addr +0x4D0) == 0) {
out.db_key = string();
} else {
DWORD byte_addr = *(DWORD *)(service_addr + 0x4CC);
DWORD len = *(DWORD *)(service_addr +0x4D0);
out.db_key = Bytes2Hex((BYTE *)byte_addr,len);
}
}
WeChatString data_save_path;

View File

@ -4,9 +4,9 @@
#include "common.h"
#include "wechat_data.h"
using namespace std;
#define WX_SNS_DATA_MGR_OFFSET 0xbc4100
#define WX_SNS_GET_FIRST_PAGE_OFFSET 0x1427be0
#define WX_SNS_GET_NEXT_PAGE_OFFSET 0x1427c80
#define WX_SNS_DATA_MGR_OFFSET 0xc39680
#define WX_SNS_GET_FIRST_PAGE_OFFSET 0x14e2140
#define WX_SNS_GET_NEXT_PAGE_OFFSET 0x14e21e0
int GetFirstPage() {
int success = -1;

View File

@ -153,6 +153,7 @@ struct SelfInfoInner{
std::string data_save_path;
std::string signature;
std::string current_data_path;
std::string db_key;
};
struct UserInfo {