From d9ba993d255e8cf76aa573c23b4313fc7c822fae Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sun, 9 Apr 2017 11:50:03 -0500 Subject: [PATCH] handle general failure getting module info for external modules --- lib/msf/core/modules/loader/executable.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/msf/core/modules/loader/executable.rb b/lib/msf/core/modules/loader/executable.rb index 92326e94e1..6ee064d8f8 100644 --- a/lib/msf/core/modules/loader/executable.rb +++ b/lib/msf/core/modules/loader/executable.rb @@ -82,6 +82,11 @@ class Msf::Modules::Loader::Executable < Msf::Modules::Loader::Base load_error(full_path, Errno::ENOENT.new) return '' end - Msf::Modules::External::Shim.generate(full_path) + begin + Msf::Modules::External::Shim.generate(full_path) + rescue ::Exception => e + elog "Unable to load module #{full_path} #{e.class} #{e}" + '' + end end end