Example #1
0
    public static string ConPtyShellMain(string[] args)
    {
        string output = "";

        if (args.Length == 1 && HelpRequired(args[0]))
        {
            DisplayHelp();
        }
        else
        {
            CheckArgs(args);
            string remoteIp     = "";
            int    remotePort   = 0;
            bool   upgradeShell = false;
            if (args[0].Contains("upgrade"))
            {
                upgradeShell = true;
            }
            else
            {
                remoteIp   = CheckRemoteIpArg(args[0]);
                remotePort = CheckInt(args[1]);
            }
            uint   rows        = ParseRows(args);
            uint   cols        = ParseCols(args);
            string commandLine = ParseCommandLine(args);
            output = ConPtyShell.SpawnConPtyShell(remoteIp, remotePort, rows, cols, commandLine, upgradeShell);
        }
        return(output);
    }
Example #2
0
    public static string ConPtyShellMain(string[] args)
    {
        string output = "";

        if (args.Length == 1 && HelpRequired(args[0]))
        {
            DisplayHelp();
        }
        else
        {
            CheckArgs(args);
            string remoteIp    = CheckRemoteIpArg(args[0]);
            int    remotePort  = CheckInt(args[1]);
            uint   rows        = ParseRows(args);
            uint   cols        = ParseCols(args);
            string commandLine = ParseCommandLine(args);
            output = ConPtyShell.SpawnConPtyShell(remoteIp, remotePort, rows, cols, commandLine);
        }
        return(output);
    }