Click here to Skip to main content
15,889,403 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,

When i'm connecting (with Tcpclient classe) to my router 192.168.1.1 he ask me about Password,See here[^] and the code used is :

TcpClient tcpclient = new TcpClient();
            try
            {
                tcpclient.Connect("192.168.1.1", 23);
                NetworkStream ns = tcpclient.GetStream();


                byte[] inStream = new byte[10025];
                ns.Read(inStream, 0, (int)tcpclient.ReceiveBufferSize);
                string returndata = System.Text.Encoding.ASCII.GetString(inStream);
                Console.WriteLine("Data from Server : " + returndata);
                //string password = "admin";
                

                
                byte[] msg = Encoding.ASCII.GetBytes("admin");
                ns.Write(msg, 0, msg.Length);
                ns.Flush();

                
            }
            catch
            {
                
            }


and i want here to login to my router with my password "admin" how can i do it ?

Thank you
Posted

1 solution

No one can help me where are you friends?
 
Share this answer
 
Comments
André Kraak 25-Sep-11 10:23am    
Please do not use a solution to plead for a response, this will not help and might even make people not want to help you.
Look at your question and see if you can make it any clearer and respond to any inquiries made; this should make the question more appealing. Please remove this solution. Thank you.
carlos pin 25-Sep-11 16:46pm    
OK you can help me, because it's so clear...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900