|
You last visited: Today at 06:10
Advertisement
[Teaching Units] ProxyParadise! A step by step proxy tutorial!
Discussion on [Teaching Units] ProxyParadise! A step by step proxy tutorial! within the CO2 Programming forum part of the Conquer Online 2 category.
01/12/2012, 10:12
|
#226
|
elite*gold: 0
Join Date: May 2008
Posts: 25
Received Thanks: 3
|
Quote:
Originally Posted by pro4never
What patch is the private server? It looks as though you're using the new encryption version I uploaded which would only work somewhere between like patch 5280-5327 (not sure when the original cast encryption change was... late 5200's I feel). If you're on an older patch (5065, 5095, 5165) you'll want to be using blowfish encryption, NOT cast encryption.
You can change this by replacing blowfish.cs file with the one from an earlier version of the download (eg: the first version uploaded)
|
I done this, also had to replace Native.cs, But still get the same error.
|
|
|
01/12/2012, 19:29
|
#227
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
Well then
Patch of Pserver?
You've already obtained the proper encryption key from the client?
What errors are you getting specifically?
When do the errors occur (most likely answered by the error but worth asking)
|
|
|
01/13/2012, 00:24
|
#228
|
elite*gold: 0
Join Date: May 2008
Posts: 25
Received Thanks: 3
|
Quote:
Originally Posted by pro4never
Well then
Patch of Pserver?
You've already obtained the proper encryption key from the client?
What errors are you getting specifically?
When do the errors occur (most likely answered by the error but worth asking)
|
Patch of the Pserver is 5095.
The encyption key from the client was "DR654dt34trg4UI6"
The error i was getting was posted before, bout the role not having reference and being null.
I get the after login in through the loginserver. Client crashes as it trys to connect to the game server.
|
|
|
01/14/2012, 21:37
|
#229
|
elite*gold: 0
Join Date: Dec 2007
Posts: 108
Received Thanks: 42
|
Quote:
Originally Posted by mfgdjyb
Patch of the Pserver is 5095.
The encyption key from the client was "DR654dt34trg4UI6"
The error i was getting was posted before, bout the role not having reference and being null.
I get the after login in through the loginserver. Client crashes as it trys to connect to the game server.
|
If I recall correctly, the client crashes if you try to connect to the loop back address (127.0.0.1). Use your LAN IP instead.
|
|
|
01/15/2012, 01:15
|
#230
|
elite*gold: 223
Join Date: Dec 2007
Posts: 1,076
Received Thanks: 257
|
Quote:
Originally Posted by Belth
If I recall correctly, the client crashes if you try to connect to the loop back address (127.0.0.1). Use your LAN IP instead.
|
Or use hamachi IP. (To get LAN IP, open cmd and type 'ipconfig'. Your LAN-IP should be in there)
|
|
|
01/15/2012, 06:49
|
#231
|
elite*gold: 0
Join Date: May 2008
Posts: 25
Received Thanks: 3
|
Quote:
Originally Posted by OELABOELA
Or use hamachi IP. (To get LAN IP, open cmd and type 'ipconfig'. Your LAN-IP should be in there)
|
I've tried the following IPs, My external IP, my Lan IP and Hamachi, all of them result in the client crashing trying to connect to the game server.
|
|
|
01/16/2012, 00:59
|
#232
|
elite*gold: 223
Join Date: Dec 2007
Posts: 1,076
Received Thanks: 257
|
Quote:
Originally Posted by mfgdjyb
I've tried the following IPs, My external IP, my Lan IP and Hamachi, all of them result in the client crashing trying to connect to the game server.
|
Yea, because the encryption is outdated..
|
|
|
01/20/2012, 07:16
|
#233
|
elite*gold: 0
Join Date: Dec 2006
Posts: 11
Received Thanks: 6
|
Yo pro4never,
How can I find out the encryption key of the packets? Im making my own proxy here, since the begin, but now, Im having problems to decrypt the auth/game packets. Could you give me a light ? =D
See ya
|
|
|
01/20/2012, 17:13
|
#234
|
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
|
Quote:
Originally Posted by 6123007
Yo pro4never,
How can I find out the encryption key of the packets? Im making my own proxy here, since the begin, but now, Im having problems to decrypt the auth/game packets. Could you give me a light ? =D
See ya
|
Reverse engineering.
|
|
|
01/29/2012, 20:00
|
#235
|
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
|
as i don't have a username said , throw reversed engineering u should be able to figure out the encryption key also about cryptography u need to be aware of it
---------------------
in case anyone cant see the example pro4never mentioned (basic server client , here it is , a bit modified with more checks)
client
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;
namespace Client1
{
class Program
{
static void Main(string[] args)
{
Socket connection = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
connection.Connect("127.0.0.1", 5555);
while (connection.Connected)
{
Console.WriteLine("client connected to server on ip : 127.0.0.1 and port 5555" + "\n");
Console.WriteLine("client is ready to send packets , please enter some string to be sent as byte array" + "\n");
string buffertobesent = Console.ReadLine();
connection.Send(Encoding.ASCII.GetBytes(buffertobesent));
Console.WriteLine("\n" + "client send to the server this following packets : " + buffertobesent + "\n");
}
Console.WriteLine("disconnected" + "\n");
Console.ReadLine();
}
}
}
server
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
namespace Server
{
class Program
{
static void Main(string[] args)
{
Socket listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
listener.Bind(new IPEndPoint(IPAddress.Any, 5555));
listener.Listen(100);
Socket connection = listener.Accept();
Console.WriteLine("port 5555 is on and accepting all connections from any client" + "\n");
Console.WriteLine("waiting connection" + "\n");
if (connection.Connected)
Console.WriteLine("client connected" + "\n");
byte[] buffer = new byte[1024]; // this will be our client buffer
while(connection.Connected)
{
Console.WriteLine("now we are connected and waiting for packets (buffer to be sent)" + "\n");
byte[] rec = null;
int lenght = connection.Receive(buffer, SocketFlags.None);
if (lenght > 0 && lenght < 1025)
rec = new byte[lenght];
Array.Copy(buffer, rec, lenght);
Console.WriteLine("recived packets(encoding.ascii.getstring(rec) : " + "\n");
Console.WriteLine("\n" + Encoding.ASCII.GetString(rec) + "\n");
}
if (connection.Connected == false)
Console.WriteLine("connection disconnected" + "\n");
if (listener.Connected == false)
Console.WriteLine("listener.connected is false" + "\n");
Console.ReadLine();
}
}
}
feel free to correct if something if wrong , feel free to ask for further explaining  , thanks and credits goes for pro4never
|
|
|
01/29/2012, 20:22
|
#236
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
Quote:
Originally Posted by injection illusion logic
as i don't have a username said , throw reversed engineering u should be able to figure out the encryption key also about cryptography u need to be aware of it
---------------------
in case anyone cant see the example pro4never mentioned (basic server client , here it is , a bit modified with more checks)
client
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;
namespace Client1
{
class Program
{
static void Main(string[] args)
{
Socket connection = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
connection.Connect("127.0.0.1", 5555);
while (connection.Connected)
{
Console.WriteLine("client connected to server on ip : 127.0.0.1 and port 5555" + "\n");
Console.WriteLine("client is ready to send packets , please enter some string to be sent as byte array" + "\n");
string buffertobesent = Console.ReadLine();
connection.Send(Encoding.ASCII.GetBytes(buffertobesent));
Console.WriteLine("\n" + "client send to the server this following packets : " + buffertobesent + "\n");
}
Console.WriteLine("disconnected" + "\n");
Console.ReadLine();
}
}
}
server
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
namespace Server
{
class Program
{
static void Main(string[] args)
{
Socket listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
listener.Bind(new IPEndPoint(IPAddress.Any, 5555));
listener.Listen(100);
Socket connection = listener.Accept();
Console.WriteLine("port 5555 is on and accepting all connections from any client" + "\n");
Console.WriteLine("waiting connection" + "\n");
if (connection.Connected)
Console.WriteLine("client connected" + "\n");
byte[] buffer = new byte[1024]; // this will be our client buffer
while(connection.Connected)
{
Console.WriteLine("now we are connected and waiting for packets (buffer to be sent)" + "\n");
byte[] rec = null;
int lenght = connection.Receive(buffer, SocketFlags.None);
if (lenght > 0 && lenght < 1025)
rec = new byte[lenght];
Array.Copy(buffer, rec, lenght);
Console.WriteLine("recived packets(encoding.ascii.getstring(rec) : " + "\n");
Console.WriteLine("\n" + Encoding.ASCII.GetString(rec) + "\n");
}
if (connection.Connected == false)
Console.WriteLine("connection disconnected" + "\n");
if (listener.Connected == false)
Console.WriteLine("listener.connected is false" + "\n");
Console.ReadLine();
}
}
}
feel free to correct if something if wrong , feel free to ask for further explaining  , thanks and credits goes for pro4never
|
Not sure how much you want the code picked apart but seeing as I can be mean....
Client program.
Your outer loop will send all of those messages every time.
There is no way to allow the client to disconnect/end program (not important but w/e)
Server program
Only allows for 1 connection, does not run on its own thread (blocks entire program so you can't do any sort of sending back to the client, no disconnection event handlers besides just looping while they are connected.
I haven't dealt with sync sockets in ages but I somehow feel like some of that won't even work...
But yes, there's a number of tutorials about basic client/server type systems on epvp if you were interested in furthering your knowledge.
|
|
|
01/29/2012, 20:29
|
#237
|
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
|
true , didnt want to make another loop to check for them just once so i added them in that loop  sorry lazy bam XD
didnt care about disconnect , was just testing , but umm lemme make this more advanced and add disconnection packets (client send packets to server to tell him to disconnect)
(about the rest it was just fast test , it works smoothly and pretty fine)
sure im trying to get more info about handling but the point is tutorials is low-advanced and there is no medium , thats why most of ppl stuck in the middle of there ways but its fine im working on this , thanks for info
|
|
|
01/30/2012, 00:10
|
#238
|
elite*gold: 0
Join Date: Jan 2012
Posts: 85
Received Thanks: 23
|
thank u very much mr.pro4never for ur awesome work
|
|
|
01/30/2012, 06:13
|
#239
|
elite*gold: 0
Join Date: Jan 2007
Posts: 118
Received Thanks: 20
|
Game server encryption is still in the hand of the gurus? Hope it will be release to the public soon  .
|
|
|
01/30/2012, 10:27
|
#240
|
elite*gold: 0
Join Date: Jul 2011
Posts: 2
Received Thanks: 0
|
thanks
|
|
|
All times are GMT +1. The time now is 06:11.
|
|