| View previous topic :: View next topic |
| Author |
Message |
Deine Mutter Expert Cheater
Reputation: 1
Joined: 05 Apr 2006 Posts: 181
|
Posted: Sun Dec 09, 2007 2:24 pm Post subject: Distinguish between real and fake keystrokes |
|
|
Hello,
At the moment i'm writing a bot for the game "Cabal online". I use the SendInput function. I can send keys but it doesn't has an effect. For example if i send the "2"-key for attacking, my character doesn't attack, but the key is sent (i can write in the chatbox ..). So is it possible that cabel uses a function, which distinguish between real keystrokes and fake keystrokes which are sent by SendInput (and if it is possible, how can i bypass it?)?
I really become fucking desperate, because I spent a lot of time in bypassing SendInput in kernel-mode, and now the shit is not working ..
_________________
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sun Dec 09, 2007 2:32 pm Post subject: |
|
|
post your SendInput code with all the parameters please
_________________
|
|
| Back to top |
|
 |
Deine Mutter Expert Cheater
Reputation: 1
Joined: 05 Apr 2006 Posts: 181
|
Posted: Sun Dec 09, 2007 2:38 pm Post subject: |
|
|
| Code: | procedure MySendInput(nInputs: UINT; var pInputs: TInput; cbSize: Integer);stdcall;
[...]
procedure TForm1.Button1Click(Sender: TObject);
var Input: array of TInput;
begin
Sleep(3000);
SetLength(Input, 2);
Input[0].Itype := INPUT_KEYBOARD;
Input[0].ki.dwFlags := KEYEVENTF_EXTENDEDKEY;
Input[0].ki.wVk := 50;
Input[1].Itype := INPUT_KEYBOARD;
Input[1].ki.dwFlags := KEYEVENTF_KEYUP;
Input[1].ki.wVk := 50;
MySendInput(1, Input[0], sizeof(TInput));
Sleep(100);
MySendInput(1, Input[1], sizeof(TInput));
end; |
I think my function isn't the problem .. because the keys are sent
_________________
|
|
| Back to top |
|
 |
fl00d Newbie cheater
Reputation: 0
Joined: 21 Nov 2007 Posts: 14
|
Posted: Sun Dec 09, 2007 2:50 pm Post subject: |
|
|
| is this game protected by anything?
|
|
| Back to top |
|
 |
Deine Mutter Expert Cheater
Reputation: 1
Joined: 05 Apr 2006 Posts: 181
|
Posted: Sun Dec 09, 2007 2:51 pm Post subject: |
|
|
| fl00d wrote: | | is this game protected by anything? |
GameGuard
_________________
|
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Sun Dec 09, 2007 3:25 pm Post subject: |
|
|
| Deine Mutter wrote: | | fl00d wrote: | | is this game protected by anything? |
GameGuard | There's your problem. You've to bypass SendInput and all the hooked functions SendInput is using.
|
|
| Back to top |
|
 |
Deine Mutter Expert Cheater
Reputation: 1
Joined: 05 Apr 2006 Posts: 181
|
Posted: Sun Dec 09, 2007 3:33 pm Post subject: |
|
|
Did you read, that i bypassed SendInput in user and kernel-mode (NtUserSendInput)? And did you read that i can send keys?
btw: What do you mean with all the functions SendInput is using?
_________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Dec 09, 2007 3:42 pm Post subject: |
|
|
Works just like this in Ghost Online. Your problem is DirectInput.
Or... it could be a focus issue. By default your keys are sent to the chatbox unless you set your keyboard focus on the main game, which is easier to remedy.
_________________
|
|
| Back to top |
|
 |
Deine Mutter Expert Cheater
Reputation: 1
Joined: 05 Apr 2006 Posts: 181
|
Posted: Sun Dec 09, 2007 3:46 pm Post subject: |
|
|
and what would you suggest me if it is DirectInput or the focus problem?
_________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Dec 09, 2007 3:57 pm Post subject: |
|
|
DI -> Send keystrokes not at the OS level, but at the game level
FP -> Study how the game determines if the window is active, or that you're in game and mimic it.
_________________
|
|
| Back to top |
|
 |
Deine Mutter Expert Cheater
Reputation: 1
Joined: 05 Apr 2006 Posts: 181
|
Posted: Sun Dec 09, 2007 4:11 pm Post subject: |
|
|
I don't think that it is the focus problem .. so .. i'm gonna read something about DirectInput .. thank you
_________________
|
|
| Back to top |
|
 |
Cx Master Cheater
Reputation: 0
Joined: 27 Jul 2007 Posts: 367
|
Posted: Sun Dec 09, 2007 6:34 pm Post subject: |
|
|
It's neither; it's how the game reads the input. You can't use just a VKK.
_________________
armed with this small butterfly net
i will face the world alone
& never be lonely. |
|
| Back to top |
|
 |
Deine Mutter Expert Cheater
Reputation: 1
Joined: 05 Apr 2006 Posts: 181
|
Posted: Mon Dec 10, 2007 4:08 pm Post subject: |
|
|
| Cx wrote: | | It's neither; it's how the game reads the input. You can't use just a VKK. |
And what shall i use instead? Scancode?
[EDIT]
Before i will start to learn about DirectInput, i have a question about something what confuses me:
It seems like the lParam of the WM_CHAR message of the original Input (green box) and the lParam of the WM_CHAR message of my fake Input are not the same (although there is the same Virtual Key in both cases). What do i need to modify to change the lParam. I tried to change some parameters when using SendInput .. without success.
_________________
|
|
| Back to top |
|
 |
Cx Master Cheater
Reputation: 0
Joined: 27 Jul 2007 Posts: 367
|
Posted: Mon Dec 10, 2007 5:37 pm Post subject: |
|
|
That's the answer.
You don't need to look into DX.
It's because of the hardware keycode; you need to use it.
_________________
armed with this small butterfly net
i will face the world alone
& never be lonely. |
|
| Back to top |
|
 |
Deine Mutter Expert Cheater
Reputation: 1
Joined: 05 Apr 2006 Posts: 181
|
Posted: Tue Dec 11, 2007 3:28 pm Post subject: |
|
|
My bot is working now, thank you very much
_________________
|
|
| Back to top |
|
 |
|