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] })
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)
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
def setUp(self): self.db = DatabaseHandler('packet', path='./')
def setUp(self): self.db = DatabaseHandler('wids0')