Register for your free account! | Forgot your password?

You last visited: Today at 05:06

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Custom source

Discussion on Custom source within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
kill_acvc's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 63
Received Thanks: 0
Exclamation Custom source

#Never mind, solved.
To those who replied, thanks.
kill_acvc is offline  
Old 04/02/2012, 02:22   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
What patch are you trying to work with? Encryptions have all changed including the exchange sequence.

Really depends on what patch you're trying to work with. If you're getting disconnected when you try to send server key packet then you are either encrypting it incorrectly, using the wrong encryption key, etcetc.
pro4never is offline  
Old 04/02/2012, 02:47   #3
 
kill_acvc's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 63
Received Thanks: 0
Quote:
Originally Posted by pro4never View Post
What patch are you trying to work with? Encryptions have all changed including the exchange sequence.

Really depends on what patch you're trying to work with. If you're getting disconnected when you try to send server key packet then you are either encrypting it incorrectly, using the wrong encryption key, etcetc.
I'm working with patch 5517 and I was following your guide.







I think the problem is may be the encryption.. let me describe how I'm encrypting it.

First : When the client connects to the game server I initialize a "Client" instance which uses "Wrapper" class as argument.

Second : This calls the default constructor for the "Client" class, method in which the variables concerning game encryption are initialized, that is, "GameCryptography" and "DHKeyExchange.ServerKeyExchange" class.





Oh and my CPU is 64 bits. I tried compiling in 64 bits but the result was the same.

[Edit]

Also, I think this may help :
kill_acvc is offline  
Old 04/02/2012, 21:06   #4
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,192
It's not using Blowfish anymore. The client's DH Key has changed and the game cipher is now Cast-128. That changed happened on patch 5509.

Spirited is offline  
Thanks
1 User
Old 04/03/2012, 03:26   #5
 
kill_acvc's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 63
Received Thanks: 0
Quote:
Originally Posted by Fаng View Post
It's not using Blowfish anymore. The client's DH Key has changed and the game cipher is now Cast-128. That changed happened on patch 5509.


Thanks. If it weren't by you I'd still be stuck at that stage. However, I've found myself into another situation now =P. If it's not asking too much :

- My recieve handler.
Code:
void OnRecieve(byte[] arg1, Wrapper arg2, byte[] arg3)
        {
            Client GameClient = (Client)arg2.connector;
            if(GameClient.HasExchangedKeys)
                EntryPoint.DebugPrint("Server has recieved non-dh packet!");
            GameClient.GameCryptography.Decrypt(arg1);
            if (!GameClient.HasExchangedKeys)
            {                
                    byte[] Data = arg1;
                    MemoryStream MS = new MemoryStream(Data);
                    BinaryReader BR = new BinaryReader(MS);
                    BR.ReadBytes(7);
                    uint PacketLen = BR.ReadUInt32();
                    int JunkLen = BR.ReadInt32();
                    BR.ReadBytes(JunkLen);
                    int Len = BR.ReadInt32();
                    string PubKey = ASCIIEncoding.ASCII.GetString(BR.ReadBytes(Len));
                    //remove from ConectionQueue and add to ConnectedClients.
                    EntryPoint.DebugPrint("Recieved DHKEY : " + PubKey);
                    GameClient.GameCryptography = GameClient.KeyExchange.HandleClientKeyPacket(PubKey, GameClient.GameCryptography);
                    BR.Close();
                    MS.Close();
                    GameClient.HasExchangedKeys = true;
                    if (ConnectedClients.ContainsKey(arg2._socket))
                    {
                        ConnectedClients.Remove(GameClient.Socket);
                        ConnectedClients.Add(GameClient.Socket, GameClient);
                    }
                    else
                    {
                        ConnectedClients.Add(GameClient.Socket, GameClient);
                    }
                    
            }
            else
            {
                GameClient = (Client)ConnectedClients[arg2._socket];
                //Size
                //Type
                byte[] Data = arg1;
                ushort Size = PacketReader.ReadUInt16(Data, 0);
                ushort Type = PacketReader.ReadUInt16(Data, 2);
                EntryPoint.DebugPrint("[Analysis]Recieved packet Size[Read size :" + Size.ToString() + " // Actual size: "+Data.Length+"] Type[" + Type.ToString() + "] .");
                if (Type == 1052) 
                {
                    MessageBox.Show("Yey!!!");
                }
                else
                {
                    GamePacketHandler.Handle(Data, GameClient);
                }
            }
        }
Video showing what happens when I run my server :



I'm sure the problem isn't the encryption, else I wouldn't have gotten up to this part. Yet, it isn't working. What to do?
kill_acvc is offline  
Reply

Tags
conquer, dh, packet, private, server


Similar Threads Similar Threads
[Release] Custom Source - HepX_CO
08/05/2013 - CO2 PServer Guides & Releases - 50 Replies
This is my first open-source Conquer Online 2.0 emulator. I will keep this updated, and post an message every time I post a new version. Server Details Name: HepX GameServer Game: Conquer Online 2.0 Patch: 5165 Server Version: 0.1 How to set this up:
problem with custom source
11/11/2011 - CO2 Private Server - 0 Replies
based on these 2 guides http://www.elitepvpers.com/forum/co2-pserver-guid es-releases/1531960-guide-coding-your-own-source.h tml http://www.elitepvpers.com/forum/co2-pserver-guid es-releases/776370-guide-faq-lets-make-custom-sour ce.html i coded a base but for some reason i get login freeze what could be causing that
DeathCo's custom lotf source
12/09/2008 - CO2 Private Server - 13 Replies
hi guys its me Death from DeathCo and i just felt like sharing my customized lotf source with yall.... hav fun.... Thanks are greatly appreciated



All times are GMT +1. The time now is 05:06.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.