mirror of
https://github.com/cowrie/cowrie.git
synced 2025-07-01 18:07:27 -04:00
move encoding to transport
This commit is contained in:
@ -93,9 +93,9 @@ class CowrieSSHFactory(factory.SSHFactory):
|
|||||||
t = transport.HoneyPotSSHTransport()
|
t = transport.HoneyPotSSHTransport()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
t.ourVersionString = CONFIG.get('ssh', 'version').encode('ascii')
|
t.ourVersionString = CONFIG.get('ssh', 'version')
|
||||||
except:
|
except:
|
||||||
t.ourVersionString = b"SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2"
|
t.ourVersionString = "SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2"
|
||||||
|
|
||||||
t.supportedPublicKeys = list(self.privateKeys.keys())
|
t.supportedPublicKeys = list(self.privateKeys.keys())
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class HoneyPotSSHTransport(transport.SSHServerTransport, TimeoutMixin):
|
|||||||
protocol='ssh'
|
protocol='ssh'
|
||||||
)
|
)
|
||||||
|
|
||||||
self.transport.write(b'{0}\r\n'.format(self.ourVersionString))
|
self.transport.write('{0}\r\n'.format(self.ourVersionString).encode('ascii'))
|
||||||
self.currentEncryptions = transport.SSHCiphers(b'none', b'none', b'none', b'none')
|
self.currentEncryptions = transport.SSHCiphers(b'none', b'none', b'none', b'none')
|
||||||
self.currentEncryptions.setKeys(b'', b'', b'', b'', b'', b'')
|
self.currentEncryptions.setKeys(b'', b'', b'', b'', b'', b'')
|
||||||
self.setTimeout(120)
|
self.setTimeout(120)
|
||||||
|
|||||||
Reference in New Issue
Block a user