hi guys i just want to know how you hook the bf2 sendto function and edit some packets.
hi guys i just want to know how you hook the bf2 sendto function and edit some packets.
The library you are looking for is winsock.
you could also hook the battlefield send to server routine above winsock. If you hook winsock don't use proxy hooking![]()
Well I'll say this generally for most games (and BF2 does this too), the general path data takes from client to server is through the GameVM to a generalized command packager and dispatcher. IDA or olly should properly label sendto and you can just look for the call to that routine. Barring the initial setup and teardown of a game, all game data packets are sent inband through the same send routine. However, I've seen rcon commands and text messages sent OOB on some games. (Q3?)
how do u change the readed bytes that came of the hooked function i cant seem to find an solution to change an couple of bytes in the char thats been readed
i had posted a send/recv hook on another forum hope it helps http://www.gamehacking.com/forums/sh...ghlight=socket
Thanks,
ok i understand that but if the char is read how do i change the caractert thats in the char an not at the beginning but in the middle of the char chus the sendto function sends differend chars to the server but an couple off bytes stays the same wich i want to edit and the rest leave like orriginal.
you mean change the value of a certain offset?
example:
Code:char packet[20] = "\x42\x10\x00\xBA\x0B\x0C\x00\x0E\x02\x2E\x00\x09\x01\x0A\x00\x00\x00\x00\x00"; packet[15] = 0xff;//example of what i wanted to change sendto(s,packet,19,0,sockaddr*,tolen); or buf[15] = 0xff;///example of what i wanted to change of the original buffer sendto(s,buf,len,0,sockaddr*,tolen);
\x42\x11\x00\x2B\x23\x(Player).....
Opening doors on people was always fun in Rogue Spear.![]()
(%[2ci`m]) Tetsuo` should always be blamed
(%[2ci`m]) its like einsteins 18th law or something
lol yeah
There are currently 1 users browsing this thread. (0 members and 1 guests)