fix: [hive auto export] fix #221

pull/231/head
Terrtia 2018-07-24 14:46:35 +02:00
parent bd80f6eacc
commit 4b8c26dec8
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
2 changed files with 10 additions and 12 deletions

View File

@ -164,6 +164,7 @@ if __name__ == "__main__":
except thehive4py.exceptions.AlertException: except thehive4py.exceptions.AlertException:
HiveApi = False HiveApi = False
flag_the_hive = False flag_the_hive = False
r_serv_db.set('ail:thehive', False)
print('Not connected to The HIVE') print('Not connected to The HIVE')
while True: while True:

View File

@ -503,29 +503,26 @@ def edit_tag_export():
else: else:
status_misp.append(False) status_misp.append(False)
# empty whitelist for tag in list_export_tags:
if whitelist_hive == 0: if r_serv_db.sismember('whitelist_hive', tag):
for tag in list_export_tags:
status_hive.append(True) status_hive.append(True)
else: else:
for tag in list_export_tags: status_hive.append(False)
if r_serv_db.sismember('whitelist_hive', tag):
status_hive.append(True)
else:
status_hive.append(False)
if (misp_auto_events is not None) and (hive_auto_alerts is not None):
if misp_auto_events is not None:
if int(misp_auto_events) == 1: if int(misp_auto_events) == 1:
misp_active = True misp_active = True
else: else:
misp_active = False misp_active = False
else:
misp_active = False
if hive_auto_alerts is not None:
if int(hive_auto_alerts) == 1: if int(hive_auto_alerts) == 1:
hive_active = True hive_active = True
else: else:
hive_active = False hive_active = False
else: else:
misp_active = False
hive_active = False hive_active = False
nb_tags = str(r_serv_db.scard('list_export_tags')) nb_tags = str(r_serv_db.scard('list_export_tags'))