From 41bc8b65e4acb9f53ab4bec0f5ae2c49846c29b0 Mon Sep 17 00:00:00 2001 From: Michel Oosterhof Date: Tue, 4 Nov 2014 10:42:08 +0000 Subject: [PATCH] Switch from uuid1 to uuid4. uuid4 does not leak ip address --- kippo/dblog/jsonlog.py | 2 +- kippo/dblog/mysql.py | 2 +- kippo/dblog/textlog.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kippo/dblog/jsonlog.py b/kippo/dblog/jsonlog.py index 59f3b51..7952beb 100644 --- a/kippo/dblog/jsonlog.py +++ b/kippo/dblog/jsonlog.py @@ -22,7 +22,7 @@ class DBLogger(dblog.DBLogger): self.outfile.flush() def createSession(self, peerIP, peerPort, hostIP, hostPort): - sid = uuid.uuid1().hex + sid = uuid.uuid4().hex sensorname = self.getSensor() or hostIP self.write(sid, 'New connection: %s:%s' % (peerIP, peerPort)) return sid diff --git a/kippo/dblog/mysql.py b/kippo/dblog/mysql.py index 4859efa..6232dea 100644 --- a/kippo/dblog/mysql.py +++ b/kippo/dblog/mysql.py @@ -54,7 +54,7 @@ class DBLogger(dblog.DBLogger): d.addErrback(self.sqlerror) def createSession(self, peerIP, peerPort, hostIP, hostPort): - sid = uuid.uuid1().hex + sid = uuid.uuid4().hex self.createSessionWhenever(sid, peerIP, hostIP) return sid diff --git a/kippo/dblog/textlog.py b/kippo/dblog/textlog.py index 383cef7..a53f742 100644 --- a/kippo/dblog/textlog.py +++ b/kippo/dblog/textlog.py @@ -20,7 +20,7 @@ class DBLogger(dblog.DBLogger): self.outfile.flush() def createSession(self, peerIP, peerPort, hostIP, hostPort): - sid = uuid.uuid1().hex + sid = uuid.uuid4().hex sensorname = self.getSensor() or hostIP self.write(sid, 'New connection: %s:%s' % (peerIP, peerPort)) return sid