Merge pull request #176 from cudeso/master

Fix VMRay API access error
pull/177/head
Alexandre Dulaunoy 2018-03-30 15:41:56 +02:00 committed by GitHub
commit fd054a305b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -93,7 +93,10 @@ def handler(q=False):
analysis_data = vmrayDownloadAnalysis(api, analysis_id)
if analysis_data:
p = vmrayVtiPatterns(analysis_data["vti_patterns"])
if "analysis_vti_patterns" in analysis_data:
p = vmrayVtiPatterns(analysis_data["analysis_vti_patterns"])
else:
p = vmrayVtiPatterns(analysis_data["vti_patterns"])
if p and len(p["results"]) > 0:
vti_patterns_found = True
vmray_results = {'results': vmray_results["results"] + p["results"]}