msfconsole with bundle install --without db

MSP-10905
bug/bundler_fix
Luke Imhoff 2014-07-29 14:46:44 -05:00
parent 38da44c26b
commit f5ff22eba4
No known key found for this signature in database
GPG Key ID: 5B1FB01FB33356F8
3 changed files with 25 additions and 8 deletions

View File

@ -1,4 +1,3 @@
require 'metasploit/credential/creation'
# -*- coding: binary -*-
module Msf
@ -9,8 +8,18 @@ module Msf
###
module Auxiliary::Report
begin
require 'metasploit/credential/creation'
rescue LoadError
warn "metasploit-credential not in the bundle, so Metasploit::Credential creation will fail for Msf::Auxiliary::Report."
warn "Bundle installed '--without #{Bundler.settings.without.join(' ')}'"
warn "To clear the without option do `bundle install --without ''` " \
"(the --without flag with an empty string) or " \
"`rm -rf .bundle` to remove the .bundle/config manually and " \
"then `bundle install`"
else
include Metasploit::Credential::Creation
end
# This method overrides the method from Metasploit::Credential to check for an active db
def active_db?

View File

@ -56,7 +56,6 @@ require 'rex/parser/retina_xml'
#
require 'msf/core/db_manager/import_msf_xml'
require 'metasploit/credential/creation'
module Msf
@ -157,7 +156,19 @@ end
###
class DBManager
include Msf::DBManager::ImportMsfXml
begin
require 'metasploit/credential/creation'
rescue LoadError
warn "metasploit-credential not in the bundle, so Metasploit::Credential creation will fail for Msf::DBManager"
warn "Bundle installed '--without #{Bundler.settings.without.join(' ')}'"
warn "To clear the without option do `bundle install --without ''` " \
"(the --without flag with an empty string) or " \
"`rm -rf .bundle` to remove the .bundle/config manually and " \
"then `bundle install`"
else
include Metasploit::Credential::Creation
end
def rfc3330_reserved(ip)
case ip.class.to_s

View File

@ -1,5 +1,3 @@
require 'metasploit/credential/creation'
module Msf
class DBManager
# Handles importing of the xml format exported by Pro. The methods are in a
@ -8,7 +6,6 @@ module Msf
# methods defined in a class cannot be overridden by including a module
# (unless you're running Ruby 2.0 and can use prepend)
module ImportMsfXml
include Metasploit::Credential::Creation
#
# CONSTANTS
#