Esempio n. 1
0
        public void AddResource(WebsiteResource resource, string host = null, IEnumerable <string> evasions = null)
        {
            HtmlmthBaseline baseline = WebsiteResourceToBaseline(resource, host);

            Baselines.Add(baseline);
            if (evasions != null)
            {
                SetEvasions(baseline, evasions);
            }
        }
Esempio n. 2
0
        private static HtmlmthBaseline WebsiteResourceToBaseline(WebsiteResource resource, string host = null)
        {
            string ext = Path.GetExtension(resource.Path);

            if (ext == "")
            {
                ext = ".html";
            }
            HtmlmthBaseline baseline = new HtmlmthBaseline(host, resource.Path, Utils.RandomString(10) + ext, resource.Bytes);

            return(baseline);
        }
Esempio n. 3
0
        public void SetEvasions(HtmlmthBaseline baseline, IEnumerable <string> evasions)
        {
            var c = new HtmlmthCase(baseline.Host, baseline.Path, Utils.RandomString(10), evasions);

            Cases.Add(c);
        }