mirror of https://github.com/MISP/misp-modules
added ip-dst|port and ip-src|port to request
parent
af1739cec5
commit
8d240e3541
|
@ -5,7 +5,7 @@ misperrors = {'error': 'Error'}
|
||||||
mispattributes = {'input': ['ip-src', 'ip-dst', 'domain|ip'], 'output': ['hostname']}
|
mispattributes = {'input': ['ip-src', 'ip-dst', 'domain|ip'], 'output': ['hostname']}
|
||||||
|
|
||||||
# possible module-types: 'expansion', 'hover' or both
|
# possible module-types: 'expansion', 'hover' or both
|
||||||
moduleinfo = {'version': '0.1', 'author': 'Andreas Muehlemann',
|
moduleinfo = {'version': '0.2', 'author': 'Andreas Muehlemann',
|
||||||
'description': 'Simple Reverse DNS expansion service to resolve reverse DNS from MISP attributes',
|
'description': 'Simple Reverse DNS expansion service to resolve reverse DNS from MISP attributes',
|
||||||
'module-type': ['expansion', 'hover']}
|
'module-type': ['expansion', 'hover']}
|
||||||
|
|
||||||
|
@ -23,6 +23,10 @@ def handler(q=False):
|
||||||
toquery = request['ip-src']
|
toquery = request['ip-src']
|
||||||
elif request.get('domain|ip'):
|
elif request.get('domain|ip'):
|
||||||
toquery = request['domain|ip'].split('|')[1]
|
toquery = request['domain|ip'].split('|')[1]
|
||||||
|
elif request.get('ip-src|port'):
|
||||||
|
toquery = request['ip-src|port'].split('|')[0]
|
||||||
|
elif request.get('ip-dst|port'):
|
||||||
|
toquery = request['ip-dst|port'].split('|')[0]
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue