Guest User

Untitled

a guest
Jan 18th, 2014
781
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. /* Anti-Shotbot Bypasser */
  2. #include <windows.h>
  3. #include <thread>
  4. #include <iostream>
  5.  
  6.  
  7. HHOOK MouseHook;
  8.  
  9.  
  10. LRESULT CALLBACK ReplaceMousehook(int nCode, WPARAM wParam, LPARAM lParam)
  11. {
  12. if (nCode == HC_ACTION && (wParam == WM_RBUTTONDOWN || wParam == WM_LBUTTONDOWN))
  13. {
  14. reinterpret_cast<MSLLHOOKSTRUCT*>(lParam)->flags = 0;
  15. std::cout << "Injection bypassed!" << std::endl;
  16. }
  17. return CallNextHookEx(MouseHook,nCode,wParam,lParam);
  18. }
  19.  
  20.  
  21. void ShotbotBypassExample()
  22. {
  23. while(true)
  24. {
  25. if (GetAsyncKeyState(VK_NUMPAD0)&1)
  26. {
  27. std::cout << "Sending input now." << std::endl;
  28. INPUT input[2];
  29. input[0].type = INPUT_MOUSE;
  30. input[0].mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
  31. input[1].type = INPUT_MOUSE;
  32. input[1].mi.dwFlags = MOUSEEVENTF_LEFTUP;
  33. SendInput(2, input, sizeof(INPUT));
  34. }
  35.  
  36.  
  37. Sleep(1);
  38. }
  39. }
  40.  
  41.  
  42. int main(int argc, char** argv)
  43. {
  44. std::thread keybind(ShotbotBypassExample);
  45. keybind.joinable();
  46.  
  47.  
  48. HHOOK hook = SetWindowsHookEx( WH_MOUSE_LL, ReplaceMousehook, GetModuleHandle(0), NULL );
  49. MSG message;
  50. while (GetMessage(&message,NULL,0,0)) {
  51. TranslateMessage( &message );
  52. DispatchMessage( &message );
  53. }
  54. return 0;
  55. }
Add Comment
Please, Sign In to add comment