CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/core/module/arch.rb
Views: 11623
1
module Msf::Module::Arch
2
#
3
# Attributes
4
#
5
6
# @!attribute arch
7
# The array of zero or more architectures.
8
attr_reader :arch
9
10
#
11
# Instance Methods
12
#
13
14
#
15
# Return whether or not the module supports the supplied architecture.
16
#
17
def arch?(what)
18
if (what == ARCH_ANY)
19
true
20
else
21
arch.index(what) != nil
22
end
23
end
24
25
#
26
# Return a comma separated list of supported architectures, if any.
27
#
28
def arch_to_s
29
arch.join(", ")
30
end
31
32
#
33
# Enumerate each architecture.
34
#
35
def each_arch(&block)
36
arch.each(&block)
37
end
38
39
protected
40
41
#
42
# Attributes
43
#
44
45
attr_writer :arch
46
end
47