mirror of https://github.com/MISP/PyMISP
new: Optionally include deleted attributes/objects in feed
parent
daf937a100
commit
2fbf6c96a3
examples/feed-generator
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue