def buildProtocol(self, addr):
        """
        Create an instance of the server side of the SSH protocol.

        @type addr: L{twisted.internet.interfaces.IAddress} provider
        @param addr: The address at which the server will listen.

        @rtype: L{cowrie.core.HoneyPotTransport}
        @return: The built transport.
        """

        _modulis = '/etc/ssh/moduli', '/private/etc/moduli'

        t = HoneyPotTransport()

        try:
            t.ourVersionString = self.cfg.get('honeypot', 'ssh_version_string')
        except:
            t.ourVersionString = "SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2"

        t.supportedPublicKeys = list(self.privateKeys.keys())

        for _moduli in _modulis:
            try:
                self.primes = primes.parseModuliFile(_moduli)
                break
            except __HOLE__ as err:
                pass

        if not self.primes:
            ske = t.supportedKeyExchanges[:]
            ske.remove('diffie-hellman-group-exchange-sha1')
            t.supportedKeyExchanges = ske
            log.msg("No moduli, disabled diffie-hellman-group-exchange-sha1")

        # Reorder supported ciphers to resemble current openssh more
        t.supportedCiphers = ['aes128-ctr', 'aes192-ctr', 'aes256-ctr',
            'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc',
            'aes192-cbc', 'aes256-cbc']
        t.supportedPublicKeys = ['ssh-rsa', 'ssh-dss']
        t.supportedMACs = ['hmac-md5', 'hmac-sha1']
        t.supportedCompressions = ['zlib@openssh.com', 'zlib', 'none']

        t.factory = self
        return t
dataset/ETHPy150Open cowrie/cowrie/cowrie/ssh/transport.py/HoneyPotSSHFactory.buildProtocol