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