Esempio n. 1
0
    def __init__(self, reactor, plugins, plugins_dir, parent=None):
        super(MainDialog, self).__init__(parent)
        self.reactor = reactor
        self.setupUi(self)
        self.settings = Settings(self)

        self.anim = QPropertyAnimation(self, 'windowOpacity')
        self.anim.setDuration(1000)
        self.anim.setStartValue(0)
        self.anim.setEndValue(self.settings.moderatOpacity)
        self.anim.start()

        self.clientsTable.horizontalHeader().setStyleSheet('background: none;')

        # Multi Lang
        self.translate = Translate(self)
        self.MString = lambda _word: self.translate.word(_word)
        self.theme = Theme(self)

        # Init Log Dir
        if not os.path.exists(self.DATA):
            os.makedirs(self.DATA)
        self.assets = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                                   'assets')
        self.flags = os.path.join(self.assets, 'flags')
        self.plugins = plugins
        self.plugins_dir = plugins_dir
        self.directServerRunning = False
        self.filter = Filter(self)
        # Setup Settings
        self.set_config()
        self.pagination = pagination.Pagination(self)
        self.tables = tables.updateClientsTable(self)
        # Init UI
        self.ui = ui.updateUi(self)
        # Init Tray
        self.tray = tray.ModeratTrayIcon(self)
        self.rmenu = rmenu.moderatRightClickMenu(self)
        # Session ID
        self.session_id = None
        # Privileges
        self.privs = 0
        # Checkers
        self.moderators_checker = None
        self.clients_checker = None
        # Create Protocol
        self.create_server_protocol()
        self.create_moderator_protocol()
        # Init Triggers
        triggers.ModeratTriggers(self)
        # Init Shortcuts
        shortcuts.ModeratShortcuts(self)
        # Create Actions Object
        self.action = Actions(self)
        # Create Modes Object
        self.modes = Modes(self)

        self.onlineLoading = loading.Loading(self.clientsTabs)
        self.onlineLoading.hide()
        self.showMaximized()
Esempio n. 2
0
    def __init__(self, moderat):
        self.moderat = moderat
        self.clients = Clients.Clients(self.moderat)

        # Create Main UI Functions
        self.ui = main.updateUi(self.moderat)

        # Create Tables UI
        self.tables = tables.updateClientsTable(self.moderat)

        # Init Modes
        self.modes = {
            'connectSuccess': self.onViewerConnected,
            'moderatorInitializing': self.moderatorInitializing,
            'getClients': self.getClients,
            'getModerators': self.getModerators,
            'shellMode': self.shellMode,
            'explorerMode': self.explorerMode,
            'scriptingMode': self.scriptingMode,
            'downloadMode': self.downloadMode,
            'uploadMode': self.uploadMode,
            'getScreen': self.getScreen,
            'getWebcam': self.getWebcam,
            'countData': self.countData,
            'downloadLogs': self.downloadLogs,
            'downloadLog': self.downloadLog,
        }
Esempio n. 3
0
    def __init__(self, moderat):
        self.moderat = moderat
        self.clients = Clients.Clients(self.moderat)

        # Create Main UI Functions
        self.ui = main.updateUi(self.moderat)

        # Create Tables UI
        self.tables = tables.updateClientsTable(self.moderat)

        # Init Modes
        self.modes = {
            'connectSuccess': self.onViewerConnected,
            'moderatorInitializing': self.moderatorInitializing,
            'getClients': self.getClients,
            'getModerators': self.getModerators,
            'shellMode': self.shellMode,
            'explorerMode': self.explorerMode,
            'scriptingMode': self.scriptingMode,
            'downloadMode': self.downloadMode,
            'uploadMode': self.uploadMode,
            'getScreen': self.getScreen,
            'getWebcam': self.getWebcam,
            'countData': self.countData,
            'downloadLogs': self.downloadLogs,
            'downloadLog': self.downloadLog,
        }
Esempio n. 4
0
    def __init__(self, moderat):
        self.moderat = moderat

        self.tables = tables.updateClientsTable(self.moderat)