def start(self, cfg):
        from random import choice
        import string

        server      = cfg.get('database_xmpp', 'server')
        user        = cfg.get('database_xmpp', 'user')
        password    = cfg.get('database_xmpp', 'password')
        muc         = cfg.get('database_xmpp', 'muc')
        channels = {}
        for i in ('createsession', 'connectionlost', 'loginfailed',
                  'loginsucceeded', 'command', 'clientversion'):
            x = cfg.get('database_xmpp', 'signal_' + i)
            if not x in channels:
                channels[x] = []
            channels[x].append(i)

        resource = ''.join([choice(string.ascii_letters)
            for i in range(8)])
        jid = user + '/' + resource
        application = service.Application('honeypot')
        self.run(application, jid, password, JID(None,[muc,server,None]), channels)
dataset/ETHPy150Open cowrie/cowrie/cowrie/dblog/xmpp.py/DBLogger.start/original