new: Optionally include deleted attributes/objects in feed

pull/604/head
Raphaël Vinot 2020-06-19 13:41:58 +02:00
parent daf937a100
commit 2fbf6c96a3
2 changed files with 8 additions and 1 deletions

View File

@ -7,6 +7,11 @@ import os
from pymisp import ExpandedPyMISP
from settings import entries, url, key, ssl, outputdir, filters, valid_attribute_distribution_levels
try:
from settings import include_deleted
except ImportError:
include_deleted = False
valid_attribute_distributions = []
@ -64,7 +69,7 @@ if __name__ == '__main__':
total = len(events)
for event in events:
try:
e = misp.get_event(event.uuid, pythonify=True)
e = misp.get_event(event.uuid, deleted=include_deleted, pythonify=True)
e_feed = e.to_feed(valid_distributions=valid_attribute_distributions, with_meta=True)
except Exception as e:
print(e, event.uuid)

View File

@ -24,6 +24,8 @@ entries = 200
# tagged tlp:white and/or feed-export but exclude anything tagged privint
filters = {'published':'true'}
# Include deleted attributes and objects in the events
include_deleted = False
# By default all attributes will be included in the feed generation
# Remove the levels that you do not wish to include in the feed