commit
9e3e86c52d
@ -61,12 +61,14 @@ class Wcf():
|
||||
self.sender = msg.sender
|
||||
self.roomid = msg.roomid
|
||||
self.content = msg.content
|
||||
self.thumb = msg.thumb
|
||||
self.extra = msg.extra
|
||||
|
||||
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 += f"\n{self.thumb}" if self.thumb else ""
|
||||
s += f"\n{self.extra}" if self.extra else ""
|
||||
return s
|
||||
|
||||
|
@ -43,5 +43,6 @@ typedef struct {
|
||||
string sender;
|
||||
string roomid;
|
||||
string content;
|
||||
string thumb;
|
||||
string extra;
|
||||
} WxMsg_t;
|
||||
|
@ -67,7 +67,8 @@ message WxMsg
|
||||
string sender = 6; // 消息发送者
|
||||
string roomid = 7; // 群 id(如果是群消息的话)
|
||||
string content = 8; // 消息内容
|
||||
string extra = 9; // 附加内容
|
||||
string thumb = 9; // 缩略图
|
||||
string extra = 10; // 附加内容
|
||||
}
|
||||
|
||||
message TextMsg
|
||||
|
@ -9,8 +9,8 @@ WxCalls_t wxCalls = {
|
||||
{ 0x236607C, 0x23660F4, 0x2366128, 0x2386F7C }, // User Info: wxid, nickname, mobile, home
|
||||
0x521D30, // Send Message
|
||||
/* Receive Message:
|
||||
Hook, call, type, self, id, msgXml, roomId, wxId, content, extra */
|
||||
{ 0x550F4C, 0xA96350, 0x38, 0x3C, 0x184, 0x1EC, 0x48, 0x170, 0x70, 0x1AC },
|
||||
Hook, call, type, self, id, msgXml, roomId, wxId, content, thumb, extra */
|
||||
{ 0x550F4C, 0xA96350, 0x38, 0x3C, 0x184, 0x1EC, 0x48, 0x170, 0x70, 0x198, 0x1AC},
|
||||
{ 0xBD780, 0x771980, 0x521640 }, // Send Image Message
|
||||
{ 0xC3B70, 0x771980, 0x3ED8C0 }, // Send File Message
|
||||
{ 0xB8A70, 0x3ED5E0, 0x107F00, 0x3ED7B0, 0x2386FE4 }, // Send xml Message
|
||||
|
@ -90,9 +90,15 @@ void DispatchMsg(DWORD reg)
|
||||
wxMsg.sender = GetStringByAddress(*p + g_WxCalls.recvMsg.roomId);
|
||||
}
|
||||
wxMsg.content = GetStringByAddress(*p + g_WxCalls.recvMsg.content);
|
||||
|
||||
wxMsg.thumb = GetStringByAddress(*p + g_WxCalls.recvMsg.thumb);
|
||||
if (!wxMsg.thumb.empty()) {
|
||||
wxMsg.thumb = GetHomePath() + "\\WeChat Files\\" + wxMsg.thumb;
|
||||
}
|
||||
|
||||
wxMsg.extra = GetStringByAddress(*p + g_WxCalls.recvMsg.extra);
|
||||
if (!wxMsg.extra.empty()) {
|
||||
wxMsg.extra = GetHomePath() + "\\" + wxMsg.extra;
|
||||
wxMsg.extra = GetHomePath() + "\\WeChat Files\\" + wxMsg.extra;
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -330,6 +330,7 @@ static void PushMessage()
|
||||
rsp.msg.wxmsg.sender = (char *)wxmsg.sender.c_str();
|
||||
rsp.msg.wxmsg.roomid = (char *)wxmsg.roomid.c_str();
|
||||
rsp.msg.wxmsg.content = (char *)wxmsg.content.c_str();
|
||||
rsp.msg.wxmsg.thumb = (char*)wxmsg.thumb.c_str();
|
||||
rsp.msg.wxmsg.extra = (char *)wxmsg.extra.c_str();
|
||||
gMsgQueue.pop();
|
||||
LOG_DEBUG("Recv msg: {}", wxmsg.content);
|
||||
|
@ -19,6 +19,7 @@ typedef struct RecvMsg {
|
||||
DWORD roomId; // 群聊时,为群ID;私聊时,为微信ID
|
||||
DWORD wxId; // 私聊时,为空;群聊时,为发送者微信ID
|
||||
DWORD content; // 消息内容地址
|
||||
DWORD thumb; // 缩略图
|
||||
DWORD extra; // 附加数据
|
||||
} RecvMsg_t;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user