| View previous topic :: View next topic |
| Author |
Message |
madeinqc Master Cheater
Reputation: 0
Joined: 25 Jul 2006 Posts: 356
|
Posted: Wed Nov 26, 2008 11:54 am Post subject: Sending Keys to D3D Windows [Help] |
|
|
I'm trying to send keys to D3D Window to make a bot using PostMessage
for now I have:
push 1
push 00000057 //'W' key
push 00000100 //keydown
push hWnd
call PostMessageA
And
push C0110001
push 00000057 //'W' key
push 00000101 //KeyUp
push hWnd
call PostMessageA
In fact, the key work in the 2d part of the screen (such as chat window) but dont work in 3d part of the game (such as character control key... like the looting key)
anyone here know why? is it the game that protect himself from false keystroke? I've checked API and none are hooked so is there an other way it can protect? is there something special for keys send to a d3d window that I should know?
thx for answering ^^ hoping I can solve my problem
_________________
|
|
| Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Wed Nov 26, 2008 12:06 pm Post subject: |
|
|
If the game uses gameguard, then PostMessage is hooked, but that's probably not the case because you're able to send keys to the chat window.
A possibility would be that the game uses DirectInput. This is for example the case with Maplestory's directional keys. I'm not sure how to send keys to directinput. Have you tried SendInput?
|
|
| Back to top |
|
 |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Wed Nov 26, 2008 12:38 pm Post subject: |
|
|
| Well it would be easier if you told us what compiler you were using and your IDE.
|
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Wed Nov 26, 2008 12:56 pm Post subject: |
|
|
| Code: |
push 00000057 != (push 0x000057 || push 00000057h)
|
=]
_________________
Gone |
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Wed Nov 26, 2008 3:40 pm Post subject: |
|
|
| GMZorita wrote: | | Code: |
push 00000057 != (push 0x000057 || push 00000057h)
|
=] | Depends on what he's coding with.
_________________
|
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Wed Nov 26, 2008 3:57 pm Post subject: |
|
|
| sponge wrote: | | GMZorita wrote: | | Code: |
push 00000057 != (push 0x000057 || push 00000057h)
|
=] | Depends on what he's coding with. |
I mean in general.
Edit1: Mind giving me an example? Just curious.
_________________
Gone |
|
| Back to top |
|
 |
smartz993 I post too much
Reputation: 2
Joined: 20 Jun 2006 Posts: 2013 Location: USA
|
Posted: Wed Nov 26, 2008 10:39 pm Post subject: |
|
|
| GMZorita wrote: | | sponge wrote: | | GMZorita wrote: | | Code: |
push 00000057 != (push 0x000057 || push 00000057h)
|
=] | Depends on what he's coding with. |
I mean in general.
Edit1: Mind giving me an example? Just curious. |
Ex. Auto Assembly.
|
|
| Back to top |
|
 |
madeinqc Master Cheater
Reputation: 0
Joined: 25 Jul 2006 Posts: 356
|
Posted: Wed Nov 26, 2008 11:37 pm Post subject: |
|
|
I'm programing in ASM with auto assembly for now... it's for windslayer and it use HackShield...that you can bypass by deleting it... so it's not a hacking protection...
I use post message to make it minimized... so I didn't tried the others
push 00000057 mean what it mean in asm... no need to put aob I think :p
and that's it for now, I'll search more on DirectInput tomorow
thx for answer and idea
PS: I use olly and cheatengine to hack it...
_________________
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Thu Nov 27, 2008 7:06 pm Post subject: |
|
|
| oh if ur using ce then it is in hex.
|
|
| Back to top |
|
 |
madeinqc Master Cheater
Reputation: 0
Joined: 25 Jul 2006 Posts: 356
|
Posted: Fri Nov 28, 2008 4:08 am Post subject: |
|
|
ok, for now I see 2 choices...
1-emulate a keyboard completely (can't do it loll too much job and I dont have the knowledge for)
2- find and hook the game's directinput (still dont have enough knowledge for that...)
any others way?? if not, I'll try to find more about DI and see what I can do about number 2
thx for help
_________________
|
|
| Back to top |
|
 |
Zand Master Cheater
Reputation: 0
Joined: 21 Jul 2006 Posts: 424
|
Posted: Fri Nov 28, 2008 5:46 am Post subject: |
|
|
| Use the KBC; this is R0 though.
|
|
| Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Fri Nov 28, 2008 10:38 am Post subject: |
|
|
Did you already try SendInput?
If you can bypass Hackshield then it shouldn't be a problem.
|
|
| Back to top |
|
 |
madeinqc Master Cheater
Reputation: 0
Joined: 25 Jul 2006 Posts: 356
|
Posted: Fri Nov 28, 2008 12:13 pm Post subject: |
|
|
sendinput and keybd_event work but I would like to have it minimized... that's why
and thx Zand, I'll check for KBC
_________________
|
|
| Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Fri Nov 28, 2008 3:21 pm Post subject: |
|
|
I had a look at msdn's information on DirectInput
http://msdn.microsoft.com/en-us/library/bb206171.aspx
The page at this link is a part of a tutorial on getting keyboard input. As you can see in the code on that page, the application/game can use this to check for keys that are pressed:
g_lpDIDevice->GetDeviceState(sizeof(buffer),(LPVOID)&buffer);
So if you hook that function, you can modify the buffer:
For example: everytime when the function is called, you check if your bot should be pressing the up key. If so, you could change the part of the buffer containing the up-key information so the game thinks the up-key is pressed.
However, msdn also says that there are multiple ways to receive input from DirectInput. It can also be done in a way where DirectInput calls functions of the application when a key is pressed. So I think the way to 'bypass' this all, depends on the way your game uses DirectInput.
|
|
| Back to top |
|
 |
madeinqc Master Cheater
Reputation: 0
Joined: 25 Jul 2006 Posts: 356
|
Posted: Sat Nov 29, 2008 10:10 pm Post subject: |
|
|
thx a lot to all, I'll try to find how it use DirectInput, I may have an idea, I'll need to check... there's a part of code in the game that I found that have the key value pushed so maybe it's with that function that the game know it, I'll check how it react to different API (like if I use Post message, is the good key used trought this code, etc) and I'll give news
thx a lot again ^^
_________________
|
|
| Back to top |
|
 |
|