Exemplo n.º 1
0
        private void ConfigureTelnetConnection(string userName, string password)
        {
            TcpProtocol    tcpProtocol = new TcpProtocol(new NetworkStream(this.client));
            TelnetProtocol p           = new TelnetProtocol();

            tcpProtocol.OnDataIndicated += p.IndicateData;
            tcpProtocol.OnDisconnect    += this.OnDisconnected;
            p.TerminalType             = this.term.TerminalType;
            p.Username                 = userName;
            p.Password                 = password;
            p.OnDataIndicated         += this.term.IndicateData;
            p.OnDataRequested         += tcpProtocol.RequestData;
            this.term.OnDataRequested += p.RequestData;
            this.connected             = this.client.Connected;
        }
Exemplo n.º 2
0
        private string ConfigureTelnetConnection(IGuardedSecurity security)
        {
            TcpProtocol    tcpProtocol = new TcpProtocol(new NetworkStream(this.client));
            TelnetProtocol p           = new TelnetProtocol();

            tcpProtocol.OnDataIndicated += p.IndicateData;
            tcpProtocol.OnDisconnect    += this.OnDisconnected;
            p.TerminalType             = this.term.TerminalType;
            p.Username                 = security.UserName;
            p.Password                 = security.Password;
            p.OnDataIndicated         += this.term.IndicateData;
            p.OnDataRequested         += tcpProtocol.RequestData;
            this.term.OnDataRequested += p.RequestData;
            this.connected             = this.client.Connected;

            return(TelnetConnectionPlugin.TELNET);
        }
Exemplo n.º 3
0
 private void ConfigureTelnetConnection(string userName, string password)
 {
     TcpProtocol tcpProtocol = new TcpProtocol(new NetworkStream(this.client));
     TelnetProtocol p = new TelnetProtocol();
     tcpProtocol.OnDataIndicated += p.IndicateData;
     tcpProtocol.OnDisconnect += this.OnDisconnected;
     p.TerminalType = this.term.TerminalType;
     p.Username = userName;
     p.Password = password;
     p.OnDataIndicated += this.term.IndicateData;
     p.OnDataRequested += tcpProtocol.RequestData;
     this.term.OnDataRequested += p.RequestData;
     this.connected = this.client.Connected;
 }
        private string ConfigureTelnetConnection(ISecurityOptions security)
        {
            TcpProtocol tcpProtocol = new TcpProtocol(new NetworkStream(this.client));
            TelnetProtocol p = new TelnetProtocol();
            tcpProtocol.OnDataIndicated += p.IndicateData;
            tcpProtocol.OnDisconnect += this.OnDisconnected;
            p.TerminalType = this.term.TerminalType;
            p.Username = security.UserName;
            p.Password = security.Password;
            p.OnDataIndicated += this.term.IndicateData;
            p.OnDataRequested += tcpProtocol.RequestData;
            this.term.OnDataRequested += p.RequestData;
            this.connected = this.client.Connected;

            return ConnectionManager.TELNET;
        }