Exclude internal reference

pull/106/head
Tristan METAYER 2017-02-21 17:12:17 +01:00
parent dd2646a0f4
commit 20cb534203
1 changed files with 10 additions and 8 deletions

View File

@ -3,14 +3,14 @@ import base64
misperrors = {'error': 'Error'} misperrors = {'error': 'Error'}
# possible module-types: 'expansion', 'hover' or both
moduleinfo = {'version': '1', moduleinfo = {'version': '1',
'author': 'TM', 'author': 'TM',
'description': 'export lite', 'description': 'export lite',
'module-type': ['export']} 'module-type': ['export']}
# config fields that your code expects from the site admin #~ config form admin site but do not work
moduleconfig = ["indent_json_export"] #~ moduleconfig = ["indent_json_export"]
moduleconfig = []
#~ mispattributes = {'input':'all'} ? #~ mispattributes = {'input':'all'} ?
mispattributes = {} mispattributes = {}
@ -29,6 +29,7 @@ def handler(q=False):
if 'data' not in request: if 'data' not in request:
return False return False
#~ Misp json structur
liteEvent = {'Event':{}} liteEvent = {'Event':{}}
for evt in request['data']: for evt in request['data']:
@ -38,6 +39,7 @@ def handler(q=False):
attrs = evt['Attribute'] attrs = evt['Attribute']
for attr in attrs: for attr in attrs:
if 'Internal reference' not in attr['category']:
liteAttr = {} liteAttr = {}
liteAttr['category'] = attr['category'] liteAttr['category'] = attr['category']
liteAttr['type'] = attr['type'] liteAttr['type'] = attr['type']