mirror of https://github.com/MISP/PyMISP
Allow to update an event by UUID, syntax fixes.
parent
7c8cde0afd
commit
748136f3f1
|
@ -327,6 +327,9 @@ class PyMISP(object):
|
|||
return self.get_stix_event(**kwargs)
|
||||
|
||||
def update(self, event):
|
||||
if event['Event'].get('uuid'):
|
||||
eid = event['Event']['uuid']
|
||||
else:
|
||||
eid = event['Event']['id']
|
||||
return self.update_event(eid, event)
|
||||
|
||||
|
@ -450,6 +453,7 @@ class PyMISP(object):
|
|||
|
||||
# Send it on its way
|
||||
return self.add_named_attribute(event, 'attachment', filename, category, to_ids, comment, distribution, proposal, data=encodedData)
|
||||
|
||||
def add_regkey(self, event, regkey, rvalue=None, category='Artifacts dropped', to_ids=True, comment=None, distribution=None, proposal=False):
|
||||
if rvalue:
|
||||
type_value = 'regkey|value'
|
||||
|
|
|
@ -78,6 +78,7 @@ class MISPAttribute(object):
|
|||
self.SharingGroup = []
|
||||
self.ShadowAttribute = []
|
||||
self.disable_correlation = False
|
||||
self.RelatedAttribute = []
|
||||
|
||||
def _serialize(self):
|
||||
return '{type}{category}{to_ids}{uuid}{timestamp}{comment}{deleted}{value}'.format(
|
||||
|
|
Loading…
Reference in New Issue