fix bug where output plugins don't work when listening to ipv6

This commit is contained in:
Michel Oosterhof
2016-04-13 20:00:31 +04:00
parent a3132e5a3d
commit b926ac1bfe

View File

@ -68,7 +68,7 @@ class Output(object):
self.sessions = {} self.sessions = {}
self.ips = {} self.ips = {}
self.re_sessionlog = re.compile( self.re_sessionlog = re.compile(
'.*HoneyPotTransport,([0-9]+),[0-9.]+$') '.*HoneyPotTransport,([0-9]+),[0-9a-f:.]+$')
try: try:
self.sensor = self.cfg.get('honeypot', 'sensor_name') self.sensor = self.cfg.get('honeypot', 'sensor_name')
except: except:
@ -132,7 +132,6 @@ class Output(object):
ev['timestamp'] = datetime.datetime.utcnow().isoformat() + 'Z' ev['timestamp'] = datetime.datetime.utcnow().isoformat() + 'Z'
else: else:
ev['timestamp'] = datetime.datetime.utcfromtimestamp(ev['time']).isoformat() + 'Z' ev['timestamp'] = datetime.datetime.utcfromtimestamp(ev['time']).isoformat() + 'Z'
del ev['time'] del ev['time']
# On disconnect add the tty log # On disconnect add the tty log