Extract Msf::Module::Arch

MSP-11126
bug/bundler_fix
Luke Imhoff 2014-10-16 13:14:56 -05:00
parent a2dc3b754f
commit 44b2e5e35c
No known key found for this signature in database
GPG Key ID: 5B1FB01FB33356F8
2 changed files with 28 additions and 25 deletions

View File

@ -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.
#

View File

@ -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