mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-01-08 08:44:28 +01:00
correctly send exit code 0 when command is done
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user