CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/metasploit/framework.rb
Views: 11766
1
#
2
# Gems
3
#
4
# gems must load explicitly any gem declared in gemspec
5
# @see https://github.com/bundler/bundler/issues/2018#issuecomment-6819359
6
#
7
8
require 'active_support'
9
require 'bcrypt'
10
require 'json'
11
require 'msgpack'
12
require 'metasploit/credential'
13
require 'nokogiri'
14
# railties has not autorequire defined
15
# rkelly-remix is a fork of rkelly, so it's autorequire is 'rkelly' and not 'rkelly-remix'
16
require 'rkelly'
17
require 'robots'
18
require 'zip'
19
require 'msf'
20
#
21
# Project
22
#
23
24
25
# Top-level namespace that is shared between {Metasploit::Framework
26
# metasploit-framework} and pro, which uses Metasploit::Pro.
27
module Metasploit
28
# Supports Rails and Rails::Engine like access to metasploit-framework so it
29
# works in compatible manner with activerecord's rake tasks and other
30
# railties.
31
module Framework
32
extend ActiveSupport::Autoload
33
34
autoload :Spec
35
autoload :ThreadFactoryProvider
36
37
# Returns the root of the metasploit-framework project. Use in place of
38
# `Rails.root`.
39
#
40
# @return [Pathname]
41
def self.root
42
unless instance_variable_defined? :@root
43
pathname = Pathname.new(__FILE__)
44
@root = pathname.parent.parent.parent
45
end
46
47
@root
48
end
49
end
50
end
51
52