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
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/msf/util/exe/osx.rb', line 15 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
43 44 45 |
# File 'lib/msf/util/exe/osx.rb', line 43 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
47 48 49 |
# File 'lib/msf/util/exe/osx.rb', line 47 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
39 40 41 |
# File 'lib/msf/util/exe/osx.rb', line 39 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
51 52 53 |
# File 'lib/msf/util/exe/osx.rb', line 51 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
35 36 37 |
# File 'lib/msf/util/exe/osx.rb', line 35 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
31 32 33 |
# File 'lib/msf/util/exe/osx.rb', line 31 def to_executable_osx_x86(framework, code, fmt = 'macho', opts = {}) return to_osx_x86_macho(framework, code, opts) if fmt == 'macho' end |