Sha256: c120935e93635b046b08ac35cf14be00ccfe08fe32b1fa3757008b1f540c2af7

Contents?: true

Size: 1.18 KB

Versions: 5

Compression:

Stored size: 1.18 KB

Contents

class Mdm::VulnAttempt < ActiveRecord::Base
  #
  # Associations
  #

  # @!attribute loot
  #   Loot gathered from this attempt.
  #
  #   @return [Mdm::Loot] if {#exploited} is `true`.
  #   @return [nil] if {#exploited} is `false`.
  belongs_to :loot,
             class_name: 'Mdm::Loot',
             inverse_of: :vuln_attempt

  # @!attribute session
  #   The session opened by this attempt.
  #
  #   @return [Mdm::Session] if {#exploited} is `true`.
  #   @return [nil] if {#exploited} is `false`.
  belongs_to :session,
             class_name: 'Mdm::Session',
             inverse_of: :vuln_attempt

  # @!attribute vuln
  #   The {Mdm::Vuln vulnerability} that this attempt was exploiting.
  #
  #   @return [Mdm::Vuln]
  belongs_to :vuln,
             class_name: 'Mdm::Vuln',
             counter_cache: :vuln_attempt_count,
             inverse_of: :vuln_attempts

  #
  # Attributes
  #

  # @!attribute [rw] exploited
  #   Whether this attempt was successful.
  #
  #   @return [true] if {#vuln} was exploited.
  #   @return [false] if {#vuln} was not exploited.

  #
  # Validations
  #

  validates :vuln_id, :presence => true

  ActiveSupport.run_load_hooks(:mdm_vuln_attempt, self)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
metasploit_data_models-0.17.2-java app/models/mdm/vuln_attempt.rb
metasploit_data_models-0.17.2 app/models/mdm/vuln_attempt.rb
metasploit_data_models-0.17.2.pre.metasploit.pre.data.pre.models.pre.search app/models/mdm/vuln_attempt.rb
metasploit_data_models-0.17.1-java app/models/mdm/vuln_attempt.rb
metasploit_data_models-0.17.1 app/models/mdm/vuln_attempt.rb