Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
011231
ComWeChatRobot
提交
60dda384
C
ComWeChatRobot
项目概览
011231
/
ComWeChatRobot
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ComWeChatRobot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
60dda384
编写于
4月 11, 2022
作者:
L
ljc545w
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
接收消息添加文件保存路径
上级
e9e251cd
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
22 addition
and
4 deletion
+22
-4
CWeChatRobot/ReceiveMessage.cpp
CWeChatRobot/ReceiveMessage.cpp
+13
-1
DWeChatRobot/ReceiveMessage.cpp
DWeChatRobot/ReceiveMessage.cpp
+7
-2
Release/CWeChatRobot.exe
Release/CWeChatRobot.exe
+0
-0
Release/DWeChatRobot.dll
Release/DWeChatRobot.dll
+0
-0
wxRobot.py
wxRobot.py
+2
-1
未找到文件。
CWeChatRobot/ReceiveMessage.cpp
浏览文件 @
60dda384
...
...
@@ -10,6 +10,8 @@ struct GetRemoteMessageStruct {
DWORD
l_wxid
;
DWORD
message
;
DWORD
l_message
;
DWORD
filepath
;
DWORD
l_filepath
;
};
struct
MessageStruct
{
...
...
@@ -17,6 +19,7 @@ struct MessageStruct {
wchar_t
*
sender
;
wchar_t
*
wxid
;
wchar_t
*
message
;
wchar_t
*
filepath
;
};
BOOL
StartReceiveMessage
()
{
...
...
@@ -114,6 +117,10 @@ SAFEARRAY* ReceiveMessage() {
ReadProcessMemory
(
hProcess
,
(
LPCVOID
)
remotemessage
.
wxid
,
message
.
wxid
,
(
remotemessage
.
l_wxid
+
1
)
*
sizeof
(
wchar_t
),
0
);
message
.
message
=
new
wchar_t
[
remotemessage
.
l_message
+
1
];
ReadProcessMemory
(
hProcess
,
(
LPCVOID
)
remotemessage
.
message
,
message
.
message
,
(
remotemessage
.
l_message
+
1
)
*
sizeof
(
wchar_t
),
0
);
message
.
filepath
=
new
wchar_t
[
remotemessage
.
l_filepath
+
1
];
ZeroMemory
(
message
.
filepath
,
(
remotemessage
.
l_filepath
+
1
)
*
2
);
if
(
remotemessage
.
l_filepath
)
ReadProcessMemory
(
hProcess
,
(
LPCVOID
)
remotemessage
.
filepath
,
message
.
filepath
,
(
remotemessage
.
l_filepath
+
1
)
*
sizeof
(
wchar_t
),
0
);
}
else
{
return
NULL
;
...
...
@@ -126,8 +133,9 @@ SAFEARRAY* ReceiveMessage() {
L"sender"
,
L"wxid"
,
L"message"
,
L"filepath"
,
};
SAFEARRAYBOUND
rgsaBound
[
2
]
=
{
{
4
,
0
},{
2
,
0
}
};
SAFEARRAYBOUND
rgsaBound
[
2
]
=
{
{
5
,
0
},{
2
,
0
}
};
psaValue
=
SafeArrayCreate
(
VT_VARIANT
,
2
,
rgsaBound
);
long
keyIndex
[
2
]
=
{
0
,
0
};
keyIndex
[
0
]
=
0
;
keyIndex
[
1
]
=
0
;
...
...
@@ -146,5 +154,9 @@ SAFEARRAY* ReceiveMessage() {
hr
=
SafeArrayPutElement
(
psaValue
,
keyIndex
,
&
(
_variant_t
)
MessageInfoKey
[
3
].
c_str
());
keyIndex
[
0
]
=
3
;
keyIndex
[
1
]
=
1
;
hr
=
SafeArrayPutElement
(
psaValue
,
keyIndex
,
&
(
_variant_t
)
message
.
message
);
keyIndex
[
0
]
=
4
;
keyIndex
[
1
]
=
0
;
hr
=
SafeArrayPutElement
(
psaValue
,
keyIndex
,
&
(
_variant_t
)
MessageInfoKey
[
4
].
c_str
());
keyIndex
[
0
]
=
4
;
keyIndex
[
1
]
=
1
;
hr
=
SafeArrayPutElement
(
psaValue
,
keyIndex
,
&
(
_variant_t
)
message
.
filepath
);
return
psaValue
;
}
\ No newline at end of file
DWeChatRobot/ReceiveMessage.cpp
浏览文件 @
60dda384
...
...
@@ -12,6 +12,8 @@ struct messageStruct {
DWORD
l_wxid
;
wchar_t
*
message
;
DWORD
l_message
;
wchar_t
*
filepath
;
DWORD
l_filepath
;
};
vector
<
messageStruct
>
messageVector
;
...
...
@@ -56,8 +58,11 @@ VOID ReceiveMessage(DWORD messageAddr) {
memcpy
(
message
.
message
,
(
wchar_t
*
)(
*
(
DWORD
*
)(
messageAddr
+
0x70
)),
length
*
2
);
message
.
l_message
=
length
;
// FileSavePath:messageAddr + 0x1AC
length
=
*
(
DWORD
*
)(
messageAddr
+
0x1AC
+
0x4
);
message
.
filepath
=
new
wchar_t
[
length
+
1
];
ZeroMemory
(
message
.
filepath
,
(
length
+
1
)
*
2
);
memcpy
(
message
.
filepath
,
(
wchar_t
*
)(
*
(
DWORD
*
)(
messageAddr
+
0x1AC
)),
length
*
2
);
message
.
l_filepath
=
length
;
messageVector
.
push_back
(
message
);
}
...
...
Release/CWeChatRobot.exe
浏览文件 @
60dda384
无法预览此类型文件
Release/DWeChatRobot.dll
浏览文件 @
60dda384
无法预览此类型文件
wxRobot.py
浏览文件 @
60dda384
...
...
@@ -190,7 +190,8 @@ def ReceiveMessageCallBack(robot,message):
if
message
[
'sender'
]
!=
'filehelper'
:
wxSender
=
robot
.
GetWxUserInfo
(
message
[
'sender'
])
sender
=
wxSender
[
'wxNickName'
]
if
wxSender
[
'wxNickName'
]
!=
'null'
else
message
[
'sender'
]
print
(
"{}:{}"
.
format
(
sender
,
message
[
'message'
]))
print
(
"来自 {}"
.
format
(
sender
))
print
(
message
)
def
test_SendText
():
import
os
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录