Skip to content

Commit

Permalink
remove msf folder requires
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelch-r7 committed Jan 18, 2021
1 parent d437a32 commit d6896da
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 54 deletions.
1 change: 0 additions & 1 deletion lib/msf/base/sessions/meterpreter_python.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: binary -*-

require 'msf/windows_error'

module Msf
module Sessions
Expand Down
1 change: 0 additions & 1 deletion lib/msf/base/sessions/meterpreter_x64_win.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: binary -*-

require 'msf/windows_error'

module Msf
module Sessions
Expand Down
1 change: 0 additions & 1 deletion lib/msf/base/sessions/meterpreter_x86_win.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: binary -*-

require 'msf/windows_error'

module Msf
module Sessions
Expand Down
1 change: 0 additions & 1 deletion lib/msf/core/post/windows/cli_parse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module Windows

module CliParse

require 'msf/windows_error'
require 'rex/logging'
require 'rex/exceptions'

Expand Down
2 changes: 2 additions & 0 deletions lib/msf/core/reflective_dll_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#
###

require 'rex/peparsey'

module Msf::ReflectiveDLLLoader

# This is the ordinal of the reflective loader by default
Expand Down
7 changes: 0 additions & 7 deletions lib/msf/ui.rb

This file was deleted.

3 changes: 3 additions & 0 deletions lib/msf/ui/console/command_dispatcher.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# -*- coding: binary -*-

require 'rex/ui'

module Msf
module Ui
module Console
Expand Down
29 changes: 0 additions & 29 deletions lib/msf/util.rb

This file was deleted.

5 changes: 5 additions & 0 deletions lib/msf_autoload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
# Correct namespacing to remove the custom inflector (or reduce it's complexity)
# Correct namespacing to cut down on inflector overrides
# Make the necessary changes to reduce/remove the ignored/collapsed files and folders
#
# I don't know why these are needed in `lib/msf/util/dot_net_deserialization/types.rb`
# require 'msf/util/dot_net_deserialization/types/primitives'
# require 'msf/util/dot_net_deserialization/types/general'
# require 'msf/util/dot_net_deserialization/types/record_values'
###

class TempInflector < Zeitwerk::Inflector
Expand Down
1 change: 0 additions & 1 deletion modules/exploits/windows/smb/ms10_061_spoolss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/windows_error'

class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
Expand Down
4 changes: 1 addition & 3 deletions msfd
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ require 'msfenv'

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

require 'msf/base'
require 'msf/ui'

require 'rex/parser/arguments'
# Declare the argument parser for msfd
arguments = Rex::Parser::Arguments.new(
"-a" => [ true, "Bind to this IP address instead of loopback" ],
Expand Down
2 changes: 0 additions & 2 deletions msfdb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ end
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib')))
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']

require 'msf/base/config'
require 'msf/util/helper'

@script_name = File.basename(__FILE__)
@framework = File.expand_path(File.dirname(__FILE__))
Expand Down
8 changes: 2 additions & 6 deletions msfrpcd
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,7 @@ if $PROGRAM_NAME == __FILE__

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

require 'msf/base'
require 'msf/ui'
require 'msf/util/service_helper'
require 'msf/base/config'
require 'rex/parser/arguments'
require 'rex/parser/arguments'

ws_ssl_key_default = File.join(Msf::Config.get_config_root, "#{WS_TAG}-key.pem")
ws_ssl_cert_default = File.join(Msf::Config.get_config_root, "#{WS_TAG}-cert.pem")
Expand Down Expand Up @@ -248,4 +244,4 @@ if $PROGRAM_NAME == __FILE__
log: ws_log,
pid: ws_rpc_pid) if json_rpc
end
end
end
2 changes: 0 additions & 2 deletions msfvenom
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ def require_deps
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']

require 'rex'
require 'msf/ui'
require 'msf/base'
require 'msf/core/payload_generator'
require 'msf/core/constants'

Expand Down

0 comments on commit d6896da

Please sign in to comment.