diff --git a/python/wcferry/client.py b/python/wcferry/client.py index 230f245..72ce2d6 100644 --- a/python/wcferry/client.py +++ b/python/wcferry/client.py @@ -61,11 +61,14 @@ class Wcf(): self.sender = msg.sender self.roomid = msg.roomid self.content = msg.content + self.extra_data = msg.extra_data def __str__(self) -> str: s = f"{'自己发的:' if self._is_self else ''}" s += f"{self.sender}[{self.roomid}]:{self.id}:{self.type}:{self.xml.replace(chr(10), '').replace(chr(9),'')}\n" s += self.content + s += "\n" + s += self.extra_data return s def from_self(self) -> bool: diff --git a/rpc/pb_types.h b/rpc/pb_types.h index 679af84..185ac6b 100644 --- a/rpc/pb_types.h +++ b/rpc/pb_types.h @@ -43,4 +43,5 @@ typedef struct { string sender; string roomid; string content; + string extra_data; } WxMsg_t; diff --git a/rpc/proto/wcf.proto b/rpc/proto/wcf.proto index 86c5751..7cf877c 100644 --- a/rpc/proto/wcf.proto +++ b/rpc/proto/wcf.proto @@ -84,6 +84,7 @@ message WxMsg string sender = 6; // 消息发送者 string roomid = 7; // 群 id(如果是群消息的话) string content = 8; // 消息内容 + string extra_data = 9; // 附加内容 } message TextMsg diff --git a/spy/load_calls.cpp b/spy/load_calls.cpp index 7fb7742..277cb70 100644 --- a/spy/load_calls.cpp +++ b/spy/load_calls.cpp @@ -9,8 +9,8 @@ WxCalls_t wxCalls = { { 0x236607C, 0x23660F4, 0x2366128 }, // User Info: wxid, nickname, mobile 0x521D30, // Send Message /* Receive Message: - Hook, call, type, self, id, msgXml, roomId, wxId, content */ - { 0x550F4C, 0xA96350, 0x38, 0x3C, 0x184, 0x1EC, 0x48, 0x170, 0x70 }, + Hook, call, type, self, id, msgXml, roomId, wxId, content, extra_data */ + { 0x550F4C, 0xA96350, 0x38, 0x3C, 0x184, 0x1EC, 0x48, 0x170, 0x70, 0x1AC }, { 0xBD780, 0x771980, 0x521640 }, // Send Image Message { 0xC3B70, 0x771980, 0x3ED8C0 }, // Send File Message { 0xB8A70, 0x3ED5E0, 0x107F00, 0x3ED7B0, 0x2386FE4 }, // Send xml Message diff --git a/spy/spy_types.h b/spy/spy_types.h index 25100ca..c38fcb4 100644 --- a/spy/spy_types.h +++ b/spy/spy_types.h @@ -18,6 +18,7 @@ typedef struct RecvMsg { DWORD roomId; // 群聊时,为群ID;私聊时,为微信ID DWORD wxId; // 私聊时,为空;群聊时,为发送者微信ID DWORD content; // 消息内容地址 + DWORD extra_data; // 附加数据 } RecvMsg_t; typedef struct Sendfile {