我需要示例代码通过代理C#连接Telent

时间:2019-06-18 23:14:11

标签: proxy connection telnet socks

我需要示例代码以通过c#中的代理连接Telent。

Telnet client = new Telnet("servername");
Shell shell = client.StartShell();
shell.Prompt = "servername# ";
string welcome = shell.ReadAll();
Console.WriteLine(welcome);
shell.SendCommand("df");
string response = shell.ReadAll();
Console.WriteLine("Disk usage info:");
Console.WriteLine(response);
shell.Close();

0 个答案:

没有答案