mirror of https://github.com/MISP/PyMISP
parent
46396202f5
commit
ea952a9588
|
@ -112,7 +112,7 @@ class PyMISP(object):
|
|||
raise PyMISPError('Unable to connect to MISP ({}). Please make sure the API key and the URL are correct (http/https is required): {}'.format(self.root_url, e))
|
||||
|
||||
session = self.__prepare_session(out_type)
|
||||
self.describe_types = session.get(self.root_url + 'attributes/describeTypes.json').json()
|
||||
self.describe_types = session.get(urljoin(self.root_url, 'attributes/describeTypes.json')).json()
|
||||
|
||||
self.categories = self.describe_types['result']['categories']
|
||||
self.types = self.describe_types['result']['types']
|
||||
|
@ -450,6 +450,11 @@ class PyMISP(object):
|
|||
attributes.append(self._prepare_full_attribute(category, 'mutex', mutex, to_ids, comment, distribution))
|
||||
return self._send_attributes(event, attributes, proposal)
|
||||
|
||||
def add_yara(self, event, yara, category='Payload delivery', to_ids=False, comment=None, distribution=None, proposal=False):
|
||||
attributes = []
|
||||
attributes.append(self._prepare_full_attribute(category, 'yara', yara, to_ids, comment, distribution))
|
||||
return self._send_attributes(event, attributes, proposal)
|
||||
|
||||
# ##### Network attributes #####
|
||||
|
||||
def add_ipdst(self, event, ipdst, category='Network activity', to_ids=True, comment=None, distribution=None, proposal=False):
|
||||
|
|
Loading…
Reference in New Issue