【发布时间】:2021-06-30 04:15:30
【问题描述】:
我正在尝试使用 VirusTotal API 获取 json 响应。为了获取结果作为响应,我创建了一个 python 脚本,如下所示:然后错误显示如下:[Winerror]:10054 现有连接被远程主机强行关闭
import requests
url = "https://www.virustotal.com/vtapi/v2/file/scan"
api_key = "MyApiKey"
params = {"apikey": api_key}
files = {"file": ("app.exe", open("C:/Users/Administrator/Desktop/malware detection/app.exe", "rb")}
try:
response = requests.post(url, files=files, params=params)
print(response.json())
except Exception as e:
print(e)
【问题讨论】:
标签: python malware malware-detection