mirror of
https://github.com/cowrie/cowrie.git
synced 2025-07-01 18:07:27 -04:00
Fix missing byte type cast for color (#1174)
This commit is contained in:

committed by
Michel Oosterhof

parent
9f922ed4bc
commit
f4c1afad37
@ -48,9 +48,9 @@ def playlog(fd, settings):
|
||||
prefdir = TYPE_INPUT
|
||||
if dir == TYPE_INPUT: prefdir = TYPE_OUTPUT
|
||||
if dir == TYPE_INTERACT:
|
||||
color = '\033[36m'
|
||||
color = b'\033[36m'
|
||||
elif dir == TYPE_INPUT:
|
||||
color = '\033[33m'
|
||||
color = b'\033[33m'
|
||||
if dir == prefdir or settings['both_dirs']:
|
||||
curtime = float(sec) + float(usec) / 1000000
|
||||
if prevtime != 0:
|
||||
@ -64,7 +64,7 @@ def playlog(fd, settings):
|
||||
stdout.write(color)
|
||||
stdout.write(data)
|
||||
if settings['colorify'] and color:
|
||||
stdout.write('\033[0m')
|
||||
stdout.write(b'\033[0m')
|
||||
color = None
|
||||
sys.stdout.flush()
|
||||
elif str(tty) == str(currtty) and op == OP_CLOSE:
|
||||
|
Reference in New Issue
Block a user