mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-02-21 14:24:29 +01:00
Workaround for #287
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import time
|
||||
import datetime
|
||||
import functools
|
||||
import exceptions
|
||||
import getopt
|
||||
|
||||
from twisted.python import failure, log
|
||||
@@ -136,7 +137,12 @@ class command_echo(HoneyPotCommand):
|
||||
except:
|
||||
args = self.args
|
||||
|
||||
self.write(escape_fn(' '.join(args)))
|
||||
# FIXME: Wrap in exception, Python escape cannot handle single digit \x codes (e.g. \x1)
|
||||
try:
|
||||
self.write(escape_fn(' '.join(args)))
|
||||
except exceptions.ValueError as e:
|
||||
log.msg("echo command received Python incorrect hex escape")
|
||||
|
||||
if newline is True:
|
||||
self.write('\n')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user