Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
java-徐
ComWeChatRobot
提交
35663e4f
C
ComWeChatRobot
项目概览
java-徐
/
ComWeChatRobot
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
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,发现更多精彩内容 >>
提交
35663e4f
编写于
3月 28, 2022
作者:
L
ljc545w
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
替换信息中的双引号字符
上级
0b527e72
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
44 addition
and
7 deletion
+44
-7
CWeChatRobot/FriendList.cpp
CWeChatRobot/FriendList.cpp
+6
-0
CWeChatRobot/pch.cpp
CWeChatRobot/pch.cpp
+14
-1
CWeChatRobot/pch.h
CWeChatRobot/pch.h
+3
-2
DWeChatRobot/SelfInfo.cpp
DWeChatRobot/SelfInfo.cpp
+2
-1
DWeChatRobot/UserInfo.cpp
DWeChatRobot/UserInfo.cpp
+4
-1
DWeChatRobot/pch.cpp
DWeChatRobot/pch.cpp
+13
-0
DWeChatRobot/pch.h
DWeChatRobot/pch.h
+1
-0
Release/CWeChatRobot.exe
Release/CWeChatRobot.exe
+0
-0
Release/DWeChatRobot.dll
Release/DWeChatRobot.dll
+0
-0
wxRobot.py
wxRobot.py
+1
-2
未找到文件。
CWeChatRobot/FriendList.cpp
浏览文件 @
35663e4f
...
...
@@ -70,6 +70,12 @@ void ReadFriendMessageByAddress(WxFriendAddrStruct* lpWxFriendAddr, WxFriendStru
ZeroMemory
(
lpWxFriend
->
wxRemark
,
sizeof
(
wchar_t
)
*
(
length
+
1
));
ReadProcessMemory
(
hProcess
,
(
LPCVOID
)
lpWxFriendAddr
->
wxRemarkAddr
,
&
bufferaddr
,
sizeof
(
DWORD
),
0
);
ReadProcessMemory
(
hProcess
,
(
LPCVOID
)
bufferaddr
,
lpWxFriend
->
wxRemark
,
length
*
sizeof
(
wchar_t
),
0
);
wstring
wswxRemark
=
wreplace
(
lpWxFriend
->
wxRemark
,
L'\"'
,
L"
\\\"
"
);
delete
[]
lpWxFriend
->
wxRemark
;
lpWxFriend
->
wxRemark
=
new
wchar_t
[
wswxRemark
.
length
()
+
1
];
ZeroMemory
(
lpWxFriend
->
wxRemark
,
sizeof
(
wchar_t
)
*
(
wswxRemark
.
length
()
+
1
));
memcpy
(
lpWxFriend
->
wxRemark
,
wswxRemark
.
c_str
(),
wswxRemark
.
length
()
*
2
);
wcout
<<
lpWxFriend
->
wxRemark
<<
endl
;
}
}
else
{
...
...
CWeChatRobot/pch.cpp
浏览文件 @
35663e4f
...
...
@@ -32,7 +32,7 @@ bool isFileExists_stat(string& name) {
return
(
stat
(
name
.
c_str
(),
&
buffer
)
==
0
);
}
BOOL
CreateConsole
(
void
)
{
BOOL
CreateConsole
()
{
if
(
AllocConsole
())
{
AttachConsole
(
GetCurrentProcessId
());
FILE
*
retStream
;
...
...
@@ -169,4 +169,17 @@ wstring GetComWorkPath() {
int
pos
=
wpath
.
find_last_of
(
L"
\\
"
);
wpath
=
wpath
.
substr
(
0
,
pos
);
return
wpath
;
}
wstring
wreplace
(
wstring
source
,
wchar_t
replaced
,
wstring
replaceto
)
{
wstring
temp
=
L""
;
wchar_t
*
buffer
=
(
wchar_t
*
)
source
.
c_str
();
for
(
unsigned
int
i
=
0
;
i
<
source
.
length
();
i
++
)
{
if
(
buffer
[
i
]
==
replaced
)
{
temp
+=
replaceto
;
continue
;
}
temp
+=
buffer
[
i
];
}
return
temp
;
}
\ No newline at end of file
CWeChatRobot/pch.h
浏览文件 @
35663e4f
...
...
@@ -34,5 +34,6 @@ DWORD GetWeChatRobotBase();
DWORD
GetWeChatPid
();
DWORD
StartRobotService
();
DWORD
StopRobotService
();
BOOL
CreateConsole
(
void
);
wstring
GetComWorkPath
();
\ No newline at end of file
BOOL
CreateConsole
();
wstring
GetComWorkPath
();
wstring
wreplace
(
wstring
source
,
wchar_t
replaced
,
wstring
replaceto
);
\ No newline at end of file
DWeChatRobot/SelfInfo.cpp
浏览文件 @
35663e4f
...
...
@@ -59,7 +59,8 @@ DWORD GetSelfInfoRemote() {
wchar_t
*
wtemp
=
new
wchar_t
[
strlen
(
temp
)
+
1
];
ZeroMemory
(
wtemp
,
(
strlen
(
temp
)
+
1
)
*
2
);
MultiByteToWideChar
(
CP_UTF8
,
0
,
temp
,
-
1
,
wtemp
,
strlen
(
temp
)
+
1
);
selfinfo
=
selfinfo
+
wtemp
;
wstring
wrtemp
=
wreplace
(
wtemp
,
L'\"'
,
L"
\\\"
"
);
selfinfo
=
selfinfo
+
wrtemp
;
selfinfo
=
selfinfo
+
L"
\"
"
;
if
(
i
!=
SelfInfoAddr
.
size
()
-
1
)
selfinfo
=
selfinfo
+
L","
;
...
...
DWeChatRobot/UserInfo.cpp
浏览文件 @
35663e4f
...
...
@@ -24,6 +24,7 @@ VOID WxUserInfo(DWORD address) {
address
+
0x10
,
address
+
0x24
,
address
+
0x38
,
address
+
0x58
,
address
+
0x6C
,
address
+
0xFC
,
address
+
0x110
,
...
...
@@ -37,6 +38,7 @@ VOID WxUserInfo(DWORD address) {
(
WCHAR
*
)
L"
\"
wxId
\"
"
,
(
WCHAR
*
)
L"
\"
wxNumber
\"
"
,
(
WCHAR
*
)
L"
\"
wxV3
\"
"
,
(
WCHAR
*
)
L"
\"
wxRemark
\"
"
,
(
WCHAR
*
)
L"
\"
wxNickName
\"
"
,
(
WCHAR
*
)
L"
\"
wxBigAvatar
\"
"
,
(
WCHAR
*
)
L"
\"
wxSmallAvatar
\"
"
,
...
...
@@ -49,7 +51,8 @@ VOID WxUserInfo(DWORD address) {
wUserInfo
+=
L"{"
;
for
(
unsigned
int
i
=
0
;
i
<
InfoType
.
size
();
i
++
)
{
wchar_t
*
wstemp
=
((
*
((
DWORD
*
)
InfoType
[
i
]))
!=
0
)
?
(
WCHAR
*
)(
*
((
LPVOID
*
)
InfoType
[
i
]))
:
(
WCHAR
*
)
L"null"
;
wUserInfo
=
wUserInfo
+
InfoTypeName
[
i
]
+
L":
\"
"
+
wstemp
+
L"
\"
"
;
wstring
wsrtemp
=
wreplace
(
wstemp
,
L'\"'
,
L"
\\\"
"
);
wUserInfo
=
wUserInfo
+
InfoTypeName
[
i
]
+
L":
\"
"
+
wsrtemp
+
L"
\"
"
;
if
(
i
!=
InfoType
.
size
()
-
1
)
{
wUserInfo
+=
L","
;
}
...
...
DWeChatRobot/pch.cpp
浏览文件 @
35663e4f
...
...
@@ -65,4 +65,17 @@ void UnHookAnyAddress(DWORD dwHookAddr, char* originalRecieveCode)
void
UnHookAll
()
{
UnHookLogMsgInfo
();
return
;
}
wstring
wreplace
(
wstring
source
,
wchar_t
replaced
,
wstring
replaceto
)
{
wstring
temp
=
L""
;
wchar_t
*
buffer
=
(
wchar_t
*
)
source
.
c_str
();
for
(
unsigned
int
i
=
0
;
i
<
source
.
length
();
i
++
)
{
if
(
buffer
[
i
]
==
replaced
)
{
temp
+=
replaceto
;
continue
;
}
temp
+=
buffer
[
i
];
}
return
temp
;
}
\ No newline at end of file
DWeChatRobot/pch.h
浏览文件 @
35663e4f
...
...
@@ -59,3 +59,4 @@ void Wchar_tToString(std::string& szDst, wchar_t* wchar);
void
HookAnyAddress
(
DWORD
dwHookAddr
,
LPVOID
dwJmpAddress
,
char
*
originalRecieveCode
);
void
UnHookAnyAddress
(
DWORD
dwHookAddr
,
char
*
originalRecieveCode
);
DLLEXPORT
void
UnHookAll
();
wstring
wreplace
(
wstring
source
,
wchar_t
replaced
,
wstring
replaceto
);
Release/CWeChatRobot.exe
浏览文件 @
35663e4f
无法预览此类型文件
Release/DWeChatRobot.dll
浏览文件 @
35663e4f
无法预览此类型文件
wxRobot.py
浏览文件 @
35663e4f
...
...
@@ -189,5 +189,4 @@ def test_FriendStatus():
wx
.
StopService
()
if
__name__
==
'__main__'
:
test_SendText
()
test_SendText
()
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录