ianobermiller / tibiatekbot

Automatically exported from code.google.com/p/tibiatekbot
3 stars 0 forks source link

TibiaTek Keyboard #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Add WASD capabilities to the bot. For this we will need an injected DLL.

Original issue reported on code.google.com by cameri2...@gmail.com on 5 Nov 2007 at 11:53

GoogleCodeExporter commented 9 years ago

Original comment by cameri2...@gmail.com on 18 Dec 2007 at 1:39

GoogleCodeExporter commented 9 years ago
Here is my strategy for implementing a proxy for recv only into the dll, 
allowing us
to send packets to the client.

Create Server as done with a proxy
Create a new socket
Connect new socket to server
At this point we have a server which can be used for sending packets to the 
client,
however the client will not listen to the recv socket. We also have a socket 
that
will listen to the server, but will not do anything to the client. Now, for the 
trick.
Recv will still be hooked as before, except this time instead of simply doing
something like
MyRecv(SOCKET s, LPVOID data, int len, int flags)
(extra code)
recv(SOCKET s, LPVOID data, int len, int flags)

we will replace s with out new socket and create a new thread which acts as a 
proxy.
Now whenever recv is called it will listen on our new socket, and since we have
access to that sockets send() we can now send packets to the clients

I am also trying to work how the socket is stored in tibias memory. Do you guys 
know
where it is? Else wise recv will need to be hooked in two stages 

hook recv with MyRecv1

MyRecv1
{
store socket data somewhere so we know where to recv from in the future
hook recv with MyRecv2 //im not actually sure if this will work. Infact it would
probably just be easier to go MyRecv1 = MyRecv2
MyRecv2()
}
MyRecv2
{
blah blah blah
recv(new socket)
}

Tell me if that would work for you guys

Original comment by carlchat...@gmail.com on 18 Dec 2007 at 3:21

GoogleCodeExporter commented 9 years ago

Original comment by sonic5....@gmail.com on 18 Dec 2007 at 6:38

GoogleCodeExporter commented 9 years ago
Remember *DEAD*, if you're working on an issue, update the status accordingly, 
I'll 
do it for you now because I know you already started it.

Original comment by sonic5....@gmail.com on 31 Dec 2007 at 1:13

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'm changing the feature to TibiaTek Keyboard, since WASD is too restrictive.
The keyboard will be totally configurable.

Original comment by cameri2...@gmail.com on 8 Mar 2008 at 1:18