[C#] Help me

06/02/2011 17:49 fatihy93#1
Hi.

I need make my own packet analyzer. This is my codes

Code:
 int a;
            a=1;
            TcpClient Socket = new TcpClient();
            Socket.Connect("127.0.0.1", 22580);
            Console.WriteLine("Bağlantı Sağlandı!");

            while (a <= 1)
            {
                Stream stm = Socket.GetStream();
                byte[] bb = new byte[1024];
                int k = stm.Read(bb, 0, 1024);
                Console.WriteLine(bb);
            }
            Console.Read();
Any one help me in this subject? ^^ How can i get raw codes? Waiting your help. Thank you.

Ps: Sorry for my English.
06/21/2011 02:13 sarkoplata#2
Declare x as a Socket ( before that import system.net.sockets ofc)
you can simply use x.receive to receive packets
06/21/2011 13:58 lesderid#3
Trying to reinvent the wheel, huh?

Search for pushedx's SilkroadSecurity API.