Sha256: d33cc48008da743ffb95a2ecd883964a6a1655085cc06dc80c416a73bec11f0f

Contents?: true

Size: 618 Bytes

Versions: 124

Compression:

Stored size: 618 Bytes

Contents

# Search operation on an attribute that holds a port number and is being searched with a single Integer port number.
class MetasploitDataModels::Search::Operation::Port::Number < Metasploit::Model::Search::Operation::Integer
  #
  # CONSTANTS
  #

  # The number of bits in a port number
  BITS = 16
  # The maximum port number
  MAXIMUM = (1 << BITS) - 1
  # The minimum port number
  MINIMUM = 0

  # The range of valid port numbers from {MINIMUM} to {MAXIMUM}, inclusive.
  RANGE = (MINIMUM..MAXIMUM)

  #
  # Validations
  #

  validates :value,
            inclusion: {
                in: RANGE
            }
end

Version data entries

124 entries across 124 versions & 2 rubygems

Version Path
wg-metasploit_data_models-4.1.4.02 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-6.0.5 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-6.0.4 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-6.0.3 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-6.0.2 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-6.0.1 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-6.0.0 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-5.0.6 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-5.0.5 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-5.0.4 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-5.0.3 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-5.0.2 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-5.0.1 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-5.0.0 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-4.1.4 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-4.1.3 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-4.1.2 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-4.1.1 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-4.1.0 app/models/metasploit_data_models/search/operation/port/number.rb
metasploit_data_models-4.0.2 app/models/metasploit_data_models/search/operation/port/number.rb