mirror of https://github.com/cowrie/cowrie.git
log keystrokes in loggingserver, not in protocol
This commit is contained in:
parent
c01ef07be1
commit
27304ba9d8
|
@ -186,13 +186,6 @@ class HoneyPotInteractiveProtocol(HoneyPotBaseProtocol, recvline.HistoricRecvLin
|
|||
self.setTypeoverMode()
|
||||
HoneyPotBaseProtocol.call_command(self, cmd, *args)
|
||||
|
||||
def keystrokeReceived(self, keyID, modifier):
|
||||
transport = self.terminal.transport.session.conn.transport
|
||||
if type(keyID) == type(''):
|
||||
ttylog.ttylog_write(transport.ttylog_file, len(keyID),
|
||||
ttylog.TYPE_INPUT, time.time(), keyID)
|
||||
recvline.HistoricRecvLine.keystrokeReceived(self, keyID, modifier)
|
||||
|
||||
# Easier way to implement password input?
|
||||
def characterReceived(self, ch, moreCharactersComing):
|
||||
if self.mode == 'insert':
|
||||
|
@ -265,6 +258,7 @@ class LoggingServerProtocol(insults.ServerProtocol):
|
|||
f = file( transport.stdinlog_file, 'ab' )
|
||||
f.write(data)
|
||||
f.close
|
||||
insults.ServerProtocol.dataReceived(self, data)
|
||||
|
||||
# this doesn't seem to be called upon disconnect, so please use
|
||||
# HoneyPotTransport.connectionLost instead
|
||||
|
|
Loading…
Reference in New Issue