diff --git a/kippo/core/protocol.py b/kippo/core/protocol.py index f630386..059f989 100644 --- a/kippo/core/protocol.py +++ b/kippo/core/protocol.py @@ -144,11 +144,6 @@ class HoneyPotExecProtocol(HoneyPotBaseProtocol): log.msg( 'Running exec command "%s"' % self.execcmd ) self.cmdstack[0].lineReceived(self.execcmd) -# self.terminal.transport.session.conn.sendRequest(self.terminal.transport.session, 'exit-status', struct.pack('>L', 0)) -# self.terminal.transport.session.conn.sendClose(self.terminal.transport.session) -# return -# - class HoneyPotInteractiveProtocol(HoneyPotBaseProtocol, recvline.HistoricRecvLine): def __init__(self, avatar, env): diff --git a/kippo/core/ssh.py b/kippo/core/ssh.py index ecc6f14..11629ef 100644 --- a/kippo/core/ssh.py +++ b/kippo/core/ssh.py @@ -252,6 +252,10 @@ class HoneyPotSSHSession(session.SSHSession): log.msg('request_x11: %s' % repr(data) ) return 0 + def loseConnection(self): + self.conn.sendRequest(self, 'exit-status', "\x00"*4) + session.SSHSession.loseConnection(self) + # FIXME: recent twisted conch avatar.py uses IConchuser here @implementer(conchinterfaces.ISession) class HoneyPotAvatar(avatar.ConchUser):