Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
life_007
ComWeChatRobot
提交
16d42b64
C
ComWeChatRobot
项目概览
life_007
/
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,体验更适合开发者的 AI 搜索 >>
提交
16d42b64
编写于
6月 17, 2022
作者:
L
ljc545w
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加python接口说明
上级
971cd709
变更
17
展开全部
隐藏空白更改
内联
并排
Showing
17 changed file
with
1189 addition
and
840 deletion
+1189
-840
CWeChatRobot/CheckFriendStatus.cpp
CWeChatRobot/CheckFriendStatus.cpp
+0
-28
CWeChatRobot/CheckFriendStatus.h
CWeChatRobot/CheckFriendStatus.h
+1
-3
CWeChatRobot/WeChatRobot.cpp
CWeChatRobot/WeChatRobot.cpp
+0
-16
CWeChatRobot/WeChatRobot.h
CWeChatRobot/WeChatRobot.h
+0
-2
CWeChatRobot/WeChatRobotCOM.idl
CWeChatRobot/WeChatRobotCOM.idl
+37
-39
CWeChatRobot/WeChatRobotCOM_i.h
CWeChatRobot/WeChatRobotCOM_i.h
+70
-90
CWeChatRobot/WeChatRobotCOM_p.c
CWeChatRobot/WeChatRobotCOM_p.c
+475
-543
CWeChatRobot/pch.cpp
CWeChatRobot/pch.cpp
+0
-6
CWeChatRobot/robotdata.h
CWeChatRobot/robotdata.h
+0
-4
DWeChatRobot/CheckFriendStatus.cpp
DWeChatRobot/CheckFriendStatus.cpp
+3
-17
DWeChatRobot/CheckFriendStatus.h
DWeChatRobot/CheckFriendStatus.h
+3
-4
DWeChatRobot/SearchContact.h
DWeChatRobot/SearchContact.h
+1
-1
DWeChatRobot/SearchContactByNet.cpp
DWeChatRobot/SearchContactByNet.cpp
+3
-3
DWeChatRobot/pch.cpp
DWeChatRobot/pch.cpp
+2
-1
Python/wxRobot.py
Python/wxRobot.py
+594
-83
Release/CWeChatRobot.exe
Release/CWeChatRobot.exe
+0
-0
Release/DWeChatRobot.dll
Release/DWeChatRobot.dll
+0
-0
未找到文件。
CWeChatRobot/CheckFriendStatus.cpp
浏览文件 @
16d42b64
#include "pch.h"
BOOL
CheckFriendStatusInit
()
{
if
(
!
hProcess
)
return
1
;
DWORD
WeChatRobotBase
=
GetWeChatRobotBase
();
DWORD
dwId
=
0
;
DWORD
CheckFriendStatusInitRemoteAddr
=
WeChatRobotBase
+
CheckFriendStatusInitRemoteOffset
;
HANDLE
hThread
=
CreateRemoteThread
(
hProcess
,
NULL
,
0
,
(
LPTHREAD_START_ROUTINE
)
CheckFriendStatusInitRemoteAddr
,
NULL
,
0
,
&
dwId
);
if
(
hThread
)
{
WaitForSingleObject
(
hThread
,
INFINITE
);
CloseHandle
(
hThread
);
}
return
0
;
}
BOOL
CheckFriendStatusFinish
()
{
if
(
!
hProcess
)
return
1
;
DWORD
WeChatRobotBase
=
GetWeChatRobotBase
();
DWORD
dwId
=
0
;
DWORD
CheckFriendStatusFinishRemoteAddr
=
WeChatRobotBase
+
CheckFriendStatusFinishRemoteOffset
;
HANDLE
hThread
=
CreateRemoteThread
(
hProcess
,
NULL
,
0
,
(
LPTHREAD_START_ROUTINE
)
CheckFriendStatusFinishRemoteAddr
,
NULL
,
0
,
&
dwId
);
if
(
hThread
)
{
WaitForSingleObject
(
hThread
,
INFINITE
);
CloseHandle
(
hThread
);
}
return
0
;
}
DWORD
CheckFriendStatus
(
wchar_t
*
wxid
)
{
if
(
!
hProcess
)
return
1
;
...
...
CWeChatRobot/CheckFriendStatus.h
浏览文件 @
16d42b64
#pragma once
#include<windows.h>
BOOL
CheckFriendStatusInit
();
DWORD
CheckFriendStatus
(
wchar_t
*
wxid
);
BOOL
CheckFriendStatusFinish
();
\ No newline at end of file
DWORD
CheckFriendStatus
(
wchar_t
*
wxid
);
\ No newline at end of file
CWeChatRobot/WeChatRobot.cpp
浏览文件 @
16d42b64
...
...
@@ -134,14 +134,6 @@ STDMETHODIMP CWeChatRobot::CGetSelfInfo(BSTR* __result) {
return
S_OK
;
}
/*
* 参数1:预返回的值,调用时无需提供
*/
STDMETHODIMP
CWeChatRobot
::
CCheckFriendStatusInit
(
int
*
__result
)
{
*
__result
=
CheckFriendStatusInit
();
return
S_OK
;
}
/*
* 参数1:查询的wxid
* 参数2:预返回的值,调用时无需提供
...
...
@@ -151,14 +143,6 @@ STDMETHODIMP CWeChatRobot::CCheckFriendStatus(BSTR wxid,int* __result) {
return
S_OK
;
}
/*
* 参数1:预返回的值,调用时无需提供
*/
STDMETHODIMP
CWeChatRobot
::
CCheckFriendStatusFinish
(
int
*
__result
)
{
*
__result
=
CheckFriendStatusFinish
();
return
S_OK
;
}
/*
* 参数1:预返回的值,调用时无需提供
*/
...
...
CWeChatRobot/WeChatRobot.h
浏览文件 @
16d42b64
...
...
@@ -63,9 +63,7 @@ public:
STDMETHODIMP
CGetFriendListString
(
BSTR
*
__result
);
STDMETHODIMP
CGetWxUserInfo
(
BSTR
wxid
,
BSTR
*
__result
);
STDMETHODIMP
CGetSelfInfo
(
BSTR
*
__result
);
STDMETHODIMP
CCheckFriendStatusInit
(
int
*
__result
);
STDMETHODIMP
CCheckFriendStatus
(
BSTR
wxid
,
int
*
__result
);
STDMETHODIMP
CCheckFriendStatusFinish
(
int
*
__result
);
STDMETHODIMP
CGetComWorkPath
(
BSTR
*
__result
);
STDMETHODIMP
CStartReceiveMessage
(
int
*
__result
);
STDMETHODIMP
CReceiveMessage
(
VARIANT
*
__result
);
...
...
CWeChatRobot/WeChatRobotCOM.idl
浏览文件 @
16d42b64
...
...
@@ -16,43 +16,41 @@ import "ocidl.idl";
]
interface
IWeChatRobot
:
IDispatch
{
[
id
(
1
)
]
HRESULT
CStartRobotService
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
2
)
]
HRESULT
CStopRobotService
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
3
)
]
HRESULT
CSendText
(
[
in
]
BSTR
wxid
,
[
in
]
BSTR
wxmsg
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
4
)
]
HRESULT
CSendImage
(
[
in
]
BSTR
wxid
,
[
in
]
BSTR
imagepath
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
5
)
]
HRESULT
CSendFile
(
[
in
]
BSTR
wxid
,
[
in
]
BSTR
filepath
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
6
)
]
HRESULT
CSendArticle
(
[
in
]
BSTR
wxid
,
[
in
]
BSTR
title
,
[
in
]
BSTR
abstract
,
[
in
]
BSTR
url
,
[
in
]
BSTR
imgpath
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
7
)
]
HRESULT
CSendCard
(
[
in
]
BSTR
receiver
,
[
in
]
BSTR
sharedwxid
,
[
in
]
BSTR
nickname
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
8
)
]
HRESULT
CGetFriendList
(
[
out
,
retval
]
VARIANT
*
__result
)
;
[
id
(
9
)
]
HRESULT
CGetFriendListString
(
[
out
,
retval
]
BSTR
*
__result
)
;
[
id
(
10
)
]
HRESULT
CGetWxUserInfo
(
[
in
]
BSTR
wxid
,
[
out
,
retval
]
BSTR
*
__result
)
;
[
id
(
11
)
]
HRESULT
CGetSelfInfo
(
[
out
,
retval
]
BSTR
*
__result
)
;
[
id
(
12
)
]
HRESULT
CCheckFriendStatusInit
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
13
)
]
HRESULT
CCheckFriendStatus
(
[
in
]
BSTR
wxid
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
14
)
]
HRESULT
CCheckFriendStatusFinish
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
15
)
]
HRESULT
CGetComWorkPath
(
[
out
,
retval
]
BSTR
*
__result
)
;
[
id
(
16
)
]
HRESULT
CStartReceiveMessage
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
17
)
]
HRESULT
CReceiveMessage
(
[
out
,
retval
]
VARIANT
*
__result
)
;
[
id
(
18
)
]
HRESULT
CStopReceiveMessage
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
19
)
]
HRESULT
CSendAtText
(
[
in
]
BSTR
chatroomid
,
[
in
]
VARIANT
*
wxid
,
[
in
]
BSTR
wxmsg
,
[
in
]
BOOL
AutoNickName
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
20
)
]
HRESULT
CGetChatRoomMembers
(
[
in
]
BSTR
chatroomid
,
[
out
,
retval
]
VARIANT
*
__result
)
;
[
id
(
21
)
]
HRESULT
CGetDbHandles
(
[
out
,
retval
]
VARIANT
*
__result
)
;
[
id
(
22
)
]
HRESULT
CExecuteSQL
(
[
in
]
DWORD
DbHandle
,
[
in
]
BSTR
sql
,
[
out
,
retval
]
VARIANT
*
__result
)
;
[
id
(
23
)
]
HRESULT
CBackupSQLiteDB
(
[
in
]
DWORD
DbHandle
,
[
in
]
BSTR
savepath
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
24
)
]
HRESULT
CVerifyFriendApply
(
[
in
]
BSTR
v3
,
[
in
]
BSTR
v4
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
25
)
]
HRESULT
CAddFriendByWxid
(
[
in
]
BSTR
wxid
,
[
in
]
BSTR
message
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
26
)
]
HRESULT
CAddFriendByV3
(
[
in
]
BSTR
v3
,
[
in
]
BSTR
message
,
[
in
]
int
AddType
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
27
)
]
HRESULT
CGetWeChatVer
(
[
out
,
retval
]
BSTR
*
__result
)
;
[
id
(
28
)
]
HRESULT
CStartWeChat
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
29
)
]
HRESULT
CSearchContactByNet
(
[
in
]
BSTR
keyword
,
[
out
,
retval
]
VARIANT
*
__result
)
;
[
id
(
30
)
]
HRESULT
CAddBrandContact
(
[
in
]
BSTR
PublicId
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
31
)
]
HRESULT
CHookVoiceMsg
(
[
in
]
BSTR
savepath
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
32
)
]
HRESULT
CUnHookVoiceMsg
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
33
)
]
HRESULT
CHookImageMsg
(
[
in
]
BSTR
savepath
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
34
)
]
HRESULT
CUnHookImageMsg
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
35
)
]
HRESULT
CChangeWeChatVer
(
[
in
]
BSTR
verStr
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
36
)
]
HRESULT
CSendAppMsg
(
[
in
]
BSTR
wxid
,
[
in
]
BSTR
appid
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
37
)
]
HRESULT
CDeleteUser
(
[
in
]
BSTR
wxid
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
1
),
helpstring
(
"启动服务"
)
]
HRESULT
CStartRobotService
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
2
),
helpstring
(
"关闭服务"
)
]
HRESULT
CStopRobotService
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
3
),
helpstring
(
"发送文本"
)
]
HRESULT
CSendText
(
[
in
]
BSTR
wxid
,
[
in
]
BSTR
wxmsg
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
4
),
helpstring
(
"发送图片"
)
]
HRESULT
CSendImage
(
[
in
]
BSTR
wxid
,
[
in
]
BSTR
imagepath
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
5
),
helpstring
(
"发送文件"
)
]
HRESULT
CSendFile
(
[
in
]
BSTR
wxid
,
[
in
]
BSTR
filepath
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
6
),
helpstring
(
"发送XML文章"
)
]
HRESULT
CSendArticle
(
[
in
]
BSTR
wxid
,
[
in
]
BSTR
title
,
[
in
]
BSTR
abstract
,
[
in
]
BSTR
url
,
[
in
]
BSTR
imgpath
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
7
),
helpstring
(
"发送名片"
)
]
HRESULT
CSendCard
(
[
in
]
BSTR
receiver
,
[
in
]
BSTR
sharedwxid
,
[
in
]
BSTR
nickname
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
8
),
helpstring
(
"获取联系人列表,返回数组"
)
]
HRESULT
CGetFriendList
(
[
out
,
retval
]
VARIANT
*
__result
)
;
[
id
(
9
),
helpstring
(
"获取联系人列表,返回JSON"
)
]
HRESULT
CGetFriendListString
(
[
out
,
retval
]
BSTR
*
__result
)
;
[
id
(
10
),
helpstring
(
"wxid查询好友信息"
)
]
HRESULT
CGetWxUserInfo
(
[
in
]
BSTR
wxid
,
[
out
,
retval
]
BSTR
*
__result
)
;
[
id
(
11
),
helpstring
(
"获取个人信息"
)
]
HRESULT
CGetSelfInfo
(
[
out
,
retval
]
BSTR
*
__result
)
;
[
id
(
13
),
helpstring
(
"检查是否被好友删除"
)
]
HRESULT
CCheckFriendStatus
(
[
in
]
BSTR
wxid
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
15
),
helpstring
(
"获取COM的工作目录"
)
]
HRESULT
CGetComWorkPath
(
[
out
,
retval
]
BSTR
*
__result
)
;
[
id
(
16
),
helpstring
(
"启动接收消息Hook"
)
]
HRESULT
CStartReceiveMessage
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
17
),
helpstring
(
"从Hook缓存中获取一条消息"
)
]
HRESULT
CReceiveMessage
(
[
out
,
retval
]
VARIANT
*
__result
)
;
[
id
(
18
),
helpstring
(
"停止接收消息Hook"
)
]
HRESULT
CStopReceiveMessage
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
19
),
helpstring
(
"发送艾特消息"
)
]
HRESULT
CSendAtText
(
[
in
]
BSTR
chatroomid
,
[
in
]
VARIANT
*
wxid
,
[
in
]
BSTR
wxmsg
,
[
in
]
BOOL
AutoNickName
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
20
),
helpstring
(
"获取群成员wxid"
)
]
HRESULT
CGetChatRoomMembers
(
[
in
]
BSTR
chatroomid
,
[
out
,
retval
]
VARIANT
*
__result
)
;
[
id
(
21
),
helpstring
(
"获取数据库句柄"
)
]
HRESULT
CGetDbHandles
(
[
out
,
retval
]
VARIANT
*
__result
)
;
[
id
(
22
),
helpstring
(
"执行SQL"
)
]
HRESULT
CExecuteSQL
(
[
in
]
DWORD
DbHandle
,
[
in
]
BSTR
sql
,
[
out
,
retval
]
VARIANT
*
__result
)
;
[
id
(
23
),
helpstring
(
"备份数据库"
)
]
HRESULT
CBackupSQLiteDB
(
[
in
]
DWORD
DbHandle
,
[
in
]
BSTR
savepath
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
24
),
helpstring
(
"通过好友请求"
)
]
HRESULT
CVerifyFriendApply
(
[
in
]
BSTR
v3
,
[
in
]
BSTR
v4
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
25
),
helpstring
(
"wxid加好友"
)
]
HRESULT
CAddFriendByWxid
(
[
in
]
BSTR
wxid
,
[
in
]
BSTR
message
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
26
),
helpstring
(
"v3数据加好友"
)
]
HRESULT
CAddFriendByV3
(
[
in
]
BSTR
v3
,
[
in
]
BSTR
message
,
[
in
]
int
AddType
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
27
),
helpstring
(
"获取微信版本号(注册表)"
)
]
HRESULT
CGetWeChatVer
(
[
out
,
retval
]
BSTR
*
__result
)
;
[
id
(
28
),
helpstring
(
"启动微信"
)
]
HRESULT
CStartWeChat
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
29
),
helpstring
(
"网络查询用户信息"
)
]
HRESULT
CSearchContactByNet
(
[
in
]
BSTR
keyword
,
[
out
,
retval
]
VARIANT
*
__result
)
;
[
id
(
30
),
helpstring
(
"关注公众号"
)
]
HRESULT
CAddBrandContact
(
[
in
]
BSTR
PublicId
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
31
),
helpstring
(
"Hook语音消息"
)
]
HRESULT
CHookVoiceMsg
(
[
in
]
BSTR
savepath
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
32
),
helpstring
(
"取消Hook语音消息"
)
]
HRESULT
CUnHookVoiceMsg
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
33
),
helpstring
(
"Hook图片消息"
)
]
HRESULT
CHookImageMsg
(
[
in
]
BSTR
savepath
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
34
),
helpstring
(
"取消Hook图片消息"
)
]
HRESULT
CUnHookImageMsg
(
[
out
,
retval
]
int
*
__result
)
;
[
id
(
35
),
helpstring
(
"修改微信版本号"
)
]
HRESULT
CChangeWeChatVer
(
[
in
]
BSTR
verStr
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
36
),
helpstring
(
"发送小程序"
)
]
HRESULT
CSendAppMsg
(
[
in
]
BSTR
wxid
,
[
in
]
BSTR
appid
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
37
),
helpstring
(
"删除好友"
)
]
HRESULT
CDeleteUser
(
[
in
]
BSTR
wxid
,
[
out
,
retval
]
int
*
__result
)
;
}
;
[
object
,
...
...
@@ -63,7 +61,7 @@ interface IWeChatRobot : IDispatch
]
interface
IRobotEvent
:
IDispatch
{
[
id
(
1
),
helpstring
(
"微信主动推送消息"
)
]
HRESULT
CPostMessage
(
[
in
]
VARIANT
*
msg
,
[
out
,
retval
]
int
*
__result
)
;
[
id
(
1
),
helpstring
(
"
用于
微信主动推送消息"
)
]
HRESULT
CPostMessage
(
[
in
]
VARIANT
*
msg
,
[
out
,
retval
]
int
*
__result
)
;
}
;
[
uuid
(
721
abb35
-
141
a
-
4
aa2
-
94
f2
-
762
e2833fa6c
),
...
...
@@ -86,7 +84,7 @@ library WeChatRobotCOMLib
{
properties
:
methods
:
[
id
(
1
)
]
HRESULT
OnGetMessageEvent
(
VARIANT
*
msg
)
;
[
id
(
1
)
,
helpstring
(
"连接点回调,需要在客户端实现"
)
]
HRESULT
OnGetMessageEvent
(
VARIANT
*
msg
)
;
}
;
[
uuid
(
178001
e8
-
5
e64
-
4
cec
-
8032
-
1
de28801df55
)
...
...
CWeChatRobot/WeChatRobotCOM_i.h
浏览文件 @
16d42b64
此差异已折叠。
点击以展开。
CWeChatRobot/WeChatRobotCOM_p.c
浏览文件 @
16d42b64
此差异已折叠。
点击以展开。
CWeChatRobot/pch.cpp
浏览文件 @
16d42b64
...
...
@@ -24,9 +24,7 @@ DWORD SearchContactByNetRemoteOffset = 0x0;
DWORD
VerifyFriendApplyOffset
=
0x0
;
DWORD
CheckFriendStatusInitRemoteOffset
=
0x0
;
DWORD
CheckFriendStatusRemoteOffset
=
0x0
;
DWORD
CheckFriendStatusFinishRemoteOffset
=
0x0
;
DWORD
HookReceiveMessageRemoteOffset
=
0x0
;
DWORD
UnHookReceiveMessageRemoteOffset
=
0x0
;
...
...
@@ -149,12 +147,8 @@ BOOL GetProcOffset(wchar_t* workPath) {
DWORD
SearchContactByNetRemoteAddr
=
(
DWORD
)
GetProcAddress
(
hd
,
SearchContactByNetRemote
);
SearchContactByNetRemoteOffset
=
SearchContactByNetRemoteAddr
-
WeChatBase
;
DWORD
CheckFriendStatusInitRemoteAddr
=
(
DWORD
)
GetProcAddress
(
hd
,
CheckFriendStatusInitRemote
);
CheckFriendStatusInitRemoteOffset
=
CheckFriendStatusInitRemoteAddr
-
WeChatBase
;
DWORD
CheckFriendStatusRemoteAddr
=
(
DWORD
)
GetProcAddress
(
hd
,
CheckFriendStatusRemote
);
CheckFriendStatusRemoteOffset
=
CheckFriendStatusRemoteAddr
-
WeChatBase
;
DWORD
CheckFriendStatusFinishRemoteAddr
=
(
DWORD
)
GetProcAddress
(
hd
,
CheckFriendStatusFinishRemote
);
CheckFriendStatusFinishRemoteOffset
=
CheckFriendStatusFinishRemoteAddr
-
WeChatBase
;
DWORD
HookReceiveMessageRemoteAddr
=
(
DWORD
)
GetProcAddress
(
hd
,
HookReceiveMessageRemote
);
HookReceiveMessageRemoteOffset
=
HookReceiveMessageRemoteAddr
-
WeChatBase
;
...
...
CWeChatRobot/robotdata.h
浏览文件 @
16d42b64
...
...
@@ -44,9 +44,7 @@ extern DWORD GetSelfInfoOffset;
extern
DWORD
DeleteSelfInfoCacheOffset
;
extern
wstring
SelfInfoString
;
extern
DWORD
CheckFriendStatusInitRemoteOffset
;
extern
DWORD
CheckFriendStatusRemoteOffset
;
extern
DWORD
CheckFriendStatusFinishRemoteOffset
;
extern
DWORD
HookReceiveMessageRemoteOffset
;
extern
DWORD
UnHookReceiveMessageRemoteOffset
;
...
...
@@ -96,9 +94,7 @@ extern DWORD ChangeWeChatVerRemoteOffset;
#define VerifyFriendApplyRemote "VerifyFriendApplyRemote"
#define CheckFriendStatusInitRemote "CheckFriendStatusInitRemote"
#define CheckFriendStatusRemote "CheckFriendStatusRemote"
#define CheckFriendStatusFinishRemote "CheckFriendStatusFinishRemote"
#define HookReceiveMessageRemote "HookReceiveMessage"
#define UnHookReceiveMessageRemote "UnHookReceiveMessage"
...
...
DWeChatRobot/CheckFriendStatus.cpp
浏览文件 @
16d42b64
...
...
@@ -99,15 +99,7 @@ VOID UnHookFriendStatusCode() {
}
/*
* 供外部调用的检查好友状态接口1,启动HOOK
* return:void
*/
VOID
CheckFriendStatusInitRemote
()
{
HookFriendStatusCode
();
}
/*
* 供外部调用的检查好友状态接口2,检查并返回状态码
* 供外部调用的检查好友状态接口,检查并返回状态码
* lparameter:要检查的联系人wxid保存地址
* return:DWORD,好友状态码
*/
...
...
@@ -116,20 +108,14 @@ DWORD CheckFriendStatusRemote(LPVOID lparameter) {
return
LocalFriendStatus
;
}
/*
* 供外部调用的检查好友状态接口3,取消HOOK
* return:void
*/
VOID
CheckFriendStatusFinishRemote
()
{
UnHookFriendStatusCode
();
}
/*
* 检查好友状态的具体实现
* wxid:要检查的联系人wxid
* return:void
*/
VOID
__stdcall
CheckFriendStatus
(
wchar_t
*
wxid
)
{
if
(
!
CheckFriendStatusHooked
)
HookFriendStatusCode
();
LocalFriendStatus
=
0x0
;
DWORD
WeChatWinBase
=
GetWeChatWinBase
();
DWORD
CheckFriendStatusCall1
=
WeChatWinBase
+
CheckFriendStatusCall1Offset
;
...
...
DWeChatRobot/CheckFriendStatus.h
浏览文件 @
16d42b64
#pragma once
#include<windows.h>
extern
"C"
__declspec
(
dllexport
)
VOID
CheckFriendStatusInitRemote
();
extern
"C"
__declspec
(
dllexport
)
DWORD
CheckFriendStatusRemote
(
LPVOID
lparameter
);
extern
"C"
__declspec
(
dllexport
)
VOID
CheckFriendStatusFinishRemote
();
VOID
__stdcall
CheckFriendStatus
(
wchar_t
*
wxid
);
\ No newline at end of file
VOID
__stdcall
CheckFriendStatus
(
wchar_t
*
wxid
);
VOID
UnHookFriendStatusCode
();
VOID
HookFriendStatusCode
();
\ No newline at end of file
DWeChatRobot/SearchContact.h
浏览文件 @
16d42b64
...
...
@@ -7,4 +7,4 @@ wchar_t* __stdcall GetUserNickNameByWxId(wchar_t* wxid);
void
__stdcall
SearchContactByNet
(
wchar_t
*
keyword
);
extern
"C"
__declspec
(
dllexport
)
DWORD
SearchContactByNetRemote
(
LPVOID
keyword
);
void
StopSearchContactHook
();
\ No newline at end of file
void
UnHookSearchContact
();
\ No newline at end of file
DWeChatRobot/SearchContactByNet.cpp
浏览文件 @
16d42b64
...
...
@@ -165,7 +165,7 @@ __declspec(naked) void dealUserInfo() {
}
}
static
void
StartSearchContactHook
()
{
static
void
HookSearchContact
()
{
if
(
SearchContactHooked
)
return
;
HookAnyAddress
(
HookSearchContactErrcodeAddr
,
(
LPVOID
)
dealSearchContactErrcode
,
HookSearchContactErrcodeOldAsm
);
...
...
@@ -173,7 +173,7 @@ static void StartSearchContactHook() {
SearchContactHooked
=
true
;
}
void
StopSearchContactHook
()
{
void
UnHookSearchContact
()
{
if
(
!
SearchContactHooked
)
return
;
UnHookAnyAddress
(
HookSearchContactErrcodeAddr
,
HookSearchContactErrcodeOldAsm
);
...
...
@@ -218,7 +218,7 @@ static void DeleteUserInfoCache() {
void
__stdcall
SearchContactByNet
(
wchar_t
*
keyword
)
{
StartSearchContactHook
();
HookSearchContact
();
DeleteUserInfoCache
();
DWORD
SearchContactByNetCall1
=
GetWeChatWinBase
()
+
SearchContactByNetCall1Offset
;
DWORD
SearchContactByNetCall2
=
GetWeChatWinBase
()
+
SearchContactByNetCall2Offset
;
...
...
DWeChatRobot/pch.cpp
浏览文件 @
16d42b64
...
...
@@ -132,7 +132,8 @@ void UnHookAnyAddress(DWORD dwHookAddr, char* originalRecieveCode)
void
UnHookAll
()
{
UnHookLogMsgInfo
();
UnHookReceiveMessage
();
StopSearchContactHook
();
UnHookFriendStatusCode
();
UnHookSearchContact
();
UnHookVoiceMsg
();
UnHookImageMsg
();
return
;
...
...
Python/wxRobot.py
浏览文件 @
16d42b64
此差异已折叠。
点击以展开。
Release/CWeChatRobot.exe
浏览文件 @
16d42b64
无法预览此类型文件
Release/DWeChatRobot.dll
浏览文件 @
16d42b64
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录