mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-17 22:14:19 +01:00
* Write input from the session manager to ttylog with a different ID
* playlog.py now able to colorify the output based on which streams the input is coming form git-svn-id: https://kippo.googlecode.com/svn/trunk@211 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from twisted.internet import protocol
|
||||
from twisted.conch import telnet
|
||||
from twisted.conch import telnet, recvline
|
||||
from kippo.core import ttylog
|
||||
import time
|
||||
|
||||
class Interact(telnet.Telnet):
|
||||
|
||||
@@ -61,7 +63,12 @@ class Interact(telnet.Telnet):
|
||||
'\r\n** Interactive session closed.\r\n')
|
||||
return
|
||||
if not self.readonly:
|
||||
self.interacting.keystrokeReceived(bytes, None)
|
||||
if type(bytes) == type(''):
|
||||
ttylog.ttylog_write(
|
||||
self.interacting.terminal.ttylog_file,
|
||||
len(bytes), ttylog.TYPE_INTERACT, time.time(), bytes)
|
||||
recvline.HistoricRecvLine.keystrokeReceived(
|
||||
self.interacting, bytes, None)
|
||||
|
||||
def sessionWrite(self, data):
|
||||
buf, prev = '', ''
|
||||
|
||||
Reference in New Issue
Block a user