Important note before use: 了解服务条款协议 . 您可以完全访问所有内容:"When you upload or otherwise submit content, you give VirusTotal (and those we work with) a worldwide, royalty free, irrevocable and transferable licence to use, edit, host, store, reproduce, modify, create derivative works, communicate, publish, publicly perform, publicly display and distribute such content."
您可以使用VirusTotal.com的服务,而不是使用本地防病毒程序(从而将程序绑定到特定的防病毒产品并请求客户安装该防病毒产品) .
该站点提供免费服务,您的文件作为输入提供给众多防病毒产品,您将收到一份详细报告,其中包含扫描过程产生的证据 . 通过这种方式,您的解决方案不再与特定的防病毒产品绑定(尽管您已绑定到Internet可用性)
该站点还提供了一个应用程序编程接口,允许以编程方式接近其扫描引擎 .
并且因为没有代码没有答案是完整的,所以直接从VirusTotal.NET库附带的示例客户端获取
static void Main(string[] args)
{
VirusTotal virusTotal = new VirusTotal(ConfigurationManager.AppSettings["ApiKey"]);
//Use HTTPS instead of HTTP
virusTotal.UseTLS = true;
//Create the EICAR test virus. See http://www.eicar.org/86-0-Intended-use.html
FileInfo fileInfo = new FileInfo("EICAR.txt");
File.WriteAllText(fileInfo.FullName, @"X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*");
//Check if the file has been scanned before.
FileReport fileReport = virusTotal.GetFileReport(fileInfo);
bool hasFileBeenScannedBefore = fileReport.ResponseCode == ReportResponseCode.Present;
Console.WriteLine("File has been scanned before: " + (hasFileBeenScannedBefore ? "Yes" : "No"));
//If the file has been scanned before, the results are embedded inside the report.
if (hasFileBeenScannedBefore)
{
PrintScan(fileReport);
}
else
{
ScanResult fileResult = virusTotal.ScanFile(fileInfo);
PrintScan(fileResult);
}
... continue with testing a web site ....
}
DISCLAIMER
我绝不参与其中 . 我写这个答案只是因为它似乎是对这4年答案的一个很好的更新 .