Files
metasploit-gs/lib/msf/core/model/service.rb
T
Mike Smith d5d9d56081 Create a dedicated db table to track sessions & session events.
* Add new db tables for session & session_events
* Migrate existing session data from events db table
* Modify session report methods to log to the new tables


git-svn-id: file:///home/svn/framework3/trunk@12273 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-07 21:59:32 +00:00

30 lines
556 B
Ruby

module Msf
class DBManager
class Service < ActiveRecord::Base
include DBSave
has_many :vulns, :dependent => :destroy
has_many :notes, :dependent => :destroy
has_many :creds, :dependent => :destroy
has_many :exploited_hosts, :dependent => :destroy
has_many :web_sites, :dependent => :destroy
belongs_to :host
has_many :web_pages, :through => :web_sites
has_many :web_forms, :through => :web_sites
has_many :web_vulns, :through => :web_sites
serialize :info
def after_save
if info_changed?
host.normalize_os
end
end
end
end
end