mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-01-17 21:24:25 +01:00
Merge pull request #94 from davegermiquet/echochange
Fixed echo bug where session would hang.
This commit is contained in:
@@ -138,15 +138,23 @@ class command_echo(HoneyPotCommand):
|
||||
"""
|
||||
write_fn = self.writeln
|
||||
escape_fn = lambda s: s
|
||||
optlist, args = getopt.getopt(self.args, "eEn")
|
||||
"""
|
||||
"""
|
||||
|
||||
for opt in optlist:
|
||||
if opt[0] == '-e':
|
||||
escape_fn = functools.partial(str.decode, encoding="string_escape")
|
||||
elif opt[0] == '-E':
|
||||
escape_fn = lambda s: s
|
||||
elif opt[0] == '-n':
|
||||
write_fn = self.write
|
||||
try:
|
||||
write_fn = self.writeln
|
||||
optlist, args = getopt.getopt(self.args, "eEn")
|
||||
|
||||
for opt in optlist:
|
||||
if opt[0] == '-e':
|
||||
escape_fn = functools.partial(str.decode, encoding="string_escape")
|
||||
elif opt[0] == '-E':
|
||||
escape_fn = lambda s: s
|
||||
elif opt[0] == '-n':
|
||||
write_fn = self.write
|
||||
except:
|
||||
write_fn = self.writeln
|
||||
args = self.args
|
||||
|
||||
write_fn(escape_fn(' '.join(args)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user