mirror of https://github.com/MISP/misp-modules
add: Update to support attribute hostname|port
parent
f94adcada6
commit
839c8de0eb
|
@ -2,8 +2,8 @@ import json
|
|||
import dns.resolver
|
||||
|
||||
misperrors = {'error': 'Error'}
|
||||
mispattributes = {'input': ['hostname', 'domain', 'domain|ip'], 'output': ['ip-src',
|
||||
'ip-dst']}
|
||||
mispattributes = {'input': ['hostname', 'hostname|port', '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']}
|
||||
|
@ -21,6 +21,8 @@ def handler(q=False):
|
|||
toquery = request['domain']
|
||||
elif request.get('domain|ip'):
|
||||
toquery = request['domain|ip'].split('|')[0]
|
||||
elif request.get('hostname|port'):
|
||||
toquery = request['hostname|port'].split('|')[0]
|
||||
else:
|
||||
return False
|
||||
r = dns.resolver.Resolver()
|
||||
|
|
Loading…
Reference in New Issue