mirror of https://github.com/MISP/misp-modules
If filename add iocfilename as attachment
parent
3cb12d6962
commit
79f48eccfe
|
@ -33,8 +33,24 @@ def handler(q=False):
|
|||
return json.dumps({"success": 0})
|
||||
|
||||
pkg = openioc.load_openioc(package)
|
||||
|
||||
# add origin file as attachment
|
||||
if q.get("filename"):
|
||||
r["results"].append({
|
||||
"values": [q.get('filename')],
|
||||
"types": ['attachment'],
|
||||
"categories": ['Support Tool'],
|
||||
"data" : q.get('data'),
|
||||
})
|
||||
|
||||
# return all attributes
|
||||
for attrib in pkg.attributes:
|
||||
r["results"].append({"values": [attrib.value], "types": [attrib.type], "categories": [attrib.category]})
|
||||
r["results"].append({
|
||||
"values": [attrib.value],
|
||||
"types": [attrib.type],
|
||||
"categories": [attrib.category],
|
||||
"comment":attrib.comment})
|
||||
|
||||
return r
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue