From 1296696aea0531ceec79c722cad1937c6775d9dd Mon Sep 17 00:00:00 2001 From: David Maloney Date: Thu, 12 Feb 2015 16:33:37 -0600 Subject: [PATCH 1/3] get latests MDM for unique services pull in the latest MDM to get the uniqueness validation for Service objects MSP-11643 --- metasploit-framework-db.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metasploit-framework-db.gemspec b/metasploit-framework-db.gemspec index cf7ea20134..f0a17e730b 100644 --- a/metasploit-framework-db.gemspec +++ b/metasploit-framework-db.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| # Metasploit::Credential database models spec.add_runtime_dependency 'metasploit-credential', '~> 0.13.19' # Database models shared between framework and Pro. - spec.add_runtime_dependency 'metasploit_data_models', '~> 0.22.8' + spec.add_runtime_dependency 'metasploit_data_models', '~> 0.23.0' # depend on metasploit-framewrok as the optional gems are useless with the actual code spec.add_runtime_dependency 'metasploit-framework', "= #{spec.version}" # Needed for module caching in Mdm::ModuleDetails From a0787f5bb90fb26a9896fd5964c389a68919c90c Mon Sep 17 00:00:00 2001 From: David Maloney Date: Thu, 12 Feb 2015 16:36:45 -0600 Subject: [PATCH 2/3] bump credential version too --- metasploit-framework-db.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metasploit-framework-db.gemspec b/metasploit-framework-db.gemspec index f0a17e730b..d6647b2356 100644 --- a/metasploit-framework-db.gemspec +++ b/metasploit-framework-db.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'activerecord', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION # Metasploit::Credential database models - spec.add_runtime_dependency 'metasploit-credential', '~> 0.13.19' + spec.add_runtime_dependency 'metasploit-credential', '~> 0.14.0' # Database models shared between framework and Pro. spec.add_runtime_dependency 'metasploit_data_models', '~> 0.23.0' # depend on metasploit-framewrok as the optional gems are useless with the actual code From 62fbf81f8a3ee1d36fb7bd4f240ab2c056699e54 Mon Sep 17 00:00:00 2001 From: Trevor Rosen Date: Wed, 18 Feb 2015 15:17:17 -0600 Subject: [PATCH 3/3] Update Gemfile.lock and schema.rb --- Gemfile.lock | 10 +++++----- db/schema.rb | 9 +++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index be8dd91aa2..047c3ab1d4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,9 +22,9 @@ PATH tzinfo metasploit-framework-db (4.11.0.pre.dev) activerecord (>= 3.2.21, < 4.0.0) - metasploit-credential (~> 0.13.19) + metasploit-credential (~> 0.14.0) metasploit-framework (= 4.11.0.pre.dev) - metasploit_data_models (~> 0.22.8) + metasploit_data_models (~> 0.23.0) pg (>= 0.11) metasploit-framework-pcap (4.11.0.pre.dev) metasploit-framework (= 4.11.0.pre.dev) @@ -112,10 +112,10 @@ GEM metasploit-concern (0.3.0) activesupport (~> 3.0, >= 3.0.0) railties (< 4.0.0) - metasploit-credential (0.13.19) + metasploit-credential (0.14.0) metasploit-concern (~> 0.3.0) metasploit-model (~> 0.29.0) - metasploit_data_models (~> 0.22.8) + metasploit_data_models (~> 0.23.0) pg railties (< 4.0.0) rubyntlm @@ -123,7 +123,7 @@ GEM metasploit-model (0.29.0) activesupport railties (< 4.0.0) - metasploit_data_models (0.22.8) + metasploit_data_models (0.23.0) activerecord (>= 3.2.13, < 4.0.0) activesupport arel-helpers diff --git a/db/schema.rb b/db/schema.rb index 057c061e40..1a564bc233 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150205192745) do +ActiveRecord::Schema.define(:version => 20150212214222) do create_table "api_keys", :force => true do |t| t.text "token" @@ -102,7 +102,7 @@ ActiveRecord::Schema.define(:version => 20150205192745) do create_table "hosts", :force => true do |t| t.datetime "created_at" - t.string "address", :limit => nil, :null => false + t.string "address", :null => false t.string "mac" t.string "comm" t.string "name" @@ -454,6 +454,7 @@ ActiveRecord::Schema.define(:version => 20150205192745) do t.text "info" end + add_index "services", ["host_id", "port", "proto"], :name => "index_services_on_host_id_and_port_and_proto", :unique => true add_index "services", ["name"], :name => "index_services_on_name" add_index "services", ["port"], :name => "index_services_on_port" add_index "services", ["proto"], :name => "index_services_on_proto" @@ -685,7 +686,7 @@ ActiveRecord::Schema.define(:version => 20150205192745) do create_table "wmap_requests", :force => true do |t| t.string "host" - t.string "address", :limit => nil + t.string "address" t.integer "port" t.integer "ssl" t.string "meth", :limit => 32 @@ -702,7 +703,7 @@ ActiveRecord::Schema.define(:version => 20150205192745) do create_table "wmap_targets", :force => true do |t| t.string "host" - t.string "address", :limit => nil + t.string "address" t.integer "port" t.integer "ssl" t.integer "selected"