Client Cryption....

05/02/2011 03:09 MixedCoder#1
after sending the auth info
IP,PORT,AccID,Token

the client response in the old client we was just decrypting wat the client is sending ....

now in the latest clients i hard there is something called TQKey or something idk how it's really going with the new clients so can please someone explain to me how it's going?

thnx
05/02/2011 04:52 { Angelius }#2
if i wasent wrong and you meant the current patch when you said (latest clients)

than yes there is something that should work as a key (loginkey),

for me im doing it almost like this ,

uint LoginKey = (uint)Rand.Next(1, 999999);
or
public static uint loginkey = 1;
where ever you have the uint.loginkey++;

and connect the logingkey to the client somehow idk something like Client.LoginKey = LoginKey ;

add the client to some dictionary

Dictionary<uint, Client> AuthorizedClients = new Dictionary<uint, Client>();
AuthorizedClients.Add(Client.UID, Client);

or maybe a list<Client> AuthorizedClients = new list<Client>();
AuthorizedClients.Add(Client);

and send the AuthResponse Packet with the client loginkey added
the offset is 8 thats where the key goes
uint(loginkey, 8);

and on loginseeq (case 1052) poll the player from the dictionary using the loginkey cus the client well respond with the login key you sent not with the client uid

uint key = (uint)BitConverter.ToUInt32(Data, 4);
uint loginkey = 0;
Character Client = new character()
foreach(in the AuthorizedClients or in the list )
{
if (key == Member.Value.LoginKey)
{
LoginKey = Member.Value.LoginKey;
Client = Member.Value;
break;
}
}

process the Client

shit that looks so damn Missie :S

and remember that sending the client uid rather than a random key/++`ed key is not gonna work cus if you logout and try to login again the client well respond with an error message cus the login key is the same (like you are still loged in) ,


and that was just one way you can do it cus there is alot more ways you can handle it


Good luck ,
05/02/2011 11:33 |NeoX#3
Korvacs conquer wiki desribes it alot better