mirror of https://github.com/cowrie/cowrie.git
Fix dblog breaking
git-svn-id: https://kippo.googlecode.com/svn/trunk@122 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
parent
b88af200e8
commit
7ca121347a
|
@ -24,13 +24,14 @@ class DBLogger(object):
|
|||
('^INPUT \((?P<realm>[a-zA-Z0-9]+)\): (?P<input>.*)$',
|
||||
self.handleInput),
|
||||
)]
|
||||
self.start(cfg)
|
||||
|
||||
if cfg.has_option('honeypot', 'sensor_name'):
|
||||
self.sensor = cfg.get('honeypot', 'sensor_name')
|
||||
else:
|
||||
self.sensor = socket.gethostbyaddr(socket.gethostname())[2][0]
|
||||
|
||||
self.start(cfg)
|
||||
|
||||
def start():
|
||||
pass
|
||||
|
||||
|
@ -55,6 +56,8 @@ class DBLogger(object):
|
|||
self.sessions[uniqstr] = session
|
||||
else:
|
||||
session = self.sessions[uniqstr]
|
||||
if session is None:
|
||||
return
|
||||
message = ev['message'][0]
|
||||
for regex, func in self.re_map:
|
||||
match = regex.match(message)
|
||||
|
|
Loading…
Reference in New Issue