[Help]trouble on my way C#

04/11/2011 19:39 kondos#1
Kevin_owner tell to mahmoda the easiest way to inject packet
Quote:
1. Create a listening socket.
2. wait for a (I assume) sro_client to connect
3. once it is connected you make a connection with the official sro server.
4. Well how I did this was creating 2 loops in separate thread to handle the messages and just forward them.
5. proxy done you can now add a little packet parser to prevent packets to be send and send your own packets
I've done the 1st , 2nd and 3rd but what do you mean by the 4th and how do you do this please give me example for the 4th and 5th
my question is what do you mean by 4th and 5th and how can you do this by example????
04/11/2011 20:07 kevin_owner#2
Well what I meant is in C++ I created another thread (process).

So I got 2 processes running cause in C++ the recv function is blocking by default(You can set it to non blocking but that doesn't matter right now)

Well I don't know how this is done in C# but what I mean by creating 2 loops in separate threads to handle the messages(packets) and just forward them was this:

Wait for an client to connect. (Normally your app blocks here till someone connects)

If a client connects you already got one part done. cause now you have an active connection between the client and your little proxy. but now you just need to connect to the server.

In C++ i created another thread to just connect to the official login server of silkroad so at that point I got 2 threads running (The main one and the one created by myself)
the main one handles the client to the offcial server packets and the one I created by myself sens the packets of the offical server to the client.

It's a bit tricky to get at first and I hope that someone has a better solution for you since my main programming language isnt' C#.

[Only registered and activated users can see links. Click Here To Register...]
This is a little image of how the whole thing works.

I hope this explained things a little bit better