Added add_domain_ip attribute function

pull/21/head
Antonio S 2016-06-27 16:53:13 +02:00
parent 5bbd2a4bcc
commit b7c7afa4f6
1 changed files with 5 additions and 0 deletions

View File

@ -486,6 +486,11 @@ class PyMISP(object):
attributes.append(self._prepare_full_attribute(category, 'domain', domain, to_ids, comment, distribution)) attributes.append(self._prepare_full_attribute(category, 'domain', domain, to_ids, comment, distribution))
return self._send_attributes(event, attributes, proposal) return self._send_attributes(event, attributes, proposal)
def add_domain_ip(self, event, domain, ip, category='Network activity', to_ids=True, comment=None, distribution=None, proposal=False):
attributes = []
attributes.append(self._prepare_full_attribute(category, 'domain|ip', "%s|%s" % (domain, ip), to_ids, comment, distribution))
return self._send_attributes(event, attributes, proposal)
def add_url(self, event, url, category='Network activity', to_ids=True, comment=None, distribution=None, proposal=False): def add_url(self, event, url, category='Network activity', to_ids=True, comment=None, distribution=None, proposal=False):
attributes = [] attributes = []
attributes.append(self._prepare_full_attribute(category, 'url', url, to_ids, comment, distribution)) attributes.append(self._prepare_full_attribute(category, 'url', url, to_ids, comment, distribution))