Beispiel #1
0
        /// <summary>
        /// 提交命令
        /// </summary>
        /// <param name="data">shellstruct数据</param>
        /// <param name="funcNameXpath">xpath表示的方法名(/cmder/readfile)</param>
        /// <param name="param"></param>
        public byte[] SubmitCommand(Shell data, string funcNameXpath, string[] param)
        {
            CustomShellType             shellType         = CustomShellTypeProvider.GetShellType(data.ShellType);
            CustomCommandCode           customCommandCode = new CustomCommandCode(shellType, data.ShellPwd);
            Dictionary <string, string> commandCode       = customCommandCode.GetCode(funcNameXpath, param);

            ShellExtra shellExtra = new ShellExtra(data.ShellExtraString);
            HttpClient httpClient = new HttpClient(shellExtra.HttpHeader);

            return(httpClient.SubmitCommandByPost(data.ShellUrl, commandCode));
        }
Beispiel #2
0
        public static WebHeaderCollection GetHttpHeader(Shell data)
        {
            var shellExtra = new ShellExtra(data.ShellExtraString);

            return(shellExtra.HttpHeader);
        }
Beispiel #3
0
        public static string[] GetShellSqlConnection(Shell data)
        {
            var shellExtra = new ShellExtra(data.ShellExtraString);

            return(shellExtra.SqlConnection);
        }