Skip to content

Commit 07d0582

Browse files
author
Brent Cook
committed
Land rapid7#5688, remove msfcli
2 parents 93f154b + f59c99e commit 07d0582

File tree

7 files changed

+3
-1453
lines changed

7 files changed

+3
-1453
lines changed

lib/msf/core/modules/loader/base.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,21 +253,13 @@ def load_module(parent_path, type, module_reference_name, options={})
253253
# @return [Hash{String => Integer}] Maps module type to number of
254254
# modules loaded
255255
def load_modules(path, options={})
256-
options.assert_valid_keys(:force, :whitelist)
256+
options.assert_valid_keys(:force)
257257

258258
force = options[:force]
259259
count_by_type = {}
260260
recalculate_by_type = {}
261261

262-
# This is used to avoid loading the same thing twice
263-
loaded_items = []
264-
265262
each_module_reference_name(path, options) do |parent_path, type, module_reference_name|
266-
# In msfcli mode, if a module is already loaded, avoid loading it again
267-
next if loaded_items.include?(module_reference_name) and options[:whitelist]
268-
269-
# Keep track of loaded modules in msfcli mode
270-
loaded_items << module_reference_name if options[:whitelist]
271263
load_module(
272264
parent_path,
273265
type,

lib/msf/core/modules/loader/directory.rb

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,7 @@ def each_module_reference_name(path, opts={})
5656
# The module_reference_name doesn't have a file extension
5757
module_reference_name = module_reference_name_from_path(relative_entry_descendant_path)
5858

59-
# If the modules argument is set, this means we only want to load specific ones instead
60-
# of loading everything to memory - see msfcli.
61-
if whitelist.empty?
62-
# Load every module we see, which is the default behavior.
63-
yield path, type, module_reference_name
64-
else
65-
whitelist.each do |pattern|
66-
# We have to use entry_descendant_path to see if this is the module we want, because
67-
# this is easier to identify the module type just by looking at the file path.
68-
# For example, if module_reference_name is used (or a parsed relative path), you can't
69-
# really tell if php/generic is a NOP module, a payload, or an encoder.
70-
if entry_descendant_path =~ pattern
71-
yield path, type, module_reference_name
72-
else
73-
next
74-
end
75-
end
76-
end
59+
yield path, type, module_reference_name
7760
end
7861
end
7962
end

metasploit-framework.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Gem::Specification.new do |spec|
3030
spec.bindir = '.'
3131
spec.executables = [
3232
'msfbinscan',
33-
'msfcli',
3433
'msfconsole',
3534
'msfd',
3635
'msfelfscan',

modules/auxiliary/scanner/http/cert.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ def initialize
2121
This module will check the certificate of the specified web servers
2222
to ensure the subject and issuer match the supplied pattern and that the certificate
2323
is not expired.
24-
25-
Note: Be sure to check your expression if using msfcli, shells tend to not like certain
26-
things and will strip/interpret them (= is a perfect example). It is better to use in
27-
console.
2824
}
2925
)
3026

0 commit comments

Comments
 (0)