mirror of https://github.com/MISP/misp-modules
fix: Returning results in text format
- Makes the hover functionality display the full result instead of skipping the records listpull/339/head
parent
73302bef1e
commit
6801289175
|
@ -24,7 +24,7 @@ def handler(q=False):
|
||||||
data = {'ip': ip}
|
data = {'ip': ip}
|
||||||
r = requests.post(greynoise_api_url, data=data, headers={'user-agent': default_user_agent}) # Real request
|
r = requests.post(greynoise_api_url, data=data, headers={'user-agent': default_user_agent}) # Real request
|
||||||
if r.status_code == 200: # OK (record found)
|
if r.status_code == 200: # OK (record found)
|
||||||
response = json.loads(r.text)
|
response = r.text
|
||||||
if response:
|
if response:
|
||||||
return {'results': [{'types': mispattributes['output'], 'values': response}]}
|
return {'results': [{'types': mispattributes['output'], 'values': response}]}
|
||||||
elif r.status_code == 404: # Not found (not an error)
|
elif r.status_code == 404: # Not found (not an error)
|
||||||
|
|
Loading…
Reference in New Issue