Files
metasploit-gs/lib/msf/core/model/host.rb
T
Tod Beardsley e3355656ee Don't record 127.0.0.1 in the database as a host.
If you really want to record localhost, call it 127.0.0.2 or something.



git-svn-id: file:///home/svn/framework3/trunk@8856 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-20 14:38:50 +00:00

21 lines
453 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 :service_notes, :through => :services
validates_exclusion_of :address, :in => ['127.0.0.1']
validates_uniqueness_of :address, :scope => :workspace_id
end
end
end