Ejemplo n.º 1
0
        public void ScanMultipleKnownUrls()
        {
            string[] urls = { "google.se", "http://google.com", "https://virustotal.com" };

            List <ScanResult> urlScans = _virusTotal.ScanUrls(urls);

            foreach (ScanResult urlScan in urlScans)
            {
                Assert.AreEqual(ScanResponseCode.Queued, urlScan.ResponseCode);
            }
        }
Ejemplo n.º 2
0
        public async Task ScanMultipleUnknownUrl()
        {
            string[] urls = { "VirusTotal.NET" + Guid.NewGuid() + ".com", "VirusTotal.NET" + Guid.NewGuid() + ".com", "VirusTotal.NET" + Guid.NewGuid() + ".com", "VirusTotal.NET" + Guid.NewGuid() + ".com", "VirusTotal.NET" + Guid.NewGuid() + ".com" };

            List <UrlScanResult> urlScans = await VirusTotal.ScanUrls(urls);

            foreach (UrlScanResult urlScan in urlScans)
            {
                Assert.Equal(ScanResponseCode.Queued, urlScan.ResponseCode);
            }
        }
Ejemplo n.º 3
0
        public async Task ScanMultipleKnownUrls()
        {
            string[] urls = { "google.se", "http://google.com", "https://virustotal.com" };

            List <UrlScanResult> urlScans = await VirusTotal.ScanUrls(urls);

            foreach (UrlScanResult urlScan in urlScans)
            {
                Assert.Equal(ScanResponseCode.Queued, urlScan.ResponseCode);
            }
        }
Ejemplo n.º 4
0
        public async Task UrlScanBatchLimit()
        {
            List <string> urls = new List <string>();

            for (int i = 1; i <= 30; i++)
            {
                urls.Add(i + ".com");
            }

            List <UrlScanResult> results = await VirusTotal.ScanUrls(urls);

            //We only expect 25 as VT simply returns 25 results no matter the batch size.
            Assert.Equal(25, results.Count);
        }