logd.exe do it for you (save chat & trade)
for packet, server send 4 bytes when you join server, 4 bytes more are fixed.
these all 8 bytes are use as key to crypt/decrypt packet between server & client
this key change every time server and/or client send something
you can easily find the crypt/decrypt source code on L2J
|