From 7ca121347a329b7161e94e3e304f6c6c4159df2f Mon Sep 17 00:00:00 2001 From: desaster Date: Wed, 16 Jun 2010 10:41:37 +0000 Subject: [PATCH] Fix dblog breaking git-svn-id: https://kippo.googlecode.com/svn/trunk@122 951d7100-d841-11de-b865-b3884708a8e2 --- kippo/core/dblog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kippo/core/dblog.py b/kippo/core/dblog.py index 28b364c7..706b4847 100644 --- a/kippo/core/dblog.py +++ b/kippo/core/dblog.py @@ -24,13 +24,14 @@ class DBLogger(object): ('^INPUT \((?P[a-zA-Z0-9]+)\): (?P.*)$', 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)