Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crossin的编程教室
ComWeChatRobot
提交
0b527e72
C
ComWeChatRobot
项目概览
Crossin的编程教室
/
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,发现更多精彩内容 >>
提交
0b527e72
编写于
3月 28, 2022
作者:
L
ljc545w
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加Debug模式输出微信运行日志
上级
f6f8bd05
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
377 addition
and
324 deletion
+377
-324
DWeChatRobot/DWeChatRobot.vcxproj
DWeChatRobot/DWeChatRobot.vcxproj
+191
-189
DWeChatRobot/DWeChatRobot.vcxproj.filters
DWeChatRobot/DWeChatRobot.vcxproj.filters
+131
-122
DWeChatRobot/LogMsgInfo.cpp
DWeChatRobot/LogMsgInfo.cpp
+48
-0
DWeChatRobot/LogMsgInfo.h
DWeChatRobot/LogMsgInfo.h
+4
-0
DWeChatRobot/dllmain.cpp
DWeChatRobot/dllmain.cpp
+1
-13
DWeChatRobot/pch.cpp
DWeChatRobot/pch.cpp
+1
-0
DWeChatRobot/pch.h
DWeChatRobot/pch.h
+1
-0
未找到文件。
DWeChatRobot/DWeChatRobot.vcxproj
浏览文件 @
0b527e72
...
@@ -157,6 +157,7 @@
...
@@ -157,6 +157,7 @@
<ClInclude
Include=
"CheckFriendStatus.h"
/>
<ClInclude
Include=
"CheckFriendStatus.h"
/>
<ClInclude
Include=
"framework.h"
/>
<ClInclude
Include=
"framework.h"
/>
<ClInclude
Include=
"FriendList.h"
/>
<ClInclude
Include=
"FriendList.h"
/>
<ClInclude
Include=
"LogMsgInfo.h"
/>
<ClInclude
Include=
"pch.h"
/>
<ClInclude
Include=
"pch.h"
/>
<ClInclude
Include=
"SelfInfo.h"
/>
<ClInclude
Include=
"SelfInfo.h"
/>
<ClInclude
Include=
"SendArticle.h"
/>
<ClInclude
Include=
"SendArticle.h"
/>
...
@@ -183,6 +184,7 @@
...
@@ -183,6 +184,7 @@
<ClCompile
Include=
"SendImage.cpp"
/>
<ClCompile
Include=
"SendImage.cpp"
/>
<ClCompile
Include=
"SendText.cpp"
/>
<ClCompile
Include=
"SendText.cpp"
/>
<ClCompile
Include=
"UserInfo.cpp"
/>
<ClCompile
Include=
"UserInfo.cpp"
/>
<ClCompile
Include=
"LogMsgInfo.cpp"
/>
</ItemGroup>
</ItemGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
<ImportGroup
Label=
"ExtensionTargets"
>
<ImportGroup
Label=
"ExtensionTargets"
>
...
...
DWeChatRobot/DWeChatRobot.vcxproj.filters
浏览文件 @
0b527e72
...
@@ -49,6 +49,9 @@
...
@@ -49,6 +49,9 @@
<Filter
Include=
"好友相关\好友状态"
>
<Filter
Include=
"好友相关\好友状态"
>
<UniqueIdentifier>
{5a6d7d8b-a126-4da1-b540-09c79886ffef}
</UniqueIdentifier>
<UniqueIdentifier>
{5a6d7d8b-a126-4da1-b540-09c79886ffef}
</UniqueIdentifier>
</Filter>
</Filter>
<Filter
Include=
"微信日志"
>
<UniqueIdentifier>
{54c9691e-786d-4279-874d-b1e35673a666}
</UniqueIdentifier>
</Filter>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<ClInclude
Include=
"framework.h"
>
<ClInclude
Include=
"framework.h"
>
...
@@ -84,6 +87,9 @@
...
@@ -84,6 +87,9 @@
<ClInclude
Include=
"CheckFriendStatus.h"
>
<ClInclude
Include=
"CheckFriendStatus.h"
>
<Filter>
好友相关\好友状态
</Filter>
<Filter>
好友相关\好友状态
</Filter>
</ClInclude>
</ClInclude>
<ClInclude
Include=
"LogMsgInfo.h"
>
<Filter>
微信日志
</Filter>
</ClInclude>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<ClCompile
Include=
"dllmain.cpp"
>
<ClCompile
Include=
"dllmain.cpp"
>
...
@@ -119,5 +125,8 @@
...
@@ -119,5 +125,8 @@
<ClCompile
Include=
"CheckFriendStatus.cpp"
>
<ClCompile
Include=
"CheckFriendStatus.cpp"
>
<Filter>
好友相关\好友状态
</Filter>
<Filter>
好友相关\好友状态
</Filter>
</ClCompile>
</ClCompile>
<ClCompile
Include=
"LogMsgInfo.cpp"
>
<Filter>
微信日志
</Filter>
</ClCompile>
</ItemGroup>
</ItemGroup>
</Project>
</Project>
\ No newline at end of file
DWeChatRobot/LogMsgInfo.cpp
0 → 100644
浏览文件 @
0b527e72
#include "pch.h"
#define HookLogMsgInfoAddrOffset 0x103408A4 - 0x0FC40000
#define HookLogMsgInfoNextCallOffset 0x11586DFC - 0x0FC40000
#define HookLogMsgJmpBackOffset 0x103408A9 - 0x0FC40000
DWORD
HookLogMsgInfoAddr
=
GetWeChatWinBase
()
+
HookLogMsgInfoAddrOffset
;
DWORD
NextCallAddr
=
GetWeChatWinBase
()
+
HookLogMsgInfoNextCallOffset
;
DWORD
JmpBackAddr
=
GetWeChatWinBase
()
+
HookLogMsgJmpBackOffset
;
BOOL
LogMsgHooked
=
false
;
char
LogOldAsmCode
[
5
]
=
{
0
};
VOID
PrintMsg
(
DWORD
msg
)
{
if
(
!
msg
)
return
;
string
message
=
(
char
*
)
msg
;
cout
<<
message
;
return
;
}
__declspec
(
naked
)
void
doprintmsg
(){
__asm
{
pushad
;
pushfd
;
push
eax
;
call
PrintMsg
;
add
esp
,
0x4
;
popfd
;
popad
;
call
NextCallAddr
;
jmp
JmpBackAddr
;
}
}
VOID
HookLogMsgInfo
()
{
if
(
LogMsgHooked
)
return
;
HookAnyAddress
(
HookLogMsgInfoAddr
,(
LPVOID
)
doprintmsg
,
LogOldAsmCode
);
LogMsgHooked
=
true
;
}
VOID
UnHookLogMsgInfo
()
{
if
(
!
LogMsgHooked
)
return
;
UnHookAnyAddress
(
HookLogMsgInfoAddr
,
LogOldAsmCode
);
LogMsgHooked
=
false
;
}
\ No newline at end of file
DWeChatRobot/LogMsgInfo.h
0 → 100644
浏览文件 @
0b527e72
#pragma once
#include<windows.h>
VOID
HookLogMsgInfo
();
VOID
UnHookLogMsgInfo
();
\ No newline at end of file
DWeChatRobot/dllmain.cpp
浏览文件 @
0b527e72
// dllmain.cpp : 定义 DLL 应用程序的入口点。
// dllmain.cpp : 定义 DLL 应用程序的入口点。
#include "pch.h"
#include "pch.h"
#ifdef _DEBUG
int
detach_count
=
0
;
#endif
BOOL
APIENTRY
DllMain
(
HMODULE
hModule
,
BOOL
APIENTRY
DllMain
(
HMODULE
hModule
,
DWORD
ul_reason_for_call
,
DWORD
ul_reason_for_call
,
LPVOID
lpReserved
LPVOID
lpReserved
...
@@ -16,8 +12,6 @@ BOOL APIENTRY DllMain( HMODULE hModule,
...
@@ -16,8 +12,6 @@ BOOL APIENTRY DllMain( HMODULE hModule,
{
{
#ifdef _DEBUG
#ifdef _DEBUG
CreateConsole
();
CreateConsole
();
DWORD
base
=
(
DWORD
)
GetModuleHandleA
(
"DWeChatRobot.dll"
);
printf
(
"SendImage 0x%08X
\n
"
,
(
DWORD
)
SendImage
);
printf
(
"SendImage 0x%08X
\n
"
,
(
DWORD
)
SendImage
);
printf
(
"SendText 0x%08X
\n
"
,
(
DWORD
)
SendText
);
printf
(
"SendText 0x%08X
\n
"
,
(
DWORD
)
SendText
);
printf
(
"SendFile 0x%08X
\n
"
,
(
DWORD
)
SendFile
);
printf
(
"SendFile 0x%08X
\n
"
,
(
DWORD
)
SendFile
);
...
@@ -26,19 +20,13 @@ BOOL APIENTRY DllMain( HMODULE hModule,
...
@@ -26,19 +20,13 @@ BOOL APIENTRY DllMain( HMODULE hModule,
printf
(
"SendArticle 0x%08X
\n
"
,
(
DWORD
)
SendArticle
);
printf
(
"SendArticle 0x%08X
\n
"
,
(
DWORD
)
SendArticle
);
printf
(
"SendCard 0x%08X
\n
"
,
(
DWORD
)
SendCard
);
printf
(
"SendCard 0x%08X
\n
"
,
(
DWORD
)
SendCard
);
printf
(
"CheckFriendStatus 0x%08X
\n
"
,
(
DWORD
)
CheckFriendStatus
);
printf
(
"CheckFriendStatus 0x%08X
\n
"
,
(
DWORD
)
CheckFriendStatus
);
HookLogMsgInfo
();
#endif
#endif
break
;
break
;
}
}
case
DLL_THREAD_ATTACH
:
case
DLL_THREAD_ATTACH
:
case
DLL_THREAD_DETACH
:
case
DLL_THREAD_DETACH
:
case
DLL_PROCESS_DETACH
:
{
case
DLL_PROCESS_DETACH
:
{
#ifdef _DEBUG
detach_count
++
;
if
(
detach_count
!=
1
)
{
FreeConsole
();
// UnHookAll();
}
#endif
break
;
break
;
}
}
}
}
...
...
DWeChatRobot/pch.cpp
浏览文件 @
0b527e72
...
@@ -63,5 +63,6 @@ void UnHookAnyAddress(DWORD dwHookAddr, char* originalRecieveCode)
...
@@ -63,5 +63,6 @@ void UnHookAnyAddress(DWORD dwHookAddr, char* originalRecieveCode)
}
}
void
UnHookAll
()
{
void
UnHookAll
()
{
UnHookLogMsgInfo
();
return
;
return
;
}
}
\ No newline at end of file
DWeChatRobot/pch.h
浏览文件 @
0b527e72
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include "SelfInfo.h"
#include "SelfInfo.h"
#include "SendCard.h"
#include "SendCard.h"
#include "CheckFriendStatus.h"
#include "CheckFriendStatus.h"
#include "LogMsgInfo.h"
#endif //PCH_H
#endif //PCH_H
using
namespace
std
;
using
namespace
std
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录