Esempio n. 1
0
        public PuttyStartInfo(SessionData session)
        {
            string argsToLog = null;

            this.Executable = SuperPuTTY.Settings.PuttyExe;

            if (session.Proto == ConnectionProtocol.Cygterm)
            {
                CygtermStartInfo cyg = new CygtermStartInfo(session);
                this.Args       = cyg.Args;
                this.WorkingDir = cyg.StartingDir;
            }
            else if (session.Proto == ConnectionProtocol.Mintty)
            {
                MinttyStartInfo mintty = new MinttyStartInfo(session);
                this.Args       = mintty.Args;
                this.WorkingDir = mintty.StartingDir;
                this.Executable = SuperPuTTY.Settings.MinttyExe;
            }
            else
            {
                this.Args = MakeArgs(session, true);
                argsToLog = MakeArgs(session, false);
            }

            // attempt to parse env vars
            this.Args = this.Args.Contains('%') ? TryParseEnvVars(this.Args) : this.Args;

            Log.InfoFormat("Putty Args: '{0}'", argsToLog ?? this.Args);
        }
Esempio n. 2
0
        public PuttyStartInfo(SessionData session)
        {
            string argsToLog = null;

            this.Executable = SuperPuTTY.Settings.PuttyExe;

            if (session.Proto == ConnectionProtocol.Cygterm)
            {
                CygtermStartInfo cyg = new CygtermStartInfo(session);
                this.Args = cyg.Args;
                this.WorkingDir = cyg.StartingDir;
            }
            else if (session.Proto == ConnectionProtocol.Mintty)
            {
                MinttyStartInfo mintty = new MinttyStartInfo(session);
                this.Args = mintty.Args;
                this.WorkingDir = mintty.StartingDir;
                this.Executable = SuperPuTTY.Settings.MinttyExe;
            }
            else
            {
                this.Args = MakeArgs(session, true);
                argsToLog = MakeArgs(session, false);
            }

            // attempt to parse env vars
            this.Args = this.Args.Contains('%') ? TryParseEnvVars(this.Args) : this.Args;

            Log.InfoFormat("Putty Args: '{0}'", argsToLog ?? this.Args);
        }
Esempio n. 3
0
        public PuttyStartInfo(SessionData session)
        {
            string argsToLog = null;

            this.Executable = GetExecutable(session);

            if (session.Proto == ConnectionProtocol.Cygterm)
            {
                CygtermStartInfo cyg = new CygtermStartInfo(session);
                this.Args       = cyg.Args;
                this.WorkingDir = cyg.StartingDir;
            }
            else if (session.Proto == ConnectionProtocol.Mintty)
            {
                MinttyStartInfo mintty = new MinttyStartInfo(session);
                this.Args       = mintty.Args;
                this.WorkingDir = mintty.StartingDir;
            }
            else if (session.Proto == ConnectionProtocol.VNC)
            {
                VNCStartInfo vnc = new VNCStartInfo(session);
                this.Args       = vnc.Args;
                this.WorkingDir = vnc.StartingDir;
            }
            else if (session.Proto == ConnectionProtocol.RDP)
            {
                RDPStartInfo rdp = new RDPStartInfo(session, this.Executable);
                this.Args       = rdp.Args;
                this.WorkingDir = rdp.StartingDir;
            }
            else if (session.Proto == ConnectionProtocol.WINCMD)
            {
                WCMDStartInfo wcmd = new WCMDStartInfo(session);
                this.Args       = wcmd.Args;
                this.WorkingDir = wcmd.StartingDir;
            }
            else if (session.Proto == ConnectionProtocol.PS)
            {
                PSStartInfo ps = new PSStartInfo(session);
                this.Args       = ps.Args;
                this.WorkingDir = ps.StartingDir;
            }
            else
            {
                this.Args = MakeArgs(session, true);
                argsToLog = MakeArgs(session, false);
            }

            // attempt to parse env vars
            this.Args = this.Args.Contains('%') ? TryParseEnvVars(this.Args) : this.Args;

            Log.InfoFormat("Putty Args: '{0}'", argsToLog ?? this.Args);
        }
Esempio n. 4
0
        public PuttyStartInfo(SessionData session)
        {
            Session = session;
            string argsToLog = null;

            Executable = GetExecutable(session);

            if (session.Proto == ConnectionProtocol.Cygterm)
            {
                CygtermStartInfo cyg = new CygtermStartInfo(session);
                Args       = cyg.Args;
                WorkingDir = cyg.StartingDir;
            }
            else if (session.Proto == ConnectionProtocol.Mintty)
            {
                MinttyStartInfo mintty = new MinttyStartInfo(session);
                Args       = mintty.Args;
                WorkingDir = mintty.StartingDir;
            }
            else if (session.Proto == ConnectionProtocol.VNC)
            {
                VNCStartInfo vnc = new VNCStartInfo(session);
                Args       = vnc.Args;
                WorkingDir = vnc.StartingDir;
            }
            else
            {
                Args      = MakeArgs(session, true);
                argsToLog = MakeArgs(session, false);
            }

            // attempt to parse env vars
            Args = Args.Contains('%') ? TryParseEnvVars(Args) : Args;

            Log.InfoFormat("Putty Args: '{0}'", argsToLog ?? Args);
        }