Closed martinsamm-payroc closed 6 months ago
Thanks for raising an issue @martinsamm-payroc maybe I can convince you to open up a PR next 😄 I think if you apply this patch it should unblock you in the meantime while we get a PR sorted
diff --git a/lib/msf/core/module_set.rb b/lib/msf/core/module_set.rb
index 969b6560bc..0ad93de8eb 100644
--- a/lib/msf/core/module_set.rb
+++ b/lib/msf/core/module_set.rb
@@ -229,7 +229,10 @@ class Msf::ModuleSet < Hash
# Custom filtering
next if (each_module_filter(opts, name, entry) == true)
- block.call(name, self[name])
+ mod = self[name]
+ next if mod.nil?
+
+ block.call(name, mod)
end
end
Steps to reproduce
How'd you do it?
This section should also tell us any relevant information about the environment; for example, if an exploit that used to work is failing, tell us the victim operating system and service versions.
Were you following a specific guide/tutorial or reading documentation?
Yes: https://medium.com/@habibsemouma/setting-up-metasploitable2-and-kali-in-docker-for-pentesting-6b71a089c4a2 https://jonathansblog.co.uk/metasploit-for-website-pentest
Expected behavior
I would expect no stack trace/error and a bunch of modules to available.
Current behavior
See above - i get barely any modules and a stack/error on module refresh.
Metasploit version
Framework: 6.3.60-dev Console : 6.3.60-dev
Additional Information
If your version is less than
5.0.96
, please update to the latest version and ensure your issue is still present.If the issue is encountered within
msfconsole
, please run thedebug
command using the instructions below. If the issue is encountered outisdemsfconsole
, or the issue causesmsfconsole
to crash on startup, please delete this section.msfconsole
set loglevel 3
debug
command`===8<===