mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-18 06:24:20 +01:00
Don't perform fake exit on certain SSH clients
git-svn-id: https://kippo.googlecode.com/svn/trunk@193 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
@@ -43,7 +43,11 @@ commands['exxxit'] = command_exxxit
|
||||
|
||||
class command_exit(HoneyPotCommand):
|
||||
def call(self):
|
||||
#self.honeypot.terminal.loseConnection()
|
||||
if 'PuTTY' in self.honeypot.clientVersion or \
|
||||
'libssh' in self.honeypot.clientVersion or \
|
||||
'sshlib' in self.honeypot.clientVersion:
|
||||
self.honeypot.terminal.loseConnection()
|
||||
return
|
||||
self.honeypot.terminal.reset()
|
||||
self.writeln('Connection to server closed.')
|
||||
self.honeypot.hostname = 'localhost'
|
||||
|
||||
@@ -166,6 +166,9 @@ class HoneyPotProtocol(recvline.HistoricRecvLine):
|
||||
# real source IP of client
|
||||
self.realClientIP = p.host
|
||||
|
||||
self.clientVersion = \
|
||||
self.terminal.transport.session.conn.transport.otherVersionString
|
||||
|
||||
# source IP of client in user visible reports (can be fake or real)
|
||||
cfg = config()
|
||||
if cfg.has_option('honeypot', 'fake_addr'):
|
||||
|
||||
Reference in New Issue
Block a user