Module: Msf::Util::EXE::Bsd::ClassMethods
- Included in:
- Msf::Util::EXE::Bsd
- Defined in:
- lib/msf/util/exe/bsd.rb
Instance Method Summary collapse
- #to_executable_bsd(framework, arch, code, fmt = 'elf', opts = {}) ⇒ Object
- #to_executable_bsd_x64(framework, code, fmt = 'elf', opts = {}) ⇒ Object
- #to_executable_bsd_x86(framework, code, fmt = 'elf', opts = {}) ⇒ Object
Instance Method Details
#to_executable_bsd(framework, arch, code, fmt = 'elf', opts = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/msf/util/exe/bsd.rb', line 11 def to_executable_bsd(framework, arch, code, fmt = 'elf', opts = {}) exe_formats = ['elf', 'elf-so'] exe_fmt = 'elf' exe_fmt = fmt if exe_formats.include?(fmt) exe = nil exe = to_executable_bsd_x86(framework, code, exe_fmt, opts) if arch.index(ARCH_X86) exe = to_executable_bsd_x64(framework, code, exe_fmt, opts) if arch.index(ARCH_X64) #exe = to_executable_bsd_armle(framework, code, exe_fmt, opts) if arch =~ /armle|armv7l/i Not yet implemented #exe = to_executable_bsd_aarch64(framework, code, exe_fmt, opts) if arch =~ /aarch64|arm64/i Not yet implemented return exe if exe_formats.include?(fmt) # Returning only the exe nil end |
#to_executable_bsd_x64(framework, code, fmt = 'elf', opts = {}) ⇒ Object
31 32 33 34 |
# File 'lib/msf/util/exe/bsd.rb', line 31 def to_executable_bsd_x64(framework, code, fmt = 'elf', opts = {}) return to_bsd_x64_elf(framework, code, opts) if fmt == 'elf' #return to_bsd_x64_elf_dll(framework, code, opts) if fmt == 'elf-so' Not yet implemented end |
#to_executable_bsd_x86(framework, code, fmt = 'elf', opts = {}) ⇒ Object
26 27 28 29 |
# File 'lib/msf/util/exe/bsd.rb', line 26 def to_executable_bsd_x86(framework, code, fmt = 'elf', opts = {}) return to_bsd_x86_elf(framework, code, opts) if fmt == 'elf' # return to_bsd_x86_elf_dll(framework, code, opts) if fmt == 'elf-so' Not yet implemented end |