Sha256: ffe96cac1ba738603f2f57533a316d4679d6c7e1f246ff39481bda94d615f167
Contents?: true
Size: 933 Bytes
Versions: 2
Compression:
Stored size: 933 Bytes
Contents
class MetasploitDataModels::AutomaticExploitation::MatchResult < ActiveRecord::Base # Running associated exploit did NOT create a session FAILED = "failed" # Running associated exploit created a session SUCCEEDED = "succeeded" VALID_STATES = [FAILED, SUCCEEDED] # # ASSOCIATIONS # belongs_to :match, class_name: 'MetasploitDataModels::AutomaticExploitation::Match', inverse_of: :match_results, dependent: :destroy belongs_to :run, inverse_of: :match_results, class_name: 'MetasploitDataModels::AutomaticExploitation::Run' # # VALIDATIONS # # must be present and one of allowable values validates :state, presence: true, inclusion: VALID_STATES # # SCOPES # scope :succeeded, lambda { where(state:"succeeded") } scope :failed, lambda { where(state:"failed") } Metasploit::Concern.run(self) end
Version data entries
2 entries across 2 versions & 1 rubygems