Add a method to add a textual detection name under the 'Antivirus detection' category

pull/24/head
Jessy Campos 2016-07-26 13:13:29 -04:00
parent 24d131aa32
commit d31ec7a73c
1 changed files with 5 additions and 0 deletions

View File

@ -451,6 +451,11 @@ class PyMISP(object):
attributes.append(self._prepare_full_attribute(category, 'link', link, to_ids, comment, distribution)) attributes.append(self._prepare_full_attribute(category, 'link', link, to_ids, comment, distribution))
return self._send_attributes(event, attributes, proposal) return self._send_attributes(event, attributes, proposal)
def add_detection_name(self, event, name, category='Antivirus detection', to_ids=False, comment=None, distribution=None, proposal=False):
attributes = []
attributes.append(self._prepare_full_attribute(category, 'text', name, to_ids, comment, distribution))
return self._send_attributes(event, attributes, proposal)
def add_filename(self, event, filename, category='Artifacts dropped', to_ids=False, comment=None, distribution=None, proposal=False): def add_filename(self, event, filename, category='Artifacts dropped', to_ids=False, comment=None, distribution=None, proposal=False):
attributes = [] attributes = []
attributes.append(self._prepare_full_attribute(category, 'filename', filename, to_ids, comment, distribution)) attributes.append(self._prepare_full_attribute(category, 'filename', filename, to_ids, comment, distribution))