diff --git a/bin/lib/Correlate_object.py b/bin/lib/Correlate_object.py index 647650ee..b6799b6b 100755 --- a/bin/lib/Correlate_object.py +++ b/bin/lib/Correlate_object.py @@ -50,7 +50,7 @@ def exist_object(object_type, correlation_id, type_id=None): def get_object_metadata(object_type, correlation_id, type_id=None): if object_type == 'domain': - return Domain.Domain(correlation_id).get_domain_metadata() + return Domain.Domain(correlation_id).get_domain_metadata(tags=True) elif object_type == 'paste': return Item.get_item({"id": correlation_id, "date": True, "date_separator": True, "tags": True})[0] elif object_type == 'decoded': diff --git a/bin/lib/Domain.py b/bin/lib/Domain.py index 9c3eb5b0..6bab5779 100755 --- a/bin/lib/Domain.py +++ b/bin/lib/Domain.py @@ -355,7 +355,7 @@ class Domain(object): def get_domain_all_ports(self): return get_domain_all_ports(self.domain, self.type) - def get_domain_metadata(self, first_seen=True, last_ckeck=True, status=True, ports=True): + def get_domain_metadata(self, first_seen=True, last_ckeck=True, status=True, ports=True, tags=False): ''' Get Domain basic metadata @@ -365,6 +365,8 @@ class Domain(object): :type last_ckeck: boolean :param ports: get all domain ports :type ports: boolean + :param tags: get all domain tags + :type tags: boolean :return: a dict of all metadata for a given domain :rtype: dict @@ -382,6 +384,8 @@ class Domain(object): dict_metadata['status'] = self.is_domain_up() if ports: dict_metadata['ports'] = self.get_domain_all_ports() + if tags: + dict_metadata['tags'] = self.get_domain_tags() return dict_metadata def get_domain_tags(self):