2014-06-02 17:27:15 +00:00
|
|
|
#
|
|
|
|
# Gems
|
|
|
|
#
|
|
|
|
# gems must load explicitly any gem declared in gemspec
|
|
|
|
# @see https://github.com/bundler/bundler/issues/2018#issuecomment-6819359
|
|
|
|
#
|
|
|
|
|
|
|
|
require 'active_support'
|
|
|
|
require 'bcrypt'
|
|
|
|
require 'json'
|
|
|
|
require 'msgpack'
|
2016-01-07 21:49:49 +00:00
|
|
|
require 'metasploit/credential'
|
2014-06-02 17:27:15 +00:00
|
|
|
require 'nokogiri'
|
|
|
|
require 'packetfu'
|
|
|
|
# railties has not autorequire defined
|
|
|
|
# rkelly-remix is a fork of rkelly, so it's autorequire is 'rkelly' and not 'rkelly-remix'
|
|
|
|
require 'rkelly'
|
|
|
|
require 'robots'
|
2014-06-10 18:41:42 +00:00
|
|
|
require 'zip'
|
2014-06-02 17:27:15 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Project
|
|
|
|
#
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
2013-03-18 16:01:45 +00:00
|
|
|
# Top-level namespace that is shared between {Metasploit::Framework
|
|
|
|
# metasploit-framework} and pro, which uses Metasploit::Pro.
|
|
|
|
module Metasploit
|
2013-08-30 21:28:33 +00:00
|
|
|
# Supports Rails and Rails::Engine like access to metasploit-framework so it
|
|
|
|
# works in compatible manner with activerecord's rake tasks and other
|
|
|
|
# railties.
|
|
|
|
module Framework
|
2014-11-05 20:38:43 +00:00
|
|
|
extend ActiveSupport::Autoload
|
|
|
|
|
|
|
|
autoload :Spec
|
2014-11-13 20:08:26 +00:00
|
|
|
autoload :ThreadFactoryProvider
|
2014-11-05 20:38:43 +00:00
|
|
|
|
2013-08-30 21:28:33 +00:00
|
|
|
# Returns the root of the metasploit-framework project. Use in place of
|
|
|
|
# `Rails.root`.
|
|
|
|
#
|
|
|
|
# @return [Pathname]
|
|
|
|
def self.root
|
|
|
|
unless instance_variable_defined? :@root
|
|
|
|
pathname = Pathname.new(__FILE__)
|
|
|
|
@root = pathname.parent.parent.parent
|
|
|
|
end
|
2013-03-18 16:01:45 +00:00
|
|
|
|
2013-08-30 21:28:33 +00:00
|
|
|
@root
|
|
|
|
end
|
|
|
|
end
|
2014-07-28 23:49:44 +00:00
|
|
|
end
|