diff --git a/misp_modules/modules/expansion/farsight_passivedns.py b/misp_modules/modules/expansion/farsight_passivedns.py index 47e7eaa..ff877a1 100755 --- a/misp_modules/modules/expansion/farsight_passivedns.py +++ b/misp_modules/modules/expansion/farsight_passivedns.py @@ -43,7 +43,7 @@ moduleconfig = ['apikey', 'server', 'limit', 'flex_queries'] DEFAULT_DNSDB_SERVER = 'https://api.dnsdb.info' DEFAULT_LIMIT = 10 - +org_distribution = '0' TYPE_TO_FEATURE = { "btc": "Bitcoin address", "dkim": "domainkeys identified mail", @@ -103,6 +103,7 @@ class FarsightDnsdbParser(): comment = self.comment % (query_type, TYPE_TO_FEATURE[self.attribute['type']], self.attribute['value']) for result in results: passivedns_object = MISPObject('passive-dns') + passivedns_object.distribution = org_distribution if result.get('rdata') and isinstance(result['rdata'], list): for rdata in result.pop('rdata'): passivedns_object.add_attribute(**self._parse_attribute(comment, 'rdata', rdata)) @@ -121,7 +122,7 @@ class FarsightDnsdbParser(): return {'results': results} def _parse_attribute(self, comment, feature, value): - attribute = {'value': value, 'comment': comment} + attribute = {'value': value, 'comment': comment, 'distribution': org_distribution} attribute.update(self.passivedns_mapping[feature]) return attribute