import argparse
import requests

parser = argparse.ArgumentParser()
parser.add_argument('-sha256', dest='sha256', help='SHA256')
 
args = parser.parse_args()


url = 'https://api.threatbook.cn/v3/file/report/multiengines'
params = {
    'apikey': '82753bab5b7f40b896fef432ac9dbe15523e60133d3e4f03aeab91a0b1f7afc1',
    'sandbox_type': 'win7_sp1_enx86_office2003',
    'sha256':args.sha256
}
response = requests.get(url, params=params)
file_name = 'tmp.txt'
tmpnow = response.json();
tnow = str(tmpnow)
now = tnow.encode()
with open(file_name,'wb') as file_obj:
    file_obj.write(now)
