Esempio n. 1
0
        private void SetIdAndVal(string id, string val)
        {
            string Decoded = WebServer.DecodeUrlChars(val);

            id = id.ToLower().Trim();
            switch (id)
            {
            case "com":
            {
                if (val == "msgbx")
                {
                    this.ComType = RemoteCommandType.MessageBox;
                }
                else if (val == "procstr" || val == "proc")
                {
                    this.ComType = RemoteCommandType.process;
                }
                else if (val == "closproc" || val == "closeprocess")
                {
                    this.ComType = RemoteCommandType.CloseProcess;
                }
                else if (val == "closallproc" || val == "closeallprocess")
                {
                    this.ComType = RemoteCommandType.CloseAllProcess;
                }


                break;
            }

            case "mbtitle": this.MessageBoxCap = Decoded; break;

            case "procnm": this.ProcessName = val; break;

            case "proctype": this.ViewImageProcess = val == "pic"; break;

            case "procpar": this.NoProcessPar = false; this.ProcessPar = Decoded; break;
            }
        }
Esempio n. 2
0
        internal void ParsePostData(string p)
        {
            // __a=1&__be=0&__dyn=7xeU6CQ3S3mbx67e-C1swgE98nwgU6C7UW3e3eaxe1qwh8eU88lwIwHwaa6Egx6&__pc=PHASED%3ADEFAULT&__req=2&__rev=234933
            bool sep = p.Contains('&');

            string[] pcs = new string[] { };
            if (sep)// __a=1&__be=0
            {
                pcs = p.Split('&');
            }
            else
            {
                pcs = new string[] { p };
            }

            foreach (string sp in pcs)
            {
                if (p.Length < 1)
                {
                    continue;
                }
                bool eq = sp.Contains('=');
                if (eq)
                {
                    //__a=1
                    string[] iv  = sp.Split('=');
                    string   id  = WebServer.DecodeUrlChars(iv[0]);
                    string   val = WebServer.DecodeUrlChars(iv[1]);
                    this.SetPostSinglepar(id, val);
                }
                else
                {
                    this.SetPostSinglepar(sp, "");
                }
            }
        }
Esempio n. 3
0
        private void SetIdAndVal(string id, string val)
        {
            string Decoded = WebServer.DecodeUrlChars(val);

            id = id.ToLower().Trim();
            int val_int = 10;

            val_int = AppHelper.StringToint(val, 10);
            switch (id)
            {
            case "com":
            {
                if (val == "msgbx")
                {
                    this.ComType = RemoteCommandType.MessageBox;
                }
                else if (val == "procstr" || val == "proc")
                {
                    this.ComType = RemoteCommandType.process;
                }
                else if (val == "closproc" || val == "closeprocess")
                {
                    this.ComType = RemoteCommandType.CloseProcess;
                }
                else if (val == "closallproc" || val == "closeallprocess")
                {
                    this.ComType = RemoteCommandType.CloseAllProcess;
                }
                else if (val == "mvcrs" || val == "movecursor")
                {
                    this.ComType = RemoteCommandType.MoveMouse;
                }
                else if (val == "msclk" || val == "mouseclick")
                {
                    this.ComType = RemoteCommandType.MouseClick;
                }
                else if (val == "mute" || val == "mutesys")
                {
                    this.ComType = RemoteCommandType.MuteSystemSound;
                }
                else if (val == "msrclk" || val == "mouseright")
                {
                    this.ComType = RemoteCommandType.MouseRightClick;
                }
                else if (val == "prntscr" || val == "printscreen")
                {
                    this.ComType = RemoteCommandType.PrintScreenShot;
                }
                else if (val == "ls" || val == "list")
                {
                    this.ComType = RemoteCommandType.LS;
                }
                else if (val == "hdcl" || val == "hidecl")
                {
                    this.ComType = RemoteCommandType.HideClient;
                }

                else if (val == "shcl" || val == "showcl")
                {
                    this.ComType = RemoteCommandType.ShowClient;
                }

                break;
            }

            case "mbtitle": this.MessageBoxCap = Decoded; break;

            case "frm": this.formvisible = AppHelper.BoolTruefalsefromString(Decoded); break;

            case "dirpath":
            case "directorypath":
            case "drpth": this.DirPath = Decoded; break;

            case "crsx":    { this.X = val_int;; break; }

            case "close": { this.closeMessage = AppHelper.BoolTruefalsefromString(Decoded); break; }

            case "crsy":    { this.Y = val_int;; break; }

            case "procnm": this.ProcessName = val; break;

            case "proctype": this.ViewImageProcess = (val == "pic"); break;

            case "procpar": this.NoProcessPar = false; this.ProcessPar = Decoded; break;

            case "shftdir": this.CursorGoingBack = (val.Contains("back")); break;
            }
        }