Anti Shotbot

Status
Not open for further replies.
1> main.cpp
1>c:\users\patrick\documents\visual studio 2010\projects\bot\bot\main.cpp(48): error C2059: syntax error : '}'
1>c:\users\patrick\documents\visual studio 2010\projects\bot\bot\main.cpp(48): error C2143: syntax error : missing ';' before '}'
1>c:\users\patrick\documents\visual studio 2010\projects\bot\bot\main.cpp(48): error C2059: syntax error : '}'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


help '-' ?
 
PHP:
#include <windows.h>

HHOOK MouseHook;

LRESULT CALLBACK MouseHookProc(int nCode, WPARAM wParam, LPARAM lParam)
{
	if (nCode == HC_ACTION)
	{
		if(wParam == WM_RBUTTONDOWN || wParam == WM_LBUTTONDOWN)
		{
			MSLLHOOKSTRUCT *info=(MSLLHOOKSTRUCT*)lParam;     
			if((info->flags & LLMHF_INJECTED) == LLMHF_INJECTED)
			{
				ExitProcess(-1);
			}
		}
	}
	return CallNextHookEx(MouseHook,nCode,wParam,lParam);
}


void AntiShotbotLogger()
{
    HINSTANCE hInstance = GetModuleHandle(NULL);

    MouseHook = SetWindowsHookEx( WH_MOUSE_LL, MouseHookProc, hInstance, NULL );
    MSG message;
    while (GetMessage(&message,NULL,0,0)) {
        TranslateMessage( &message );
        DispatchMessage( &message );
    }

    UnhookWindowsHookEx(MouseHook);
    return;
}

extern "C"
{
	__declspec(dllexport) BOOL __stdcall DllMain(HINSTANCE hInst,DWORD reason,LPVOID lpv)
	{
		if (reason == DLL_PROCESS_ATTACH)
		{
			CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)&AntiShotbotLogger,NULL,0,NULL);
		}
	return true;
	}
}
}
is this here
 
Last edited:
PHP:
/* 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;
}

Run after Gunz, profit.
 
Last edited:
Code:
/* 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;
}

Run after Gunz, profit.

n1 wizkid dont know how to decently code.
 
PHP:
/* 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;
}

Run after Gunz, profit.

I already pointed out to Gunblade he should check the Windows hook chain and loop through the hooks to make sure you're the only one to hook.


(Credits to Alex from ntinternals)

This is still without the use of a driver, just like I pointed out.

n1 wizkid dont know how to decently code.

Whoever you are, you're doing an awesome job on sucking his dick. Too bad I was one step ahead of him so you might want to pull your pants up.

-edit-
Judging by your English, you're probably Vitor.
 
Last edited:
No, since GunZ uses DirectInput for keyboard input (at least for the keys that are relevant to cheating) and DirectInput retrieves input straight from the driver rather than from Windows so you can't inject any keyboard input into GunZ using a Windows API function.

In fact, as I just told Gunblade, porting GunZ to get mouse input from DirectInput instead of Windows would also patch all shotbots that have ever been released.

Gunz 1.5 use DInput for mouse...you mean for the "click" thing?
 
Status
Not open for further replies.
Back