remove `msf` folder requires

This commit is contained in:
dwelch-r7 2021-01-13 11:51:16 +00:00
parent d437a32374
commit d6896dadc0
14 changed files with 13 additions and 54 deletions

View File

@ -1,6 +1,5 @@
# -*- coding: binary -*-
require 'msf/windows_error'
module Msf
module Sessions

View File

@ -1,6 +1,5 @@
# -*- coding: binary -*-
require 'msf/windows_error'
module Msf
module Sessions

View File

@ -1,6 +1,5 @@
# -*- coding: binary -*-
require 'msf/windows_error'
module Msf
module Sessions

View File

@ -6,7 +6,6 @@ module Windows
module CliParse
require 'msf/windows_error'
require 'rex/logging'
require 'rex/exceptions'

View File

@ -8,6 +8,8 @@
#
###
require 'rex/peparsey'
module Msf::ReflectiveDLLLoader
# This is the ordinal of the reflective loader by default

View File

@ -1,7 +0,0 @@
# -*- coding: binary -*-
module Msf
module Ui
end
end
require 'rex/ui'

View File

@ -1,4 +1,7 @@
# -*- coding: binary -*-
require 'rex/ui'
module Msf
module Ui
module Console

View File

@ -1,29 +0,0 @@
# -*- coding: binary -*-
###
#
# framework-util
# --------------
#
# The util library miscellaneous routines that involve the framework
# API, but are not directly related to the core/base/ui structure.
#
###
require 'rex'
module Msf
module Util
end
end
# Executable generation and encoding
# Host helpers
# DBManager helpers
# Java deserialization payload generators
# .NET deserialization payload generators

View File

@ -7,6 +7,11 @@ require 'zeitwerk'
# 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

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/windows_error'
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking

4
msfd
View File

@ -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" ],

2
msfdb
View File

@ -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__))

View File

@ -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")
@ -248,4 +244,4 @@ if $PROGRAM_NAME == __FILE__
log: ws_log,
pid: ws_rpc_pid) if json_rpc
end
end
end

View File

@ -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'