Module: Msf::Util::EXE::OSX::ClassMethods
- Included in:
- Msf::Util::EXE::OSX
- Defined in:
- lib/msf/util/exe/osx.rb
Instance Method Summary collapse
- #to_executable_osx(framework, arch, code, fmt = 'macho', opts = {}) ⇒ Object
- #to_executable_osx_aarch64(framework, code, fmt = 'macho', opts = {}) ⇒ Object
- #to_executable_osx_app(framework, code, fmt = 'app', opts = {}) ⇒ Object
- #to_executable_osx_armle(framework, code, fmt = 'macho', opts = {}) ⇒ Object
- #to_executable_osx_ppc(framework, code, fmt = 'macho', opts = {}) ⇒ Object
- #to_executable_osx_x64(framework, code, fmt = 'macho', opts = {}) ⇒ Object
- #to_executable_osx_x86(framework, code, fmt = 'macho', opts = {}) ⇒ Object
Instance Method Details
#to_executable_osx(framework, arch, code, fmt = 'macho', opts = {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/msf/util/exe/osx.rb', line 14 def to_executable_osx(framework, arch, code, fmt = 'macho', opts = {}) exe_formats = ['macho', 'app'] exe_fmt = 'macho' exe_fmt = fmt if exe_formats.include?(fmt) exe = nil exe = to_executable_osx_x86(framework, code, exe_fmt, opts) if arch.index(ARCH_X86) exe = to_executable_osx_x64(framework, code, exe_fmt, opts) if arch.index(ARCH_X64) exe = to_executable_osx_armle(framework, code, exe_fmt, opts) if arch.index(ARCH_ARMLE) exe = to_executable_osx_aarch64(framework, code, exe_fmt, opts) if arch.index(ARCH_AARCH64) exe = to_executable_osx_app(framework, code, exe_fmt, opts) if fmt == 'app' exe = to_executable_osx_ppc(framework, code, exe_fmt, opts) if arch.index(ARCH_PPC) return exe if exe_formats.include?(fmt) # Returning only the exe end |
#to_executable_osx_aarch64(framework, code, fmt = 'macho', opts = {}) ⇒ Object
42 43 44 |
# File 'lib/msf/util/exe/osx.rb', line 42 def to_executable_osx_aarch64(framework, code, fmt = 'macho', opts = {}) return to_osx_aarch64_macho(framework, code, opts) if fmt == 'macho' end |
#to_executable_osx_app(framework, code, fmt = 'app', opts = {}) ⇒ Object
46 47 48 |
# File 'lib/msf/util/exe/osx.rb', line 46 def to_executable_osx_app(framework, code, fmt = 'app', opts = {}) return to_osx_app(code, opts) if fmt == 'app' end |
#to_executable_osx_armle(framework, code, fmt = 'macho', opts = {}) ⇒ Object
38 39 40 |
# File 'lib/msf/util/exe/osx.rb', line 38 def to_executable_osx_armle(framework, code, fmt = 'macho', opts = {}) return to_osx_armle_macho(framework, code, opts) if fmt == 'macho' end |
#to_executable_osx_ppc(framework, code, fmt = 'macho', opts = {}) ⇒ Object
50 51 52 |
# File 'lib/msf/util/exe/osx.rb', line 50 def to_executable_osx_ppc(framework, code, fmt = 'macho', opts = {}) return to_osx_ppc_macho(framework, code, opts) if fmt == 'macho' end |
#to_executable_osx_x64(framework, code, fmt = 'macho', opts = {}) ⇒ Object
34 35 36 |
# File 'lib/msf/util/exe/osx.rb', line 34 def to_executable_osx_x64(framework, code, fmt = 'macho', opts = {}) return to_osx_x64_macho(framework, code, opts) if fmt == 'macho' end |
#to_executable_osx_x86(framework, code, fmt = 'macho', opts = {}) ⇒ Object
30 31 32 |
# File 'lib/msf/util/exe/osx.rb', line 30 def to_executable_osx_x86(framework, code, fmt = 'macho', opts = {}) return to_osx_x86_macho(framework, code, opts) if fmt == 'macho' end |