mirror of
https://github.com/cowrie/cowrie.git
synced 2025-07-01 18:07:27 -04:00
remove warnings for closing ttylog msg
This commit is contained in:
@ -45,6 +45,7 @@ class DBLogger(object):
|
||||
'KIPP0009': self.handleClientVersion,
|
||||
'KIPP0010': self.handleTerminalSize,
|
||||
'KIPP0011': self._connectionLost,
|
||||
'KIPP0012': self.handleTTYLogClosed,
|
||||
}
|
||||
|
||||
self.start(cfg)
|
||||
@ -126,9 +127,13 @@ class DBLogger(object):
|
||||
def createSession(self, peerIP, peerPort, hostIP, hostPort):
|
||||
return 0
|
||||
|
||||
# args has: logfile
|
||||
# args has: ttylog
|
||||
def handleTTYLogOpened(self, session, args):
|
||||
self.ttylogs[session] = args['logfile']
|
||||
self.ttylogs[session] = args['ttylog']
|
||||
|
||||
# args has: ttylog
|
||||
def handleTTYLogClosed(self, session, args):
|
||||
self.ttylogs[session] = args['ttylog']
|
||||
|
||||
# args is empty
|
||||
def handleConnectionLost(self, session, args):
|
||||
|
||||
@ -238,8 +238,8 @@ class LoggingServerProtocol(insults.ServerProtocol):
|
||||
time.strftime('%Y%m%d-%H%M%S'), transport.transportId )
|
||||
|
||||
self.ttylog_file = transport.ttylog_file
|
||||
log.msg( eventid='KIPP0004', logfile=transport.ttylog_file,
|
||||
format='Opening TTY Log: %(logfile)s')
|
||||
log.msg( eventid='KIPP0004', ttylog=transport.ttylog_file,
|
||||
format='Opening TTY Log: %(ttylog)s')
|
||||
|
||||
ttylog.ttylog_open(transport.ttylog_file, time.time())
|
||||
self.ttylog_open = True
|
||||
|
||||
Reference in New Issue
Block a user