using System.Linq;
using System.Collections.Generic;

namespace winPEAS._3rdParty.Watson.Msrc
{
    internal static class CVE_2020_0796
    {
        private const string name = "CVE-2020-0796";

        public static void Check(VulnerabilityCollection vulnerabilities, int buildNumber, List<int> installedKBs)
        {
            var supersedence = new List<int>();

            switch (buildNumber)
            {
                case 18362:
                case 18363:

                    supersedence.AddRange(new int[] {
                        4551762
                    });

                    break;

                default:
                    return;
            }

            if (!supersedence.Intersect(installedKBs).Any())
            {
                vulnerabilities.SetAsVulnerable(name);
            }
        }
    }
}
