Fixed up sh -c so if its an invalid file it will display command not found (#192)

This commit is contained in:
Dave Germiquet
2016-06-19 02:21:08 -04:00
committed by Michel Oosterhof
parent c1e761dd6a
commit c8b7523569

View File

@@ -497,6 +497,12 @@ class command_sh(HoneyPotCommand):
if self.input_data:
self.write(self.input_data)
else:
log.msg(eventid='cowrie.command.failed',
input=''.join(cmd), format='Command not found: %(input)s')
self.write('bash: %s: command not found\n' % (cmd))
commands['/bin/bash'] = command_sh
commands['/bin/sh'] = command_sh