mirror of https://github.com/MISP/PyMISP
Add Attribute by named category and type
parent
f9ce3999e9
commit
12fa199202
|
@ -385,6 +385,15 @@ class PyMISP(object):
|
|||
response = self.update_event(event['Event']['id'], event, 'json')
|
||||
return self._check_response(response)
|
||||
|
||||
def add_named_attribute(self, event, category, type_value, value, to_ids=False, comment=None, distribution=None, proposal=False):
|
||||
attributes = []
|
||||
if value and category and type:
|
||||
try:
|
||||
attributes.append(self._prepare_full_attribute(category, type_value, value, to_ids, comment, distribution))
|
||||
except NewAttributeError as e:
|
||||
return e
|
||||
return self._send_attributes(event, attributes, proposal)
|
||||
|
||||
def add_hashes(self, event, category='Artifacts dropped', filename=None, md5=None, sha1=None, sha256=None, ssdeep=None, comment=None, to_ids=True, distribution=None, proposal=False):
|
||||
|
||||
attributes = []
|
||||
|
|
Loading…
Reference in New Issue