示例#1
0
    def start(self):
        """
            Starts sending client bees to the configured Honeypot.
        """
        logger.info('Starting client.')

        sessions = {}

        # greenlet to consume and maintain data in sessions list
        self.sessions_consumer = Consumer(sessions, self.config, self.my_ip)
        gevent.spawn(self.sessions_consumer.start_handling)

        self.dispatcher_greenlets = []

        for honeypot_id, entry in self.config['baits'].items():
            for b in clientbase.ClientBase.__subclasses__():
                bait_name = b.__name__.lower()
                # if the bait has a entry in the config we consider the bait enabled
                if bait_name in entry:
                    bait_options = entry[bait_name]
                    #bait_session = b(sessions, bait_options)
                    dispatcher = BaitDispatcher(sessions, b, bait_options)
                    dispatcher.start()
                    self.dispatcher_greenlets.append(dispatcher)
                    logger.info('Adding {0} bait'.format(bait_name))
                    logger.debug('Bait added with options: {0}'.format(bait_options))

        gevent.joinall(self.dispatcher_greenlets)
示例#2
0
    def start(self):
        """
            Starts sending client bees to the configured Honeypot.
        """
        logger.info('Starting client.')

        sessions = {}

        # greenlet to consume and maintain data in sessions list
        self.sessions_consumer = Consumer(sessions, self.config, self.my_ip)
        gevent.spawn(self.sessions_consumer.start_handling)

        self.dispatcher_greenlets = []

        for honeypot_id, entry in self.config['baits'].items():
            for b in clientbase.ClientBase.__subclasses__():
                bait_name = b.__name__.lower()
                # if the bait has a entry in the config we consider the bait enabled
                if bait_name in entry:
                    bait_options = entry[bait_name]
                    #bait_session = b(sessions, bait_options)
                    dispatcher = BaitDispatcher(sessions, b, bait_options)
                    dispatcher.start()
                    self.dispatcher_greenlets.append(dispatcher)
                    logger.info('Adding {0} bait'.format(bait_name))
                    logger.debug(
                        'Bait added with options: {0}'.format(bait_options))

        gevent.joinall(self.dispatcher_greenlets)
示例#3
0
    def start(self):
        """
            Starts sending client bait to the configured Honeypot.
        """
        logger.info('Starting client.')

        self.dispatcher_greenlets = []

        for _, entry in self.config['baits'].items():
            for b in clientbase.ClientBase.__subclasses__():
                bait_name = b.__name__.lower()
                # if the bait has a entry in the config we consider the bait enabled
                if bait_name in entry:
                    bait_options = entry[bait_name]
                    dispatcher = BaitDispatcher(b, bait_options)
                    dispatcher.start()
                    self.dispatcher_greenlets.append(dispatcher)
                    logger.info('Adding {0} bait'.format(bait_name))
                    logger.debug('Bait added with options: {0}'.format(bait_options))

        gevent.joinall(self.dispatcher_greenlets)