diff --git a/lib/msf/core/module.rb b/lib/msf/core/module.rb index 628822ea98..9b3dbdc782 100644 --- a/lib/msf/core/module.rb +++ b/lib/msf/core/module.rb @@ -12,6 +12,7 @@ module Msf # ### class Module + autoload :Arch, 'msf/core/module/arch' autoload :Compatibility, 'msf/core/module/compatibility' autoload :DataStore, 'msf/core/module/data_store' autoload :ModuleInfo, 'msf/core/module/module_info' @@ -19,6 +20,7 @@ class Module autoload :Options, 'msf/core/module/options' autoload :UI, 'msf/core/module/ui' + include Msf::Module::Arch include Msf::Module::Compatibility include Msf::Module::DataStore include Msf::Module::ModuleInfo @@ -331,31 +333,6 @@ class Module author.each(&block) end - # - # Return a comma separated list of supported architectures, if any. - # - def arch_to_s - arch.join(", ") - end - - # - # Enumerate each architecture. - # - def each_arch(&block) - arch.each(&block) - end - - # - # Return whether or not the module supports the supplied architecture. - # - def arch?(what) - if (what == ARCH_ANY) - true - else - arch.index(what) != nil - end - end - # # Return a comma separated list of supported platforms, if any. # diff --git a/lib/msf/core/module/arch.rb b/lib/msf/core/module/arch.rb new file mode 100644 index 0000000000..a5ab67d7db --- /dev/null +++ b/lib/msf/core/module/arch.rb @@ -0,0 +1,26 @@ +module Msf::Module::Arch + # + # Return whether or not the module supports the supplied architecture. + # + def arch?(what) + if (what == ARCH_ANY) + true + else + arch.index(what) != nil + end + end + + # + # Return a comma separated list of supported architectures, if any. + # + def arch_to_s + arch.join(", ") + end + + # + # Enumerate each architecture. + # + def each_arch(&block) + arch.each(&block) + end +end \ No newline at end of file