Exemplo n.º 1
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="type"></param>
 /// <param name="status"></param>
 /// <param name="value"></param>
 public FuzzerRangeDefinition(FuzzerRangeType type, FuzzerRangeStatus status, string value, int startLen, int maxLen)
 {
     _type   = type;
     _status = status;
     _value  = value;
     if (_type == FuzzerRangeType.Dictionary && !File.Exists(_value))
     {
         _status = FuzzerRangeStatus.Disabled;
         _value  = "!" + _value;
     }
     _startLen = startLen;
     _maxLen   = maxLen;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="type"></param>
        /// <param name="status"></param>
        /// <param name="value"></param>
        public FuzzerRangeDefinition(string type, string status, string value, string startLen, string maxLen)
        {
            _type   = type.Equals("CharRange", StringComparison.OrdinalIgnoreCase)?FuzzerRangeType.CharRange:FuzzerRangeType.Dictionary;
            _status = status.Equals("true", StringComparison.OrdinalIgnoreCase)?FuzzerRangeStatus.Enabled:FuzzerRangeStatus.Disabled;

            _value = value;

            /*
             * if(_type == FuzzerRangeType.Dictionary && !File.Exists(_value))
             * {
             *  _status = FuzzerRangeStatus.Disabled;
             *  _value = "!"+_value;
             * }*/
            int startLenVal = 0;
            int maxLenVal   = 0;

            int.TryParse(startLen, out startLenVal);
            int.TryParse(maxLen, out maxLenVal);
            _startLen = startLenVal;
            _maxLen   = maxLenVal;
        }