Module: Ronin::Exploits::Metadata::Arch::ClassMethods

Defined in:
lib/ronin/exploits/metadata/arch.rb

Overview

Class-methods.

Instance Method Summary collapse

Instance Method Details

#arch(new_arch = nil) ⇒ :x86, ...

Gets or sets the exploit's targeted architecture.

Examples:

arch :x86_64

Parameters:

  • new_arch (:x86, :x86_64, :ia64, :amd64, :ppc, :ppc64, :mips, :mips_le, :mips_be, :mips64, :mips64_le, :mips64_be, :arm, :arm_le, :arm_be, :arm64, :arm64_le, :arm64_be, nil) (defaults to: nil)

    The optional new architecture to set.

Returns:

  • (:x86, :x86_64, :ia64, :amd64, :ppc, :ppc64, :mips, :mips_le, :mips_be, :mips64, :mips64_le, :mips64_be, :arm, :arm_le, :arm_be, :arm64, :arm64_le, :arm64_be, nil)

    The exploit's architecture.



60
61
62
63
64
65
66
67
68
# File 'lib/ronin/exploits/metadata/arch.rb', line 60

def arch(new_arch=nil)
  if new_arch
    @arch = new_arch
  else
    @arch ||= if superclass.kind_of?(ClassMethods)
                superclass.arch
              end
  end
end