Only recalculate sometimes
Recalculations are time consuming, so only do it if necessary.
This commit is contained in:
parent
ff7b017e14
commit
df04435d49
|
@ -41,9 +41,9 @@ class Msf::ModuleSet < Hash
|
|||
# If there is no module associated with this class, then try to demand
|
||||
# load it.
|
||||
if klass.nil? or klass == Msf::SymbolicModule
|
||||
framework.modules.load_cached_module(module_type, reference_name)
|
||||
|
||||
recalculate
|
||||
if framework.modules.load_cached_module(module_type, reference_name) || empty?
|
||||
recalculate
|
||||
end
|
||||
|
||||
klass = fetch(reference_name, nil)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue