Adds the imported_creds table.

git-svn-id: file:///home/svn/framework3/trunk@10923 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Tod Beardsley 2010-11-06 01:01:20 +00:00
parent 0b565d8619
commit f6415186a8
4 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,17 @@
class AddImportedCreds < ActiveRecord::Migration
def self.up
create_table :imported_creds do |t|
t.integer :workspace_id, :null => false, :default => 1
t.string :user, :limit => 512
t.string :pass, :limit => 512
t.string :ptype, :limit => 16, :default => "password"
end
end
def self.down
drop_table :imported_creds
end
end

View File

@ -33,3 +33,5 @@ require 'msf/core/model/web_page'
require 'msf/core/model/web_form' require 'msf/core/model/web_form'
require 'msf/core/model/web_vuln' require 'msf/core/model/web_vuln'
require 'msf/core/model/imported_cred'

View File

@ -0,0 +1,12 @@
module Msf
class DBManager
class ImportedCred < ActiveRecord::Base
include DBSave
belongs_to :workspace
end
end
end

View File

@ -17,6 +17,7 @@ class Workspace < ActiveRecord::Base
has_many :clients, :through => :hosts has_many :clients, :through => :hosts
has_many :vulns, :through => :hosts has_many :vulns, :through => :hosts
has_many :creds, :dependent => :destroy has_many :creds, :dependent => :destroy
has_many :imported_creds, :dependent => :destroy
has_many :exploited_hosts, :through => :hosts has_many :exploited_hosts, :through => :hosts