mirror of https://github.com/MISP/misp-modules
fix: Making pep8 happy
parent
fc54785d6b
commit
c9c6f69bd4
|
@ -7,19 +7,16 @@ except ImportError:
|
|||
|
||||
misperrors = {'error': 'Error'}
|
||||
mispattributes = {'input': ['url'], 'output': ['text']}
|
||||
moduleinfo = {'author': 'Oun & Gindt', 'description': 'An expansion hover module to expand google search information about an URL', 'module-type': ['hover']}
|
||||
moduleinfo = {'author': 'Oun & Gindt', 'module-type': ['hover'],
|
||||
'description': 'An expansion hover module to expand google search information about an URL'}
|
||||
|
||||
|
||||
def handler(q=False):
|
||||
if q is False:
|
||||
return False
|
||||
request = json.loads(q)
|
||||
if request.get('url'):
|
||||
toquery = request['url']
|
||||
else:
|
||||
misperrors['error'] = "Unsupported attributes type"
|
||||
return misperrors
|
||||
|
||||
if not request.get('url'):
|
||||
return {'error': "Unsupported attributes type"}
|
||||
num_page = 1
|
||||
res = ""
|
||||
search_results = google.search(request['url'], num_page)
|
||||
|
@ -29,6 +26,7 @@ def handler(q=False):
|
|||
res += '\n\n'
|
||||
return {'results': [{'types': mispattributes['output'], 'values':res}]}
|
||||
|
||||
|
||||
def introspection():
|
||||
return mispattributes
|
||||
|
||||
|
|
Loading…
Reference in New Issue