mirror of https://github.com/MISP/misp-modules
Merge pull request #589 from amuehlem/master
added ip-dst|port and ip-src|port to requestpull/633/head
commit
1c963d3482
|
@ -5,7 +5,7 @@ misperrors = {'error': 'Error'}
|
|||
mispattributes = {'input': ['ip-src', 'ip-dst', 'domain|ip'], 'output': ['hostname']}
|
||||
|
||||
# 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',
|
||||
'module-type': ['expansion', 'hover']}
|
||||
|
||||
|
@ -23,6 +23,10 @@ def handler(q=False):
|
|||
toquery = request['ip-src']
|
||||
elif request.get('domain|ip'):
|
||||
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:
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue