mirror of https://github.com/MISP/PyMISP
Merge pull request #39 from kevthehermit/master
Add Attribute by named category and typepull/21/head
commit
5fb8aac57b
|
@ -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