Update busybox.py (#448)

As per commit from @fe7ch

https://github.com/fe7ch/cowrie/commit/9b33509
This commit is contained in:
funtimes-ninja
2017-02-08 03:50:58 -05:00
committed by Michel Oosterhof
parent 097a7ceb23
commit 21bbe7fd75

View File

@ -74,7 +74,13 @@ class command_busybox(HoneyPotCommand):
input=line,
format='Command found: %(input)s')
command = StdOutStdErrEmulationProtocol(self.protocol,cmdclass,self.args[1:],self.input_data,None)
self.protocol.pp.insert_command(command)
# Workaround for the issue: #352
# https://github.com/fe7ch/cowrie/commit/9b33509
# For an unknown reason inserted command won't be invoked later, if it's followed by an invalid command
# so lets just call the command in question
# self.protocol.pp.insert_command(command)
self.protocol.call_command(command, cmdclass, *self.args[1:])
# Place this here so it doesn't write out only if last statement
if self.input_data: