Sha256: cfb748ef9727beec0a00f3c9cac89762f5074a902865e1c18822ef950111d6f5

Contents?: true

Size: 1.16 KB

Versions: 2

Compression:

Stored size: 1.16 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

  Metasploit::Concern.run(self)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
metasploit_data_models-1.0.0.pre.rails.pre.4.0b app/models/mdm/vuln_attempt.rb
metasploit_data_models-1.0.0.pre.rails.pre.4.0a app/models/mdm/vuln_attempt.rb