Skip to content

Commit d58db72

Browse files
committed
Force unloading of already loaded plugins
1 parent fd1c5fb commit d58db72

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/msf/core/plugin_manager.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ def load(path, opts = {})
6868
Kernel.load(path + ".rb")
6969
end
7070

71+
# Force unloading if already loaded
72+
self.each do |plugin|
73+
if plugin.class == klass
74+
unload(plugin)
75+
end
76+
end
77+
7178
# Create an instance of the plugin and let it initialize
7279
instance = klass.create(framework, opts)
7380

0 commit comments

Comments
 (0)