Quote:
Originally Posted by wizatek
Everyone its own thing :P
I like it to discover stuff
Just had many troubles discovering the weird algorythm the packages use.
There is something with the package size that wants me to add emtpy bytes in the end of it.
if the amount of bytes of in the data part of the package without the opcode is in the range of
1 + 8 +8 +8+8+8+8+8+8 then add 8 bytes
2 +8 +8 +8 +8 +8 +8 etc add 7 bytes
etc etc until 8
Thats also the problem u sayd before why the login package only let u do 8 channels.
And also why my character names also could be 6 in size only.
But im sure u have some mathematics to show me why this is haha
since i found out about this everything goes better and better
but sadly because i was never schooled in programming so i have no idea what is the right way or what is the wrong way of programming.
but in the end is having fun in what u do, and being proud on what is accomplished is the most important
|
Yes it's easy ^^ in EP2 the Packages are encrypted, the Encryption is Trippel-DES
Trippel-DES can only work when you have a multiple of 8 (because it de/encrypt in 2x 4 Byte blocks), so the package must be a multiple of 8 or it will never get parsed.
The calculation would be this:
Code:
AddByteSize = 8 - ((EncryptedDataLength - 2) Modulus 8)
- 2 because it ignores the opcodes
You can add this to the Build function, it should work with every package.
[Only registered and activated users can see links. Click Here To Register...]