Log when loading an invalid external module type
parent
de70a5935e
commit
0834c1aabd
|
@ -18,8 +18,7 @@ class Msf::Modules::External::Shim
|
|||
when 'multi_scanner'
|
||||
multi_scanner(mod)
|
||||
else
|
||||
# TODO have a nice load error show up in the logs
|
||||
''
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -85,7 +85,13 @@ class Msf::Modules::Loader::Executable < Msf::Modules::Loader::Base
|
|||
return ''
|
||||
end
|
||||
begin
|
||||
Msf::Modules::External::Shim.generate(full_path)
|
||||
content = Msf::Modules::External::Shim.generate(full_path)
|
||||
if content
|
||||
return content
|
||||
else
|
||||
elog "Unable to load module #{full_path}, unknown module type"
|
||||
return ''
|
||||
end
|
||||
rescue ::Exception => e
|
||||
elog "Unable to load module #{full_path} #{e.class} #{e} #{e.backtrace.join "\n"}"
|
||||
# XXX migrate this to a full load_error when we can tell the user why the
|
||||
|
|
Loading…
Reference in New Issue