correctly send exit code 0 when command is done

This commit is contained in:
Michel Oosterhof
2015-11-06 19:36:36 +00:00
parent f32da6b20b
commit c4d583af7e

View File

@@ -81,15 +81,13 @@ class HoneyPotShell(object):
elif self.interactive:
self.showPrompt()
else:
self.protocol.terminal.transport.session.sendEOF()
self.protocol.terminal.transport.session.sendClose()
self.protocol.terminal.transport.session.loseConnection()
if not len(self.cmdpending):
if self.interactive:
self.showPrompt()
else:
self.protocol.terminal.transport.session.sendEOF()
self.protocol.terminal.transport.session.sendClose()
self.protocol.terminal.transport.session.loseConnection()
return
line = self.cmdpending.pop(0)