mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-01-03 14:24:23 +01:00
put all abstract methods together
This commit is contained in:
@@ -74,8 +74,6 @@ class Output(object):
|
||||
# return self.emit( msg )
|
||||
# elif isinstance( msg, str ):
|
||||
# return self.emit( { 'message':msg, 'sessionid':sessionid } )
|
||||
|
||||
# used when the HoneypotTransport prefix is not available.
|
||||
def logDispatch(self, *msg, **kw):
|
||||
ev = kw
|
||||
ev['message'] = msg
|
||||
@@ -91,6 +89,11 @@ class Output(object):
|
||||
"""Abstract method to shut down output plugin"""
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def handleLog( self, session, event ):
|
||||
"""Handle a general event within the output plugin"""
|
||||
pass
|
||||
|
||||
# this is the main emit() hook that gets called by the the Twisted logging
|
||||
def emit(self, event):
|
||||
# ignore stdout and stderr in output plugins
|
||||
@@ -139,9 +142,4 @@ class Output(object):
|
||||
self.handleLog( self.sessions[sessionno], ev )
|
||||
# print "error calling handleLog for event %s" % repr(ev)
|
||||
|
||||
@abc.abstractmethod
|
||||
def handleLog( self, session, event ):
|
||||
"""Handle a general event within the output plugin"""
|
||||
pass
|
||||
|
||||
# vim: set sw=4 et:
|
||||
|
||||
Reference in New Issue
Block a user