From dad0365c67baf6e936f610f26ded1e5e87f2b103 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Mon, 5 Nov 2018 09:16:18 +0100 Subject: [PATCH] fix:[MISP_The_Hive_feeder] set default values --- bin/MISP_The_Hive_feeder.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/MISP_The_Hive_feeder.py b/bin/MISP_The_Hive_feeder.py index 0a8f1791..234f976a 100755 --- a/bin/MISP_The_Hive_feeder.py +++ b/bin/MISP_The_Hive_feeder.py @@ -119,10 +119,18 @@ if __name__ == "__main__": db=cfg.getint("ARDB_Metadata", "db"), decode_responses=True) + # set sensor uuid uuid_ail = r_serv_db.get('ail:uuid') if uuid_ail is None: uuid_ail = r_serv_db.set('ail:uuid', uuid.uuid4() ) + # set default + if r_serv_db.get('hive:auto-alerts') is None: + r_serv_db.set('hive:auto-alerts', 0) + + if r_serv_db.get('misp:auto-events') is None: + r_serv_db.set('misp:auto-events', 0): + p = Process(config_section) # create MISP connection if flag_misp: @@ -191,7 +199,6 @@ if __name__ == "__main__": whitelist_hive = r_serv_db.scard('whitelist_hive') if r_serv_db.sismember('whitelist_hive', tag): create_the_hive_alert(source, path, full_path, tag) - else: print('hive, auto alerts creation disable') if flag_misp: