07820ed9f1dae7eb67205fd1d2aa7ccd616fedaf,slips/core/database.py,Database,check_TW_to_close,#Database#,379

Before Change


        // Get internal time
        sip = self.r.get("slips_internal_time")
        // for each profile
        profiles = self.getProfiles()
        
        for profileid in profiles:
            // Get the last TW on in profile
            lastTWid = self.r.zrange("tws" + profileid, -1, -1, withscores=True)

After Change


        modification_time = float(sit) - 20
        profiles_to_close = self.r.zrangebyscore("ModifiedTW", 0, modification_time, withscores=True)
        for profile_to_close in profiles_to_close:
            profile_to_close_id = profile_to_close[0]
            profile_to_close_time = profile_to_close[1]
            self.print(f"The profile id {profile_to_close_id} has to be closed because it was last modifed on {profile_to_close_time} and we are closing everything older than {modification_time}. Current time {sit}. Difference: {modification_time - profile_to_close_time}")

    def add_ips(self, profileid, twid, ip_as_obj, columns, role: str):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: stratosphereips/StratosphereLinuxIPS
Commit Name: 07820ed9f1dae7eb67205fd1d2aa7ccd616fedaf
Time: 2020-08-11
Author: eldraco@gmail.com
File Name: slips/core/database.py
Class Name: Database
Method Name: check_TW_to_close


Project Name: stratosphereips/StratosphereLinuxIPS
Commit Name: a1d23bccc38b8f5361be29d7e6341efb7b48fa28
Time: 2020-08-24
Author: kamifai14@gmail.com
File Name: modules/blocking/blocking.py
Class Name: Module
Method Name: run


Project Name: stratosphereips/StratosphereLinuxIPS
Commit Name: d2edb9b7b569956799812a02d8a0ecd79521919e
Time: 2019-01-19
Author: eldraco@gmail.com
File Name: logsProcess.py
Class Name: LogsProcess
Method Name: process_global_data