forked from rapid7/metasploit-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathframework.rb
51 lines (45 loc) · 1.21 KB
/
framework.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
# 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'
require 'metasploit/credential'
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'
require 'zip'
require 'msf'
#
# Project
#
# Top-level namespace that is shared between {Metasploit::Framework
# metasploit-framework} and pro, which uses Metasploit::Pro.
module Metasploit
# 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
extend ActiveSupport::Autoload
autoload :Spec
autoload :ThreadFactoryProvider
# 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
@root
end
end
end