Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/util/exe/solaris/x86.rb
57477 views
1
# -*- coding: binary -*-
2
module Msf::Util::EXE::Solaris::X86
3
include Msf::Util::EXE::Common
4
5
def self.included(base)
6
base.extend(ClassMethods)
7
end
8
9
module ClassMethods
10
def to_executable(framework, code, fmt='elf', opts = {})
11
return to_solaris_x86_elf(framework, code, opts) if fmt == 'elf'
12
end
13
# Create a 32-bit Solaris ELF containing the payload provided in +code+
14
#
15
# @param framework [Msf::Framework]
16
# @param code [String]
17
# @param opts [Hash]
18
# @option [String] :template
19
# @return [String] Returns an elf
20
def to_solaris_x86_elf(framework, code, opts = {})
21
to_exe_elf(framework, opts, "template_x86_solaris.bin", code)
22
end
23
end
24
25
class << self
26
include ClassMethods
27
end
28
end
29