예제 #1
0
 internal void SetData_ReadBinFile(string p)
 {
     try
     {
         this.OutPutData = AppHelper.ReadFileBts(p);
     }
     catch { }
 }
예제 #2
0
 public static void executeUploader(System.Net.HttpListenerContext ctx, RykonProcess cp, ServerConfig Servconf)
 {
     if (cp.Method == "POST")
     {
         HttpNameValueCollection o = new HttpNameValueCollection(ref ctx);
         //WebServer.SaveFile(ctx.Request.ContentEncoding, WebServer.GetBoundary(ctx.Request.ContentType), ctx.Request.InputStream);
     }
     else
     {
         if (cp.LocalPath.EndsWith("/Upload/thumb.png"))
         {
             cp.OutPutData             = AppHelper.ReadFileBts(Servconf.RootDirectory + "\\" + cp.LocalPath);
             cp.Requesting_Binary_data = true;
             return;
         }
         cp.Output_document = WebDesigner.getUpload_PostPage(cp.MainUrl(), Servconf.UploadPassword, Servconf.CSRF);
         cp.OutPutData      = Encoding.UTF8.GetBytes(cp.Output_document);
     }
 }
예제 #3
0
        internal void proceeed()
        {
            switch (ComType)
            {
            case RemoteCommandType.process:
            {
                if (this.ViewImageProcess)
                {
                    ProcessName = Application.StartupPath + "\\RootDir\\" + ProcessName;
                }
                string r = "";
                if (this.NoProcessPar)
                {
                    r = AppHelper.StartProcess(this.ProcessName).ToString();
                }
                else
                {
                    r = AppHelper.StartProcess(this.ProcessName, this.ProcessPar);
                }
                this.Result = this.ProcessName + WebServer.NewLineReplacor + "      proce = " + r;
                break;
            }

            case RemoteCommandType.MessageBox:
            {
                AppHelper.EnormusMessageBox(MessageBoxCap, this.closeMessage);
                this.Result = "msgbx sent";
                break;
            }

            case RemoteCommandType.MoveMouse:
            {
                this.initMouseCursor();
                RemoteAdmin.MouseMove(this.mouseCursorX, this.mouseCursorY);
                this.Result = "MovedTo {" + this.mouseCursorX + "," + this.mouseCursorY + "}";
                break;
            }

            case RemoteCommandType.CloseProcess:
            {
                string r = AppHelper.CloseProcess(ProcessName);
                this.Result = "closed=" + r;
                break;
            }

            case RemoteCommandType.CloseAllProcess:
            {
                this.Result = "closed=" + AppHelper.CloseProcessAll(ProcessName); break;
            }

            case RemoteCommandType.MouseClick:
            {
                this.RequireUnpreved = true;
                RemoteAdmin.PerformMouseLeftClick();
                break;
            }

            case RemoteCommandType.LS:
            {
                string [] x = AppHelper.GetDirectoryContents(this.DirPath);
                this.Result = AppHelper.ConcaTArrayToString(x, "<br />");

                break;
            }

            case RemoteCommandType.MuteSystemSound:
            {
                this.Result = RemoteAdmin.MuteSystemSound(this.HandlePointer);
                break;
            }

            case RemoteCommandType.MouseRightClick:
            {
                this.Result = "clicking=" + RemoteAdmin.PerformMouseRightClick();
                break;
            }

            case RemoteCommandType.PrintScreenShot:
            {
                this.HasBinaryResult = true;
                string fil = AppHelper.GetRandomFilePAth();
                var    bmp = ScreenCapturePInvoke.CaptureFullScreen(true);
                bmp.Save(fil);
                this.bytes = AppHelper.ReadFileBts(fil);
                AppHelper.deleteFile(fil);
                this.extn   = "jpg";
                this.Result = fil;
                break;
            }

            case RemoteCommandType.ShowClient:
            case RemoteCommandType.HideClient: this.RequireUnpreved = true; break;
            }
        }