Files
metasploit-gs/lib/msf/core/model/host.rb
T
Tod Beardsley 1db9d8eb01 Fixes #2444. Adds an ExploitedHost table, adds the db_exploited command, adds the report_exploit() function.
Tested with meterpreter, shell, and clientside exploit sessions. 


git-svn-id: file:///home/svn/framework3/trunk@10130 4d416f70-5f16-0410-b530-b9f4589650da
2010-08-24 21:57:04 +00:00

24 lines
628 B
Ruby

module Msf
class DBManager
class Host < ActiveRecord::Base
include DBSave
belongs_to :workspace
has_many :services, :dependent => :destroy
has_many :clients, :dependent => :destroy
has_many :vulns, :dependent => :destroy
has_many :notes, :dependent => :destroy
has_many :loots, :dependent => :destroy, :order => "loots.created_at desc"
has_many :service_notes, :through => :services
has_many :creds, :through => :services
has_many :exploited_hosts, :dependent => :destroy
validates_exclusion_of :address, :in => ['127.0.0.1']
validates_uniqueness_of :address, :scope => :workspace_id
end
end
end