[GUIDE] Upgrading to 5156 with CoEmu

11/24/2009 17:23 12tails#16
well.... thanks aniway
11/24/2009 17:28 ImmuneOne#17
What can I do to help?
We need help from developers and the testing community to provide as much feedback as possible to make the conquer section even better. Please read these notes. You can also give us your feedback through this thread.

Why haven’t you responded to the mail I sent you?
I might be busy with something, you know I have a life too.

Why keep this community up-to-date?
Every forum has his own speciality, and so far known we got the best coders over here regarding to conquer.

Be sure if you help to qualify to these requirements:
- Don't give things away just like that try to explain them
- If you release a source of a higher patch then just give the basics to connect, they still have to learn now don't they?
11/24/2009 17:38 12tails#18
i've got this.... can you help me?

and here is the lines where it get the error...

Code:
		public ClientSocket(Socket Sock)
		{
			CSocket = Sock;
			CSocket.NoDelay = true;
			SyncRecv = new object();
			SyncSend = new object();
			SKE = new ServerKeyExchange();
			Crypt = new GameEncryption("DR654dt34trg4UI6");
			>>>this.Send(SKE.CreateServerKeyPacket());<<<
		}
and here:

Code:
        public byte[] CreateServerKeyPacket()
        {
            client = new byte[8];
            server = new byte[8];
            OpenSSL.DH Key;
            string S1 = "A320A85EDD79171C341459E94807D71D39BB3B3F3B5161CA8 4894F3AC3FC7FEC317A2DDEC83B66D30C29261C6492643061A ECFCF4A051816D7C359A6A7B7D8FB\0";
            string S2 = "5";
            Key = new OpenSSL.DH(OpenSSL.BigNumber.FromHexString(S1), OpenSSL.BigNumber.FromHexString(S2));
            >>>Key.GenerateKeys();<<<
            return GeneratePacket(server, client, S1, S2, Key.PublicKey.ToHexString()); 
        }
and here:

Code:
public void AcceptNewConnections()
		{
			ServerSocket.Listen(100);
			while(Continue)
			{
				if(ServerName == "GameServer")
				{
					Socket CSocket = null;
					try{
						CSocket = ServerSocket.Accept();
					}
					catch(Exception e)
					{
						Console.WriteLine("Unable to accept a new connection, closing now.");
						ServerSocket.Close();
						Console.WriteLine(e.StackTrace);
						return;
					}
					try
					{
						if(CSocket.Connected)
						{
							if(!CSocket.RemoteEndPoint.ToString().Contains(SITE_IP))
							{
								>>>ClientSocket CS = new ClientSocket(CSocket);<<<
								new Thread(CS.Run).Start();
							}
							else
							{
								CSocket.Close();
							}
						}
					}
					catch(Exception e)
					{
						if(CSocket != null)
							CSocket.Close();
						Console.WriteLine("[GameServer] Unable to login a new client, see exception print below.");
						Console.WriteLine(e.ToString());
					}
				}
				else if(ServerName == "AuthServer")
				{
					Socket ASocket = null;
					try{
						ASocket = ServerSocket.Accept();
					}
					catch(Exception e)
					{
						Console.WriteLine("Unable to accept data from Auth Server.");
						ServerSocket.Close();
						Console.WriteLine(e.ToString());
						return;
					}
					if(ASocket != null)
					{
						try{
							//AuthHandler.NewAuth(ASocket);
							byte[] Buffer = new byte[8092];
							int size = ASocket.Receive(Buffer);
							byte[] Data = new byte[size];
							Array.Copy(Buffer, Data, size);
							AuthHandler.HandleAuth(Data);
							Data = null;
							Buffer = null;
						}
						catch(Exception e)
						{
							Console.WriteLine(e.ToString());
						}
					}
				}
				System.Threading.Thread.Sleep(200);
			}
		}
11/24/2009 17:58 ImmuneOne#19
It will help if you just posted the lines which cause the error and not the whole function.
11/24/2009 18:02 12tails#20
take a look now.... a used >>> <<< to show where it is....
11/24/2009 18:13 ImmuneOne#21
Just replace them.

public byte[] CreateServerKeyPacket()
**if(name == "GameServer")
11/24/2009 18:33 12tails#22
thanks....

i stay at Initializing and got unknown packet type 10010 ( general ) and i already replaced this one : X

and unknown packet 1134
11/24/2009 18:54 ImmuneOne#23
I will not help with adding features i gave you the basics in order to connect that's all,
Atleast you do some fixing yourself.
11/24/2009 18:56 12tails#24
lol... loll... i know that... but i can't connect yet... getting error at packet 10010 ( general )

wasn't just change the old packet or have to change the datatypes too?
11/24/2009 19:11 ImmuneOne#25
I recommend you using the released coemusource of alex to upgrade.
11/24/2009 19:23 12tails#26
okay will try it... thanks for all and i already know more somethings ...
also at packet processor is necessary to change case 1010 for case 10010
and change confirm login complete case 130 for 132 right?

gratefull

12tails
11/24/2009 19:30 JoieJones90#27
Quote:
Originally Posted by ImmuneOne View Post
Hey pvpers!

(Questions will be answered)

I've been wondering from time to time and it's time to move on on this forum,
In this guide i will explain how to upgrade to 5156.

Let's check the following recent changes


What's the DHKey packet?
[B]There is a sort of encryption that waits for a value in a packet to continue with the authentication. It waits for 2 strings in this case (5156):
First : "A320A85EDD79171C341459E94807D71D39BB3B3F3B5161CA8 4894F3AC3FC7FEC317A2DDEC83B66D30C29261C6492643061A ECFCF4A051816D7C359A6A7B7D8FB\0"
Second "5"
You can simply send them by using the ManagedOpenSSL library and then use it like this:

Packet values
There are some recent changes but the most needed packets at the moment to connect and move are :


First off all i will compare the functions of NewestCoServer of the packetbuilder, to CoEmu's.
NewestCoServer -> CoEmu


Then second of all this is how lengths and types work in the source:


To save some failures some time correct values of the packets (I'm gonna regret this ) :
**General
**SpawnChar
**CharInfo
**Walk

Blocked IP's


See you later.
um why didnt u say u took it from [Only registered and activated users can see links. Click Here To Register...] and [Only registered and activated users can see links. Click Here To Register...] ? everything stays in there and like exactly as u said it..
11/24/2009 20:06 ImmuneOne#28
Quote:
Originally Posted by JoieJones90 View Post
um why didnt u say u took it from [Only registered and activated users can see links. Click Here To Register...] and [Only registered and activated users can see links. Click Here To Register...] ? everything stays in there and like exactly as u said it..
What are you bullshitting about? My packets aren't from that wiki neither are my theorys. You can compare it but that just states what i said is true.
11/24/2009 20:18 12tails#29
have a big diference between the two packets....

also the game encryption of 5156 is on the new source.... very easy to get them.... just need to modify many things... also can it be converted from 5095 to 5017 right?
11/24/2009 20:45 ImmuneOne#30
Please stay on-topic.

And you should drop everything that is below patch 5156.