[Teaching Units] ProxyParadise! A step by step proxy tutorial!

01/12/2012 10:12 mfgdjyb#226
Quote:
Originally Posted by pro4never View Post
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 pro4never#227
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 mfgdjyb#228
Quote:
Originally Posted by pro4never View Post
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 Belth#229
Quote:
Originally Posted by mfgdjyb View Post
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 OELABOELA#230
Quote:
Originally Posted by Belth View Post
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 mfgdjyb#231
Quote:
Originally Posted by OELABOELA View Post
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 OELABOELA#232
Quote:
Originally Posted by mfgdjyb View Post
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 6123007#233
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 I don't have a username#234
Quote:
Originally Posted by 6123007 View Post
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 injection illusion logic#235
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 pro4never#236
Quote:
Originally Posted by injection illusion logic View Post
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 injection illusion logic#237
true , didnt want to make another loop to check for them just once so i added them in that loop :D 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 Heroka#238
[Only registered and activated users can see links. Click Here To Register...]
thank u very much mr.pro4never for ur awesome work
01/30/2012 06:13 xmen01235#239
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 alahely#240
thanks