mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-18 14:34:22 +01:00
Switch from uuid1 to uuid4. uuid4 does not leak ip address
This commit is contained in:
@@ -22,7 +22,7 @@ class DBLogger(dblog.DBLogger):
|
|||||||
self.outfile.flush()
|
self.outfile.flush()
|
||||||
|
|
||||||
def createSession(self, peerIP, peerPort, hostIP, hostPort):
|
def createSession(self, peerIP, peerPort, hostIP, hostPort):
|
||||||
sid = uuid.uuid1().hex
|
sid = uuid.uuid4().hex
|
||||||
sensorname = self.getSensor() or hostIP
|
sensorname = self.getSensor() or hostIP
|
||||||
self.write(sid, 'New connection: %s:%s' % (peerIP, peerPort))
|
self.write(sid, 'New connection: %s:%s' % (peerIP, peerPort))
|
||||||
return sid
|
return sid
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class DBLogger(dblog.DBLogger):
|
|||||||
d.addErrback(self.sqlerror)
|
d.addErrback(self.sqlerror)
|
||||||
|
|
||||||
def createSession(self, peerIP, peerPort, hostIP, hostPort):
|
def createSession(self, peerIP, peerPort, hostIP, hostPort):
|
||||||
sid = uuid.uuid1().hex
|
sid = uuid.uuid4().hex
|
||||||
self.createSessionWhenever(sid, peerIP, hostIP)
|
self.createSessionWhenever(sid, peerIP, hostIP)
|
||||||
return sid
|
return sid
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class DBLogger(dblog.DBLogger):
|
|||||||
self.outfile.flush()
|
self.outfile.flush()
|
||||||
|
|
||||||
def createSession(self, peerIP, peerPort, hostIP, hostPort):
|
def createSession(self, peerIP, peerPort, hostIP, hostPort):
|
||||||
sid = uuid.uuid1().hex
|
sid = uuid.uuid4().hex
|
||||||
sensorname = self.getSensor() or hostIP
|
sensorname = self.getSensor() or hostIP
|
||||||
self.write(sid, 'New connection: %s:%s' % (peerIP, peerPort))
|
self.write(sid, 'New connection: %s:%s' % (peerIP, peerPort))
|
||||||
return sid
|
return sid
|
||||||
|
|||||||
Reference in New Issue
Block a user