From 6116c017c18f181d9e6198c0dc8f3b81643f8fc7 Mon Sep 17 00:00:00 2001 From: iglocska Date: Wed, 10 Aug 2016 17:11:46 +0200 Subject: [PATCH] Update to the DNS module to support domain|ip --- misp_modules/modules/expansion/dns.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misp_modules/modules/expansion/dns.py b/misp_modules/modules/expansion/dns.py index 099376d..41da8b2 100755 --- a/misp_modules/modules/expansion/dns.py +++ b/misp_modules/modules/expansion/dns.py @@ -2,8 +2,8 @@ import json import dns.resolver misperrors = {'error': 'Error'} -mispattributes = {'input': ['hostname', 'domain'], 'output': ['ip-src', - 'ip-dst']} +mispattributes = {'input': ['hostname', 'domain', 'domain|ip'], 'output': ['ip-src', + 'ip-dst']} moduleinfo = {'version': '0.2', 'author': 'Alexandre Dulaunoy', 'description': 'Simple DNS expansion service to resolve IP address from MISP attributes', 'module-type': ['expansion', 'hover']} @@ -19,6 +19,8 @@ def handler(q=False): toquery = request['hostname'] elif request.get('domain'): toquery = request['domain'] + elif request.get('domain|ip'): + toquery = request['domain|ip'].split('|')[0] else: return False r = dns.resolver.Resolver()