Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix problem adding flows to the correct timewindow #443

Merged
merged 6 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions slips_files/core/database/database_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,11 @@ def add_out_notice(self, *args, **kwargs):
def add_out_ssl(self, *args, **kwargs):
return self.rdb.add_out_ssl(*args, **kwargs)

def getProfileIdFromIP(self, *args, **kwargs):
return self.rdb.getProfileIdFromIP(*args, **kwargs)
def get_profileid_from_ip(self, *args, **kwargs):
return self.rdb.get_profileid_from_ip(*args, **kwargs)

def get_first_flow_time(self, *args, **kwargs):
return self.rdb.get_first_flow_time(*args, **kwargs)

def getProfiles(self, *args, **kwargs):
return self.rdb.getProfiles(*args, **kwargs)
Expand Down Expand Up @@ -664,8 +667,8 @@ def add_new_older_tw(self, *args, **kwargs):
def add_new_tw(self, *args, **kwargs):
return self.rdb.add_new_tw(*args, **kwargs)

def getTimeTW(self, *args, **kwargs):
return self.rdb.getTimeTW(*args, **kwargs)
def get_tw_start_time(self, *args, **kwargs):
return self.rdb.get_tw_start_time(*args, **kwargs)

def getAmountTW(self, *args, **kwargs):
return self.rdb.getAmountTW(*args, **kwargs)
Expand Down Expand Up @@ -892,7 +895,7 @@ def get_branch(self, *args, **kwargs):
return self.rdb.get_branch(*args, **kwargs)

def add_alert(self, alert: dict):
twid_starttime: float = self.rdb.getTimeTW(alert['profileid'], alert['twid'])
twid_starttime: float = self.rdb.get_tw_start_time(alert['profileid'], alert['twid'])
twid_endtime: float = twid_starttime + RedisDB.width
alert.update({'tw_start': twid_starttime, 'tw_end': twid_endtime})
return self.sqlite.add_alert(alert)
Expand Down
2 changes: 1 addition & 1 deletion slips_files/core/database/redis_db/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def get_disabled_modules(self) -> list:
else:
return {}

def set_input_metadata(self, info:dict):
def set_input_metadata(self, info: dict):
"""
sets name, size, analysis dates, and zeek_dir in the db
"""
Expand Down
Loading
Loading