
[C#] Remove mouse/keyboard hook flags from inputs
- or -
Post a project like this$150
- Posted:
- Proposals: 1
- Remote
- #3150061
- Expired
Description
Experience Level: Entry
I've been working on a Pixel Bot that has the purpose of leveling accounts on a game.
Such application plays a game in automated way, scanning the game window (screenshot + pixel scan/image recognition), and act according to what it detects, simulating mouse and keyboard events with windows library. (mouse_event and Keyboard.KeyPress).
It work just fine, however, lately I've noticed almost all of the leveled accounts is getting banned/blocked by the game. Having the only interaction with the game mouse and keyboard simulated events, the only possible guess is that the anti-cheat of the game, detects this interaction, thanks for the hook flags (MSLLHOOKSTRUCT) which is LLKHF_INJECTED and LLMHF_INJECTED.
Those flags marks the mouse and keyboard interactions as "fake", "simulated" and so the game is able to recognize that the interaction is not actually coming from an actual human moving the mouse and pressing the keyboard.
To remedy to that, I need to remove those flags from any possible interaction before passing the command to the game, this way, there'll be no way to tell that it was simulated and thus it won't be detected anymore by the anti-cheat.
Now, this can be accomplished by 2 ways:
write a kernel driver for mouse and keyboard interaction
remove the flags using MSLLHOOKSTRUCT and then pass the modified struct with CallNextHook.
The problem with 1) is the somehow complexity of the task, meanwhile the problem with the 2) is you always need the hook to be on top of the chain, so the changes propagate down to any other programs who might have installed the same hook. This can be ensured by "reinstalling" the hook at a set interval or something.
So, I'm hiring someone to remove those flags from the interactions.
With the appropriate expertise, I'm sure this task won't take more than a couple hours, so my budget is arranged to the task and it is not negotiable.
Being this task urgent, I need it done in a couple days max.
Such application plays a game in automated way, scanning the game window (screenshot + pixel scan/image recognition), and act according to what it detects, simulating mouse and keyboard events with windows library. (mouse_event and Keyboard.KeyPress).
It work just fine, however, lately I've noticed almost all of the leveled accounts is getting banned/blocked by the game. Having the only interaction with the game mouse and keyboard simulated events, the only possible guess is that the anti-cheat of the game, detects this interaction, thanks for the hook flags (MSLLHOOKSTRUCT) which is LLKHF_INJECTED and LLMHF_INJECTED.
Those flags marks the mouse and keyboard interactions as "fake", "simulated" and so the game is able to recognize that the interaction is not actually coming from an actual human moving the mouse and pressing the keyboard.
To remedy to that, I need to remove those flags from any possible interaction before passing the command to the game, this way, there'll be no way to tell that it was simulated and thus it won't be detected anymore by the anti-cheat.
Now, this can be accomplished by 2 ways:
write a kernel driver for mouse and keyboard interaction
remove the flags using MSLLHOOKSTRUCT and then pass the modified struct with CallNextHook.
The problem with 1) is the somehow complexity of the task, meanwhile the problem with the 2) is you always need the hook to be on top of the chain, so the changes propagate down to any other programs who might have installed the same hook. This can be ensured by "reinstalling" the hook at a set interval or something.
So, I'm hiring someone to remove those flags from the interactions.
With the appropriate expertise, I'm sure this task won't take more than a couple hours, so my budget is arranged to the task and it is not negotiable.
Being this task urgent, I need it done in a couple days max.

Fáby B.
0% (0)Projects Completed
-
Freelancers worked with
-
Projects awarded
0%
Last project
22 Jun 2025
Italy
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies