Ejemplo n.º 1
0
        /// <summary>
        /// Gets a list of range definitions
        /// </summary>
        public List <string> GetRangeDefinitionListRaw()
        {
            object value = GetOption("RangeDefinitionList");
            var    list  = value as List <string>;

            if (list == null)
            {
                list = new List <string>();
                FuzzerRangeDefinition defaultDef = new FuzzerRangeDefinition(FuzzerRangeType.CharRange,
                                                                             FuzzerRangeStatus.Enabled, "0-9,a-z", 1, 6);
                list.Add(defaultDef.ToString());
            }

            return(list);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets a list of range definitions
        /// </summary>
        public List <FuzzerRangeDefinition> GetRangeDefinitionList()
        {
            List <FuzzerRangeDefinition> defs = new List <FuzzerRangeDefinition>();
            var list = GetRangeDefinitionListRaw();

            foreach (string line in list)
            {
                string[] vals = line.Split('\t');
                if (vals.Length == 5)
                {
                    var def = new FuzzerRangeDefinition(vals[0], vals[1], vals[2], vals[3], vals[4]);
                    defs.Add(def);
                }
            }
            return(defs);
        }