示例#1
0
 def setUp(self):
     self.db = DatabaseHandler('event2', path='./')
     self.db.storeEvent({
         'module': 'UnitTestModule',
         'datetime': 0,
         'name': 'TestEvent',
         'details': {},
         'uuids': ['1234-1234-1234-1234'],
         'packets': [0, 1, 2]
     })
示例#2
0
    def __init__(self, config):
        Process.__init__(self)
        self.name = 'RuleEngine'
        self.config = config
        self.database = DatabaseHandler(self.config.name)
        self.logutil = KBLogUtil(self.config.name, self.name)
        self.wids = WIDSClient(self.config.server_ip, self.config.server_port)
        self.active = None
        self.rules = []

        #///dev///
        self.rules.append(rule1)
示例#3
0
 def __init__(self, parameters=None, config=None):
     signal.signal(signal.SIGINT, self.SIGINT)
     self.config = WIDSConfig(parameters, config)
     self.config.daemon_pid = os.getpid()
     self.logutil = KBLogUtil(self.config.name, 'Daemon')
     self.database = DatabaseHandler(self.config.name)
     self.engine = None
     self.module_store = {}
     self.module_counter = 0
     self.task_store = {}
     self.task_counter = 0
     self.drone_store = {}
     self.drone_counter = 0
示例#4
0
 def setUp(self):
     self.db = DatabaseHandler('packet', path='./')
示例#5
0
 def setUp(self):
     self.db = DatabaseHandler('wids0')