コード例 #1
0
 def buildProtocol(self, addr):
     t = transport.SSHServerTransport()
     #
     # Fix for BUG 1463701 "NMap recognizes Kojoney as a Honeypot"
     #
     t.ourVersionString = FAKE_SSH_SERVER_VERSION
     t.supportedPublicKeys = self.privateKeys.keys()
     if not self.primes:
         ske = t.supportedKeyExchanges[:]
         ske.remove('diffie-hellman-group-exchange-sha1')
         t.supportedKeyExchanges = ske
     t.factory = self
     return t
コード例 #2
0
 def makeProtocol(*args):
     calls.append(args)
     return transport.SSHServerTransport()