Skip to content

Commit d6896da

Browse files
committed
remove msf folder requires
1 parent d437a32 commit d6896da

File tree

14 files changed

+13
-54
lines changed

14 files changed

+13
-54
lines changed

lib/msf/base/sessions/meterpreter_python.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: binary -*-
22

3-
require 'msf/windows_error'
43

54
module Msf
65
module Sessions

lib/msf/base/sessions/meterpreter_x64_win.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: binary -*-
22

3-
require 'msf/windows_error'
43

54
module Msf
65
module Sessions

lib/msf/base/sessions/meterpreter_x86_win.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: binary -*-
22

3-
require 'msf/windows_error'
43

54
module Msf
65
module Sessions

lib/msf/core/post/windows/cli_parse.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ module Windows
66

77
module CliParse
88

9-
require 'msf/windows_error'
109
require 'rex/logging'
1110
require 'rex/exceptions'
1211

lib/msf/core/reflective_dll_loader.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#
99
###
1010

11+
require 'rex/peparsey'
12+
1113
module Msf::ReflectiveDLLLoader
1214

1315
# This is the ordinal of the reflective loader by default

lib/msf/ui.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

lib/msf/ui/console/command_dispatcher.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# -*- coding: binary -*-
2+
3+
require 'rex/ui'
4+
25
module Msf
36
module Ui
47
module Console

lib/msf/util.rb

Lines changed: 0 additions & 29 deletions
This file was deleted.

lib/msf_autoload.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
# Correct namespacing to remove the custom inflector (or reduce it's complexity)
88
# Correct namespacing to cut down on inflector overrides
99
# Make the necessary changes to reduce/remove the ignored/collapsed files and folders
10+
#
11+
# I don't know why these are needed in `lib/msf/util/dot_net_deserialization/types.rb`
12+
# require 'msf/util/dot_net_deserialization/types/primitives'
13+
# require 'msf/util/dot_net_deserialization/types/general'
14+
# require 'msf/util/dot_net_deserialization/types/record_values'
1015
###
1116

1217
class TempInflector < Zeitwerk::Inflector

modules/exploits/windows/smb/ms10_061_spoolss.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Current source: https://github.com/rapid7/metasploit-framework
44
##
55

6-
require 'msf/windows_error'
76

87
class MetasploitModule < Msf::Exploit::Remote
98
Rank = ExcellentRanking

msfd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ require 'msfenv'
2121

2222
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
2323

24-
require 'msf/base'
25-
require 'msf/ui'
26-
24+
require 'rex/parser/arguments'
2725
# Declare the argument parser for msfd
2826
arguments = Rex::Parser::Arguments.new(
2927
"-a" => [ true, "Bind to this IP address instead of loopback" ],

msfdb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ end
2323
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib')))
2424
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
2525

26-
require 'msf/base/config'
27-
require 'msf/util/helper'
2826

2927
@script_name = File.basename(__FILE__)
3028
@framework = File.expand_path(File.dirname(__FILE__))

msfrpcd

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,7 @@ if $PROGRAM_NAME == __FILE__
120120

121121
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
122122

123-
require 'msf/base'
124-
require 'msf/ui'
125-
require 'msf/util/service_helper'
126-
require 'msf/base/config'
127-
require 'rex/parser/arguments'
123+
require 'rex/parser/arguments'
128124

129125
ws_ssl_key_default = File.join(Msf::Config.get_config_root, "#{WS_TAG}-key.pem")
130126
ws_ssl_cert_default = File.join(Msf::Config.get_config_root, "#{WS_TAG}-cert.pem")
@@ -248,4 +244,4 @@ if $PROGRAM_NAME == __FILE__
248244
log: ws_log,
249245
pid: ws_rpc_pid) if json_rpc
250246
end
251-
end
247+
end

msfvenom

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ def require_deps
2929
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
3030

3131
require 'rex'
32-
require 'msf/ui'
33-
require 'msf/base'
3432
require 'msf/core/payload_generator'
3533
require 'msf/core/constants'
3634

0 commit comments

Comments
 (0)