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