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
36043 views
1
module Msf::Util::EXE::Solaris::X86
2
include Msf::Util::EXE::Common
3
4
def self.included(base)
5
base.extend(ClassMethods)
6
end
7
8
module ClassMethods
9
def to_executable(framework, code, fmt='elf', opts = {})
10
return to_solaris_x86_elf(framework, code, opts) if fmt == 'elf'
11
end
12
# Create a 32-bit Solaris ELF containing the payload provided in +code+
13
#
14
# @param framework [Msf::Framework]
15
# @param code [String]
16
# @param opts [Hash]
17
# @option [String] :template
18
# @return [String] Returns an elf
19
def to_solaris_x86_elf(framework, code, opts = {})
20
to_exe_elf(framework, opts, "template_x86_solaris.bin", code)
21
end
22
end
23
24
class << self
25
include ClassMethods
26
end
27
end
28