![]() |
|
How to get client request - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Programmers Gateway (https://lckb.dev/forum/forumdisplay.php?fid=196) +---- Forum: Coders Talk (https://lckb.dev/forum/forumdisplay.php?fid=192) +---- Thread: How to get client request (/showthread.php?tid=1791) |
- James123 - 05-10-2013 Hello all Please tell me how can I get requests from the server and send requests to the server Last Chaos? For example I have the login window, and I want to cheat the customer by making it so that I missed to the list of servers. But when I try to read the client sends me when I press the enter button, I do not know what to send him back?My C# code server: namespace ConsoleApplication1 { class Program { public static Socket sck, _client; public static byte[] buffer; static void Main(string[] args) { sck = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); sck.Bind(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 4001)); sck.Listen(4); sck.BeginAccept(new AsyncCallback(OnAccept), null); Console.WriteLine("Start"); Console.ReadKey(); } private static void OnAccept(IAsyncResult result) { buffer = new byte[1024]; _client = sck.EndAccept(result); Console.Write("Okay"); _client.BeginReceive(buffer, 0, buffer.Length, SocketFlags.None, new AsyncCallback(OnReceive), null); } private static void OnReceive(IAsyncResult result) { int num = _client.EndReceive(result); Array.Resize(ref buffer, num); string temp = Encoding.Default.GetString(buffer); Console.WriteLine(temp); } } } - HateMe - 05-10-2013 first of all the packets are encrypted so you need to decrypt them anned encrypted packets back again the packet struckt you can see on the source that is/was public - James123 - 05-10-2013 first of all the packets are encrypted so you need to decrypt them anned encrypted packets back again the packet struckt you can see on the source that is/was public Can you give an example of how to decode the packet? - HateMe - 05-10-2013 for this you need the DES code - James123 - 05-11-2013 for this you need the DES code And how do you know what to send to the server in order to successfully enter? |