fix: [hive auto export] fix #221

This commit is contained in:
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:
HiveApi = False
flag_the_hive = False
r_serv_db.set('ail:thehive', False)
print('Not connected to The HIVE')
while True:

View file

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