mirror of https://github.com/CIRCL/AIL-framework
fix: [hive auto export] fix #221
parent
bd80f6eacc
commit
4b8c26dec8
|
@ -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:
|
||||||
|
|
|
@ -503,29 +503,26 @@ def edit_tag_export():
|
||||||
else:
|
else:
|
||||||
status_misp.append(False)
|
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:
|
for tag in list_export_tags:
|
||||||
if r_serv_db.sismember('whitelist_hive', tag):
|
if r_serv_db.sismember('whitelist_hive', tag):
|
||||||
status_hive.append(True)
|
status_hive.append(True)
|
||||||
else:
|
else:
|
||||||
status_hive.append(False)
|
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'))
|
||||||
|
|
Loading…
Reference in New Issue