mirror of https://github.com/MISP/misp-modules
check entry in result dico
parent
436254cd8c
commit
f32717c896
|
@ -44,13 +44,13 @@ class OnypheClient:
|
||||||
results = self.onyphe_client.summary_ip(self.attribute['value'])
|
results = self.onyphe_client.summary_ip(self.attribute['value'])
|
||||||
if 'results' in results:
|
if 'results' in results:
|
||||||
for r in results['results']:
|
for r in results['results']:
|
||||||
print(r)
|
if 'domain' in r:
|
||||||
domain = r['domain']
|
domain = r['domain']
|
||||||
if type(domain) == list:
|
if type(domain) == list:
|
||||||
for d in domain:
|
for d in domain:
|
||||||
self.__get_object_domain_ip(d, 'domain')
|
self.__get_object_domain_ip(d, 'domain')
|
||||||
elif type(domain) == str:
|
elif type(domain) == str:
|
||||||
self.__get_object_domain_ip(domain, 'domain')
|
self.__get_object_domain_ip(domain, 'domain')
|
||||||
|
|
||||||
def __get_object_domain_ip(self, obs, relation):
|
def __get_object_domain_ip(self, obs, relation):
|
||||||
objet_domain_ip = MISPObject('domain-ip')
|
objet_domain_ip = MISPObject('domain-ip')
|
||||||
|
|
Loading…
Reference in New Issue