[Workshop] Updating code to work post client V.5018

01/22/2009 17:42 Hyberkill#76
ty haydz... maybe u can add me on msn so we can further chat : [Only registered and activated users can see links. Click Here To Register...], i wonder which byte to send to the client... there are 2 : ClientIV and ServerIV. I tryed sending both n nothing happens.. , neither when sending each separately.
01/23/2009 13:43 unknownone#77
The ClientIV and ServerIV aren't values that are sent (except in fields of ServerKeyPacket), they are initialization vectors, used in Blowfish. The reason for IVs is, the blowfish cipher works in rounds of 64-bits, and in a stream, with each 64-bits of data, the encryption depends on the previous 64-bits of the stream. This means, if you miss some data from the stream you're fucked, because it'll mess up everything following it.
The problem of course with this, is, the first 64 bits have no previous 64 bits to use for encryption, hence, Initialization vectors.

If you're using my code, you shouldn't be even touching IVs. Don't modify my code, unless you have a good reason to do so (Other than the KeyPakcet constructors I commented out, I doubt it). You should save this shit into seperate class files and mark them read-only so you don't fuck anything up. Only thing you should be doing is instantiating the classes I've written.
01/23/2009 14:22 Hyberkill#78
ok... the client connects fine to the gameserver but it doesnt send any other packet to the gameserver.... why's that?
01/23/2009 17:40 © Haydz#79
Quote:
Originally Posted by Hyberkill View Post
ok... the client connects fine to the gameserver but it doesnt send any other packet to the gameserver.... why's that?
Because then you have to do the exchange... When a client connects you send the ServerKeyPacket to them, they then reply with a clientkeypacket.
01/24/2009 01:36 Hyberkill#80
i actually tryed sending the publickey which it generates n i keep getting dced for that xD even if its encrypted with the new or old or non encrypted way...
[EDIT] i managed to send the public key without troubles now... but i guess it doesnt work coz i dont recieve the clientkey...(An established connection was aborted by the software in your host machine - thats the error...)
01/24/2009 15:25 © Haydz#81
You don't send the Key... you send the buffer
01/25/2009 13:23 Hyberkill#82
I decrypt the 2nd packet (the packet after the login packet(with the username n pass)) both ways n i encrypt the serverkeypacket _buffer both ways... n i get that damn exception n the client freezes at "Connecting to gameserver" while the server disconnects the socket giving that exception
01/25/2009 16:44 © Haydz#83
Well everything you need is here, if i told you anything else i'd be practically giving it away...

Oh and on a side note

I officially logged into 5097 earlier

Need to do considerable amount of work on the char info packet though... everythings all over the place >.>
01/26/2009 15:05 Hyberkill#84
well.... i try n try :( there are some people that even dont give a small effort to make it..they just w8 for it to be released.... n they get what i want.. but people like me who try as hard as we can, noone willing to help out..
01/26/2009 21:00 tanelipe#85
Yep yep, got it working as of today. (Previous attempts were... not so succesful) :P
01/26/2009 21:02 Hyberkill#86
how did u do it?
01/26/2009 21:05 tanelipe#87
Followed the instructions here and got a bit help from friend
01/26/2009 21:07 Hyberkill#88
can u give me just a lill hint
ill try to do it myself
01/26/2009 21:13 tanelipe#89
Code:
 
Handshake hs = (Sender.Crypto as GameCipher).Exchange.CreateHandshake();
byte[] Packet = hs.GetBytes();
Sender.Send(Packet, Packet.Length);
This is what I do when the client connects game server. What I have defined as Handshake is ServerKeyPacket in unknownone's guide; And then I just process the packet received from client and set certain variable to indicate that I have received it.
01/26/2009 21:39 Hyberkill#90
i figured out what needs to be changed in the packet... now i just need to figure out with what to change it. Maybe i should add +1 to each of the 3 values? or what? any ideas? Been trying to get this thing workin for so long.... n finally im so close.....