def get_fireeye_report(sha256, envid, type):
raise ApiException({}, 501)
# XML, HTML, BIN and PCAP are GZipped
Sample.query.filter_by(sha256=sha256).first_or_404()
headers = {
'Accept': 'text/html',
'User-Agent': 'FireEye Sandbox API Client'}
params = {'type': type, 'environmentId': envid}
vx = fireeye.api.get('result/{}'.format(sha256),
params=params, headers=headers)
if type in ['xml', 'html', 'bin', 'pcap']:
return gzip.decompress(vx)
return vx
评论列表
文章目录