Ejemplo n.º 1
0
        public async Task RescanMultipleKnownFile()
        {
            IEnumerable <RescanResult> fileResult = await VirusTotal.RescanFilesAsync(TestData.KnownHashes);

            foreach (RescanResult rescanResult in fileResult)
            {
                //It should always be in the VirusTotal database. We expect it to rescan it
                Assert.Equal(RescanResponseCode.Queued, rescanResult.ResponseCode);
            }
        }
Ejemplo n.º 2
0
        public async Task RescanBatchLimit()
        {
            IgnoreMissingJson("[array] / Permalink", "[array] / scan_id", "[array] / SHA256");

            VirusTotal.RestrictNumberOfResources = false;

            IEnumerable <RescanResult> results = await VirusTotal.RescanFilesAsync(TestData.GetRandomSHA1s(50));

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