如何通过TcpClient自动登录到我的路由器? [英] How to login automatically to my router by TcpClient?
本文介绍了如何通过TcpClient自动登录到我的路由器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
朋友们,
当我将Tcpclient classe连接到路由器192.168.1.1时,他问我有关密码的问题,请参见此处 [^ ],使用的代码是:
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
{
}
我想在这里用我的密码"admin"登录到路由器吗?
谢谢
and i want here to login to my router with my password "admin" how can i do it ?
Thank you
推荐答案
没有人可以帮我你在哪里吗?
No one can help me where are you friends?
这篇关于如何通过TcpClient自动登录到我的路由器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文