mirror of https://github.com/MISP/PyMISP
Cleanup create_events
parent
1532bc879f
commit
8dbeec3f96
|
@ -13,7 +13,7 @@ except NameError:
|
||||||
|
|
||||||
|
|
||||||
def init(url, key):
|
def init(url, key):
|
||||||
return PyMISP(url, key, True, 'json')
|
return PyMISP(url, key, True, 'json', debug=True)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
parser = argparse.ArgumentParser(description='Create an event on MISP.')
|
parser = argparse.ArgumentParser(description='Create an event on MISP.')
|
||||||
|
@ -26,7 +26,4 @@ if __name__ == '__main__':
|
||||||
misp = init(misp_url, misp_key)
|
misp = init(misp_url, misp_key)
|
||||||
|
|
||||||
event = misp.new_event(args.distrib, args.threat, args.analysis, args.info)
|
event = misp.new_event(args.distrib, args.threat, args.analysis, args.info)
|
||||||
print event
|
print(event)
|
||||||
|
|
||||||
response = misp.add_mutex(event, 'booh')
|
|
||||||
print response
|
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
"Event": {
|
||||||
|
"uuid": "57c06bb1-625c-4d34-9b9f-4066950d210f",
|
||||||
|
"orgc_id": "1",
|
||||||
|
"publish_timestamp": "0",
|
||||||
|
"RelatedEvent": [],
|
||||||
|
"org_id": "1",
|
||||||
|
"Org": {
|
||||||
|
"uuid": "55f6ea5e-2c60-40e5-964f-47a8950d210f",
|
||||||
|
"name": "CIRCL",
|
||||||
|
"id": "1"
|
||||||
|
},
|
||||||
|
"attribute_count": null,
|
||||||
|
"distribution": "0",
|
||||||
|
"sharing_group_id": "0",
|
||||||
|
"threat_level_id": "1",
|
||||||
|
"locked": false,
|
||||||
|
"Attribute": [],
|
||||||
|
"published": false,
|
||||||
|
"ShadowAttribute": [],
|
||||||
|
"date": "2016-08-26",
|
||||||
|
"info": "This is a test",
|
||||||
|
"timestamp": "1472228273",
|
||||||
|
"Orgc": {
|
||||||
|
"uuid": "55f6ea5e-2c60-40e5-964f-47a8950d210f",
|
||||||
|
"name": "CIRCL",
|
||||||
|
"id": "1"
|
||||||
|
},
|
||||||
|
"id": "594",
|
||||||
|
"proposal_email_lock": false,
|
||||||
|
"analysis": "0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue