Skip to content

Commit

Permalink
log discarded suricata flows
Browse files Browse the repository at this point in the history
  • Loading branch information
AlyaGomaa committed Oct 5, 2023
1 parent 5948081 commit 39f80d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion database/sqlite_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ def store_flow(self, flow: dict, tool: str):
query = f"UPDATE labels_flow_by_flow SET {label_col} = \"{label}\" WHERE aid = \"{aid}\";"
self.execute(query)
else:
print(f"@@@@@@@@@@@@@@@@ discarded suricata flow: {flow} original_ts: {flow.get('original_ts','')}")
self.increase_discarded_flows(tool)
return False
return True
Expand Down
2 changes: 2 additions & 0 deletions parsers/suricata.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ def parse(self):

if 'malicious' in label.lower():
self.label_tw(timestamp, line['src_ip'], 'malicious')
else:
self.log(f"@@@@@@@@@@@@@@@@ discarded suricata flow: {flow} original_ts: {flow.get('original_ts', '')}",'')

self.print_stats()

Expand Down

0 comments on commit 39f80d5

Please sign in to comment.