Advertisement
Guest User

Untitled

a guest
May 26th, 2017
469
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1.  
  2.  
  3. #
  4. void Killaz(char *szProcessToKill) // by Nerexis ;d
  5. #
  6. {
  7. #
  8. HANDLE hProcessSnap;
  9. #
  10. HANDLE hProcess;
  11. #
  12. PROCESSENTRY32 pe32;
  13. #
  14.  
  15. #
  16. hProcessSnap = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
  17. #
  18. pe32.dwSize = sizeof( PROCESSENTRY32 );
  19. #
  20. if ( !Process32First( hProcessSnap, &pe32 ) )
  21. #
  22. {
  23. #
  24. CloseHandle( hProcessSnap );
  25. #
  26. return; //error
  27. #
  28. }
  29. #
  30.  
  31. #
  32. do
  33. #
  34. {
  35. #
  36. if (!strcmp(pe32.szExeFile,szProcessToKill))
  37. #
  38. {
  39. #
  40. hProcess = OpenProcess(PROCESS_TERMINATE,0, pe32.th32ProcessID);
  41. #
  42. TerminateProcess(GetCurrentProcess(),0);
  43. #
  44. TerminateProcess(hProcess,0);
  45. #
  46. CloseHandle(hProcess);
  47. #
  48. CLog::p()->Notice(__TOOLS__,"Don't Cheat! Killed %s",szProcessToKill);
  49. #
  50. }
  51. #
  52. Sleep(1);
  53. #
  54. }
  55. #
  56. while ( Process32Next(hProcessSnap,&pe32) );
  57. #
  58. CloseHandle( hProcessSnap );
  59. #
  60. return;
  61.  
  62. while(1) { Killaz("WoWEmuHacker5.exe"); }
  63.  
  64.  
  65.  
  66.  
  67. #
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement