fix: [pep8] More fixes

pull/299/head
Steve Clement 2019-05-02 11:23:49 +09:00 committed by GitHub
parent 81ffabd621
commit 9af06fd24c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 9 deletions

View File

@ -48,10 +48,10 @@ userConfig = {'include_analysisid': {'type': 'Boolean',
moduleconfig = ['apikey', 'url', 'wait_period'] moduleconfig = ['apikey', 'url', 'wait_period']
def handler(q=False): def handler(q=False):
global include_analysisid, include_imphash_ssdeep, include_extracted_files, include_analysisdetails, include_vtidetails, include_static_to_ids global include_analysisid, include_imphash_ssdeep, include_extracted_files, include_analysisdetails, include_vtidetails, include_static_to_ids
if q is False: if q is False:
return False return False
request = json.loads(q) request = json.loads(q)
@ -72,6 +72,7 @@ def handler(q=False):
return misperrors return misperrors
if sample_id > 0: if sample_id > 0:
e = None
try: try:
api = VMRayRESTAPI(request["config"].get("url"), request["config"].get("apikey"), False) api = VMRayRESTAPI(request["config"].get("url"), request["config"].get("apikey"), False)
vmray_results = {'results': []} vmray_results = {'results': []}
@ -179,10 +180,10 @@ def vmrayDownloadAnalysis(api, analysis_id):
else: else:
return False return False
def vmrayVti(vti): def vmrayVti(vti):
'''VMRay Threat Identifier (VTI) rules that matched for this analysis''' '''VMRay Threat Identifier (VTI) rules that matched for this analysis'''
if vti: if vti:
r = {'results': []} r = {'results': []}
for rule in vti: for rule in vti: