Skip to content

Commit 9386d1c

Browse files
author
Brent Cook
committed
remove unused mod_ranked attribute
1 parent 7b7f40b commit 9386d1c

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

lib/msf/core/module_set.rb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,7 @@ def each_module_filter(opts, name, entry)
114114
def each_module_ranked(opts = {}, &block)
115115
demand_load_modules
116116

117-
self.mod_ranked = rank_modules
118-
119-
each_module_list(mod_ranked, opts, &block)
117+
each_module_list(rank_modules, opts, &block)
120118
end
121119

122120
# Forces all modules in this set to be loaded.
@@ -140,7 +138,6 @@ def initialize(type = nil)
140138
self.architectures_by_module = {}
141139
self.platforms_by_module = {}
142140
self.mod_sorted = nil
143-
self.mod_ranked = nil
144141
self.mod_extensions = []
145142

146143
#
@@ -294,11 +291,6 @@ def each_module_list(ary, opts, &block)
294291
#
295292
# @return [Hash{Class => Array<String>}] Maps module class to Array of platform Strings.
296293
attr_accessor :platforms_by_module
297-
# @!attribute [rw] mod_ranked
298-
# Array of module names and module classes ordered by their Rank with the higher Ranks first.
299-
#
300-
# @return (see #rank_modules)
301-
attr_accessor :mod_ranked
302294
# @!attribute [rw] mod_sorted
303295
# Array of module names and module classes ordered by their names.
304296
#
@@ -317,7 +309,7 @@ def each_module_list(ary, opts, &block)
317309
# @return [Array<Array<String, Class>>] Array of arrays where the inner array is a pair of the module reference name
318310
# and the module class.
319311
def rank_modules
320-
self.mod_ranked = self.sort_by { |pair| module_rank(*pair) }.reverse!
312+
self.sort_by { |pair| module_rank(*pair) }.reverse!
321313
end
322314

323315
# Retrieves the rank from a loaded, not-yet-loaded, or unloadable Metasploit Module.

0 commit comments

Comments
 (0)