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