Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Anti-Shotbot Bypasser */
- #include <windows.h>
- #include <thread>
- #include <iostream>
- HHOOK MouseHook;
- LRESULT CALLBACK ReplaceMousehook(int nCode, WPARAM wParam, LPARAM lParam)
- {
- if (nCode == HC_ACTION && (wParam == WM_RBUTTONDOWN || wParam == WM_LBUTTONDOWN))
- {
- reinterpret_cast<MSLLHOOKSTRUCT*>(lParam)->flags = 0;
- std::cout << "Injection bypassed!" << std::endl;
- }
- return CallNextHookEx(MouseHook,nCode,wParam,lParam);
- }
- void ShotbotBypassExample()
- {
- while(true)
- {
- if (GetAsyncKeyState(VK_NUMPAD0)&1)
- {
- std::cout << "Sending input now." << std::endl;
- INPUT input[2];
- input[0].type = INPUT_MOUSE;
- input[0].mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
- input[1].type = INPUT_MOUSE;
- input[1].mi.dwFlags = MOUSEEVENTF_LEFTUP;
- SendInput(2, input, sizeof(INPUT));
- }
- Sleep(1);
- }
- }
- int main(int argc, char** argv)
- {
- std::thread keybind(ShotbotBypassExample);
- keybind.joinable();
- HHOOK hook = SetWindowsHookEx( WH_MOUSE_LL, ReplaceMousehook, GetModuleHandle(0), NULL );
- MSG message;
- while (GetMessage(&message,NULL,0,0)) {
- TranslateMessage( &message );
- DispatchMessage( &message );
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment