mirror of https://github.com/MISP/misp-modules
fix: [pep8] More fixes
parent
81ffabd621
commit
9af06fd24c
|
@ -26,32 +26,32 @@ moduleinfo = {'version': '0.2', 'author': 'Koen Van Impe',
|
||||||
'module-type': ['import']}
|
'module-type': ['import']}
|
||||||
userConfig = {'include_analysisid': {'type': 'Boolean',
|
userConfig = {'include_analysisid': {'type': 'Boolean',
|
||||||
'message': 'Include link to VMRay analysis'
|
'message': 'Include link to VMRay analysis'
|
||||||
},
|
},
|
||||||
'include_analysisdetails': {'type': 'Boolean',
|
'include_analysisdetails': {'type': 'Boolean',
|
||||||
'message': 'Include (textual) analysis details'
|
'message': 'Include (textual) analysis details'
|
||||||
},
|
},
|
||||||
'include_vtidetails': {'type': 'Boolean',
|
'include_vtidetails': {'type': 'Boolean',
|
||||||
'message': 'Include VMRay Threat Identifier (VTI) rules'
|
'message': 'Include VMRay Threat Identifier (VTI) rules'
|
||||||
},
|
|
||||||
'include_imphash_ssdeep': {'type': 'Boolean',
|
|
||||||
'message': 'Include imphash and ssdeep'
|
|
||||||
},
|
},
|
||||||
|
'include_imphash_ssdeep': {'type': 'Boolean',
|
||||||
|
'message': 'Include imphash and ssdeep'
|
||||||
|
},
|
||||||
'include_extracted_files': {'type': 'Boolean',
|
'include_extracted_files': {'type': 'Boolean',
|
||||||
'message': 'Include extracted files section'
|
'message': 'Include extracted files section'
|
||||||
},
|
},
|
||||||
|
|
||||||
'sample_id': {'type': 'Integer',
|
'sample_id': {'type': 'Integer',
|
||||||
'errorMessage': 'Expected a sample ID',
|
'errorMessage': 'Expected a sample ID',
|
||||||
'message': 'The VMRay sample_id'
|
'message': 'The VMRay sample_id'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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:
|
||||||
|
|
Loading…
Reference in New Issue