diff --git a/modules/python/scripts/logsql.py b/modules/python/scripts/logsql.py index eb621df..997b69f 100644 --- a/modules/python/scripts/logsql.py +++ b/modules/python/scripts/logsql.py @@ -59,6 +59,7 @@ def start(self): self.cursor.execute("""CREATE TABLE IF NOT EXISTS connections ( connection INTEGER PRIMARY KEY, + id INTEGER, connection_type TEXT, connection_transport TEXT, connection_protocol TEXT, @@ -584,6 +585,9 @@ def connection_insert(self, icd, connection_type): (attackid, i ) ) self.dbh.commit() + # Set the ID table ready for Logstash + self.cursor.execute("UPDATE connections SET id = ? WHERE connection = ?", (attackid, attackid) ) + return attackid