我目前在我的 C# MVC 项目中使用 VirusTotal.NET nuget 包来扫描上传的文件。我正在使用此处给出的相同示例https://github.com/Genbox/VirusTotal.NET
VirusTotal virusTotal = new VirusTotal("YOUR API KEY HERE");
//Use HTTPS instead of HTTP
virusTotal.UseTLS = true;
//Create the EICAR test virus. See http://www.eicar.org/86-0-Intended-use.html
byte[] eicar =
Encoding.ASCII.GetBytes(@"X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*");
//Check if the file has been scanned before.
FileReport report = await virusTotal.GetFileReportAsync(eicar);
Console.WriteLine("Seen before: " + (report.ResponseCode == FileReportResponseCode.Present ? "Yes" : "No"));
我正在将上传文件的字节数组加载到eicar
上述代码中的变量中。根据给定的示例,它将提供文件是否被扫描过。但我真正需要的是文件是否被感染。谁能建议我一个解决方案?