mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-18 22:44:29 +01:00
Fixed up sh -c so if its an invalid file it will display command not found (#192)
This commit is contained in:
committed by
Michel Oosterhof
parent
c1e761dd6a
commit
c8b7523569
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user