mirror of https://github.com/MISP/misp-modules
fix: [variodbs] Fixed indentation issue
- if `exploit_results` is empty, we should not go any further in the query for next values exploit resultspull/590/head
parent
5526c2c195
commit
e18ac776bb
|
@ -191,15 +191,15 @@ def handler(q=False):
|
||||||
if exploit_results:
|
if exploit_results:
|
||||||
parser.parse_exploit_information(exploit_results['results'])
|
parser.parse_exploit_information(exploit_results['results'])
|
||||||
empty = False
|
empty = False
|
||||||
if exploit_results['next'] is not None:
|
if exploit_results['next'] is not None:
|
||||||
while(1):
|
while(1):
|
||||||
exploit_results = requests.get(exploit_results['next'], headers=headers)
|
exploit_results = requests.get(exploit_results['next'], headers=headers)
|
||||||
if exploit_results.status_code != 200:
|
if exploit_results.status_code != 200:
|
||||||
break
|
break
|
||||||
exploit_results = exploit_results.json()
|
exploit_results = exploit_results.json()
|
||||||
parser.parse_exploit_information(exploit_results['results'])
|
parser.parse_exploit_information(exploit_results['results'])
|
||||||
if exploit_results['next'] is None:
|
if exploit_results['next'] is None:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
return {'error': 'Error while querying the variotdbs API.'}
|
return {'error': 'Error while querying the variotdbs API.'}
|
||||||
if empty:
|
if empty:
|
||||||
|
|
Loading…
Reference in New Issue