engine send function

01/18/2016 11:56 luki180pl#1
As some of you might already known that there is a function in engine with signature int _cdecl SendPacket(char type, char* format, ...)
This function takes not crypted data as arguments, put the data together crypt and send.

I noticed some time ago that using this funtion isnt really safe for use because of some shared data inside cause crash or uncontrolled packet send if you use this function with many threads.

Does anybody know how to handle that problem or any good alternative for send packets?
01/21/2016 20:59 meak1#2
crypt urself is an good alternative, i never knowed that this function isnt safe, worked fine for all who used i guess ;/
01/22/2016 08:27 luki180pl#3
it works fine most of the time though. Got any hints about crypting packets myself?
01/22/2016 18:31 katze123#4
Quote:
Originally Posted by luki180pl View Post
it works fine most of the time though. Got any hints about crypting packets myself?
released by bakabug years ago. something with encrypttabledata etc ^^
01/23/2016 15:41 meak1#5
dont spent time for understand those crypting routines, just dont use any kind of threads, only your hooks(;
01/23/2016 16:47 luki180pl#6
Thanks you guys for answers, and meak i m not sure what you mean, i dont even hook this send function, i only execute it.
01/24/2016 04:05 meak1#7
no threads = safe @kal.
01/24/2016 09:11 luki180pl#8
yea but that would mean that i need to code everything in recv right?
running kal process on 1 processor seem to be a solution too.

i found also another function but got no idea how to use it. its signature:
int __thiscall function(int this, const void *a2, unsigned int a3)

a2 is a pointer to packet data, a3 is length of packet, but i got no idea how to execute __thiscall function