Lands #3943, changes to engine require
commit
f2fc0d88ef
6
Gemfile
6
Gemfile
|
@ -8,9 +8,9 @@ group :db do
|
|||
gem 'activerecord', '>= 3.0.0', '< 4.0.0'
|
||||
|
||||
# Metasploit::Credential database models
|
||||
gem 'metasploit-credential', '~> 0.10.1'
|
||||
gem 'metasploit-credential', '~> 0.12.0'
|
||||
# Database models shared between framework and Pro.
|
||||
gem 'metasploit_data_models', '~> 0.20.1'
|
||||
gem 'metasploit_data_models', '~> 0.21.0'
|
||||
# Needed for module caching in Mdm::ModuleDetails
|
||||
gem 'pg', '>= 0.11'
|
||||
end
|
||||
|
@ -39,7 +39,7 @@ group :development, :test do
|
|||
gem 'rspec', '>= 2.12', '< 3.0.0'
|
||||
# Define `rake spec`. Must be in development AND test so that its available by default as a rake test when the
|
||||
# environment is development
|
||||
gem 'rspec-rails' , '>= 2.12', '< 3.0.0'
|
||||
gem 'rspec-rails' , '>= 2.12', '< 3.0.0'
|
||||
end
|
||||
|
||||
group :pcap do
|
||||
|
|
28
Gemfile.lock
28
Gemfile.lock
|
@ -7,8 +7,8 @@ PATH
|
|||
bcrypt
|
||||
jsobfu (~> 0.2.0)
|
||||
json
|
||||
metasploit-concern (~> 0.2.1)
|
||||
metasploit-model (~> 0.27.1)
|
||||
metasploit-concern (~> 0.3.0)
|
||||
metasploit-model (~> 0.28.0)
|
||||
meterpreter_bins (= 0.0.7)
|
||||
msgpack
|
||||
nokogiri
|
||||
|
@ -91,32 +91,32 @@ GEM
|
|||
hike (1.2.3)
|
||||
i18n (0.6.11)
|
||||
journey (1.0.4)
|
||||
jsobfu (0.2.0)
|
||||
jsobfu (0.2.1)
|
||||
rkelly-remix (= 0.0.6)
|
||||
json (1.8.1)
|
||||
mail (2.5.4)
|
||||
mime-types (~> 1.16)
|
||||
treetop (~> 1.4.8)
|
||||
metasploit-concern (0.2.1)
|
||||
metasploit-concern (0.3.0)
|
||||
activesupport (~> 3.0, >= 3.0.0)
|
||||
railties (< 4.0.0)
|
||||
metasploit-credential (0.10.1)
|
||||
metasploit-concern (~> 0.2.1)
|
||||
metasploit-model (~> 0.27.0)
|
||||
metasploit_data_models (~> 0.20.0)
|
||||
metasploit-credential (0.12.0)
|
||||
metasploit-concern (~> 0.3.0)
|
||||
metasploit-model (~> 0.28.0)
|
||||
metasploit_data_models (~> 0.21.0)
|
||||
pg
|
||||
railties (< 4.0.0)
|
||||
rubyntlm
|
||||
rubyzip (~> 1.1)
|
||||
metasploit-model (0.27.1)
|
||||
metasploit-model (0.28.0)
|
||||
activesupport
|
||||
railties (< 4.0.0)
|
||||
metasploit_data_models (0.20.1)
|
||||
metasploit_data_models (0.21.0)
|
||||
activerecord (>= 3.2.13, < 4.0.0)
|
||||
activesupport
|
||||
arel-helpers
|
||||
metasploit-concern (~> 0.2.1)
|
||||
metasploit-model (~> 0.27.0)
|
||||
metasploit-concern (~> 0.3.0)
|
||||
metasploit-model (~> 0.28.0)
|
||||
pg
|
||||
railties (< 4.0.0)
|
||||
meterpreter_bins (0.0.7)
|
||||
|
@ -218,9 +218,9 @@ DEPENDENCIES
|
|||
factory_girl (>= 4.1.0)
|
||||
factory_girl_rails
|
||||
fivemat (= 1.2.1)
|
||||
metasploit-credential (~> 0.10.1)
|
||||
metasploit-credential (~> 0.12.0)
|
||||
metasploit-framework!
|
||||
metasploit_data_models (~> 0.20.1)
|
||||
metasploit_data_models (~> 0.21.0)
|
||||
network_interface (~> 0.0.1)
|
||||
pcaprub
|
||||
pg (>= 0.11)
|
||||
|
|
|
@ -4,6 +4,14 @@
|
|||
|
||||
require 'fileutils'
|
||||
|
||||
#
|
||||
# Metasploit gem engines
|
||||
#
|
||||
|
||||
require 'metasploit/model/engine'
|
||||
require 'metasploit/concern/engine'
|
||||
Metasploit::Framework::Require.optionally_require_metasploit_db_gem_engines
|
||||
|
||||
# `Rails::Engine` behavior common to both {Metasploit::Framework::Application} and {Metasploit::Framework::Engine}.
|
||||
module Metasploit::Framework::CommonEngine
|
||||
extend ActiveSupport::Concern
|
||||
|
@ -73,4 +81,4 @@ module Metasploit::Framework::CommonEngine
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -72,6 +72,23 @@ module Metasploit
|
|||
end
|
||||
end
|
||||
|
||||
# Tries to require gems necessary for using a database with the framework.
|
||||
#
|
||||
# @example
|
||||
# Metasploit::Framework::Require.optionally_require_metasploit_db_gems
|
||||
#
|
||||
# @return [void]
|
||||
def self.optionally_require_metasploit_db_gem_engines
|
||||
optionally(
|
||||
'metasploit/credential/engine',
|
||||
'metasploit-credential not in the bundle',
|
||||
)
|
||||
optionally(
|
||||
'metasploit_data_models/engine',
|
||||
'metaspoit_data_models not in the bundle'
|
||||
)
|
||||
end
|
||||
|
||||
#
|
||||
# Instance Methods
|
||||
#
|
||||
|
|
|
@ -60,10 +60,10 @@ Gem::Specification.new do |spec|
|
|||
# Needed for some admin modules (scrutinizer_add_user.rb)
|
||||
spec.add_runtime_dependency 'json'
|
||||
# Metasploit::Concern hooks
|
||||
spec.add_runtime_dependency 'metasploit-concern', '~> 0.2.1'
|
||||
spec.add_runtime_dependency 'metasploit-concern', '~> 0.3.0'
|
||||
# Things that would normally be part of the database model, but which
|
||||
# are needed when there's no database
|
||||
spec.add_runtime_dependency 'metasploit-model', '~> 0.27.1'
|
||||
spec.add_runtime_dependency 'metasploit-model', '~> 0.28.0'
|
||||
# Needed for Meterpreter on Windows, soon others.
|
||||
spec.add_runtime_dependency 'meterpreter_bins', '0.0.7'
|
||||
# Needed by msfgui and other rpc components
|
||||
|
|
Loading…
Reference in New Issue