fix add_domain_ip

pull/61/head
Déborah Servili 2017-03-10 14:48:11 +01:00
parent 537d8718f9
commit 0636b9393e
1 changed files with 2 additions and 0 deletions

View File

@ -541,6 +541,8 @@ class PyMISP(object):
return self.add_named_attribute(event, 'domain', domain, category, to_ids, comment, distribution, proposal)
def add_domain_ip(self, event, domain, ip, category='Network activity', to_ids=True, comment=None, distribution=None, proposal=False):
if isinstance(ip, str):
ip = [ip]
composed = list(map(lambda x: '%s|%s' % (domain, x), ip))
return self.add_named_attribute(event, 'domain|ip', composed, category, to_ids, comment, distribution, proposal)