Fix edge case in ElasticGroovy
This commit is contained in:
parent
99b22cfa56
commit
f1bbb255cd
|
@ -232,5 +232,5 @@ class ElasticGroovyExploiter(HostExploiter):
|
||||||
try:
|
try:
|
||||||
json_resp = json.loads(response.text)
|
json_resp = json.loads(response.text)
|
||||||
return json_resp['hits']['hits'][0]['fields'][self.MONKEY_RESULT_FIELD]
|
return json_resp['hits']['hits'][0]['fields'][self.MONKEY_RESULT_FIELD]
|
||||||
except KeyError:
|
except (KeyError, IndexError):
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in New Issue